Main Page   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 "DisjointBoxLayout.H"
00039 #include "LevelData.H"
00040 #include "PiecewiseLinearFillPatch.H"
00041 #include "ExtrapFillPatch.H"
00042 #include "LevelFluxRegister.H"
00043 #include "ProblemDomain.H"
00044 #include "PatchGodunov.H"
00045 
00047 
00049 class LevelGodunov
00050 {
00051 public:
00053 
00056   LevelGodunov();
00057 
00059 
00063   ~LevelGodunov();
00064 
00066 
00073   void define(const DisjointBoxLayout&  a_thisDisjointBoxLayout,
00074               const DisjointBoxLayout&  a_coarserDisjointBoxLayout,
00075               const ProblemDomain&      a_domain,
00076               const int&                a_refineCoarse,
00077               const Real&               a_dx,
00078               const PatchGodunov* const a_patchGodunovFactory,
00079               const bool&               a_hasCoarser,
00080               const bool&               a_hasFiner);
00081 
00083 
00096   Real step(LevelData<FArrayBox>&       a_U,
00097             LevelFluxRegister&          a_finerFluxRegister,
00098             LevelFluxRegister&          a_coarserFluxRegister,
00099             const LevelData<FArrayBox>& a_S,
00100             const LevelData<FArrayBox>& a_UCoarseOld,
00101             const Real&                 a_TCoarseOld,
00102             const LevelData<FArrayBox>& a_UCoarseNew,
00103             const Real&                 a_TCoarseNew,
00104             const Real&                 a_time,
00105             const Real&                 a_dt);
00106 
00108 
00110   Real getMaxWaveSpeed(const LevelData<FArrayBox>& a_U);
00111 
00112 protected:
00113   // define() has been called
00114   bool m_defined;
00115 
00116   // Box layout for this level
00117   DisjointBoxLayout m_grids;
00118 
00119   // Patch integrator
00120   PatchGodunov* m_patchGodunov;
00121 
00122   // Number of ghost cells need locally for this level
00123   int m_numGhost;
00124 
00125   // Interpolator for filling in ghost cells from the next coarser level
00126   PiecewiseLinearFillPatch m_patcher;
00127 
00128   // Grid spacing
00129   Real m_dx;
00130 
00131   // Problem domain - index space for this level
00132   ProblemDomain m_domain;
00133 
00134   // Refinement ratio between this level and the next coarser
00135   int m_refineCoarse;
00136 
00137   // Number of conserved variables
00138   int m_numCons;
00139 
00140   // Number of conservative fluxes and other face centered quantities
00141   int m_numFluxes;
00142 
00143   // Flags for the existence of coarser and finer levels, respectively
00144   bool m_hasCoarser;
00145   bool m_hasFiner;
00146 
00147 private:
00148   // Disallowed for all the usual reasons
00149   void operator=(const LevelGodunov& a_input)
00150   {
00151     MayDay::Error("invalid operator");
00152   }
00153 
00154   // Disallowed for all the usual reasons
00155   LevelGodunov(const LevelGodunov& a_input)
00156   {
00157     MayDay::Error("invalid operator");
00158   }
00159 };
00160 
00161 #endif

Generated on Wed Apr 16 14:26:49 2003 for Chombo by doxygen1.2.16