Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

LevelGodunov.H

Go to the documentation of this file.
00001 /* _______              __
00002   / ___/ /  ___  __ _  / /  ___
00003  / /__/ _ \/ _ \/  ' \/ _ \/ _ \
00004  \___/_//_/\___/_/_/_/_.__/\___/
00005 */
00006 //
00007 // This software is copyright (C) by the Lawrence Berkeley
00008 // National Laboratory.  Permission is granted to reproduce
00009 // this software for non-commercial purposes provided that
00010 // this notice is left intact.
00011 //
00012 // It is acknowledged that the U.S. Government has rights to
00013 // this software under Contract DE-AC03-765F00098 between
00014 // the U.S.  Department of Energy and the University of
00015 // California.
00016 //
00017 // This software is provided as a professional and academic
00018 // contribution for joint exchange. Thus it is experimental,
00019 // is provided ``as is'', with no warranties of any kind
00020 // whatsoever, no support, no promise of updates, or printed
00021 // documentation. By using this software, you acknowledge
00022 // that the Lawrence Berkeley National Laboratory and
00023 // Regents of the University of California shall have no
00024 // liability with respect to the infringement of other
00025 // copyrights by any part of this software.
00026 //
00027 
00028 #ifndef LEVEL_GODUNOV_H
00029 #define LEVEL_GODUNOV_H
00030 
00031 // Original design:                     Phil Colella
00032 // Original implementation:             Brian Van Straalen
00033 // Implementation date:                 April 12, 1999
00034 // Rearchitected for unsplit algorithm: Phil Colella/Terry Ligocki
00035 //                                      March 2002
00036 
00037 #include "FArrayBox.H"
00038 #include "FluxBox.H"
00039 #include "DisjointBoxLayout.H"
00040 #include "LevelData.H"
00041 #include "PiecewiseLinearFillPatch.H"
00042 #include "ExtrapFillPatch.H"
00043 #include "LevelFluxRegister.H"
00044 #include "ProblemDomain.H"
00045 #include "PatchGodunov.H"
00046 
00048 
00050 class LevelGodunov
00051 {
00052 public:
00054 
00057   LevelGodunov();
00058 
00060 
00064   ~LevelGodunov();
00065 
00067 
00074   void define(const DisjointBoxLayout&  a_thisDisjointBoxLayout,
00075               const DisjointBoxLayout&  a_coarserDisjointBoxLayout,
00076               const ProblemDomain&      a_domain,
00077               const int&                a_refineCoarse,
00078               const Real&               a_dx,
00079               const PatchGodunov* const a_patchGodunovFactory,
00080               const bool&               a_hasCoarser,
00081               const bool&               a_hasFiner);
00082 
00084 
00099   Real step(LevelData<FArrayBox>&       a_U,
00100             LevelData<FArrayBox>        a_flux[CH_SPACEDIM],
00101             LevelFluxRegister&          a_finerFluxRegister,
00102             LevelFluxRegister&          a_coarserFluxRegister,
00103             const LevelData<FArrayBox>& a_S,
00104             const LevelData<FArrayBox>& a_UCoarseOld,
00105             const Real&                 a_TCoarseOld,
00106             const LevelData<FArrayBox>& a_UCoarseNew,
00107             const Real&                 a_TCoarseNew,
00108             const Real&                 a_time,
00109             const Real&                 a_dt);
00110 
00112 
00114   Real getMaxWaveSpeed(const LevelData<FArrayBox>& a_U);
00115 
00116 protected:
00117   // define() has been called
00118   bool m_defined;
00119 
00120   // Box layout for this level
00121   DisjointBoxLayout m_grids;
00122 
00123   // Patch integrator
00124   PatchGodunov* m_patchGodunov;
00125 
00126   // Number of ghost cells need locally for this level
00127   int m_numGhost;
00128 
00129   // Interpolator for filling in ghost cells from the next coarser level
00130   PiecewiseLinearFillPatch m_patcher;
00131 
00132   // Grid spacing
00133   Real m_dx;
00134 
00135   // Problem domain - index space for this level
00136   ProblemDomain m_domain;
00137 
00138   // Refinement ratio between this level and the next coarser
00139   int m_refineCoarse;
00140 
00141   // Number of conserved variables
00142   int m_numCons;
00143 
00144   // Number of conservative fluxes and other face centered quantities
00145   int m_numFluxes;
00146 
00147   // Flags for the existence of coarser and finer levels, respectively
00148   bool m_hasCoarser;
00149   bool m_hasFiner;
00150 
00151 private:
00152   // Disallowed for all the usual reasons
00153   void operator=(const LevelGodunov& a_input)
00154   {
00155     MayDay::Error("invalid operator");
00156   }
00157 
00158   // Disallowed for all the usual reasons
00159   LevelGodunov(const LevelGodunov& a_input)
00160   {
00161     MayDay::Error("invalid operator");
00162   }
00163 };
00164 
00165 #endif

Generated on Fri Jul 2 17:53:42 2004 for Chombo by doxygen 1.3.2