00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef LEVEL_GODUNOV_H
00029 #define LEVEL_GODUNOV_H
00030
00031
00032
00033
00034
00035
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
00118 bool m_defined;
00119
00120
00121 DisjointBoxLayout m_grids;
00122
00123
00124 PatchGodunov* m_patchGodunov;
00125
00126
00127 int m_numGhost;
00128
00129
00130 PiecewiseLinearFillPatch m_patcher;
00131
00132
00133 Real m_dx;
00134
00135
00136 ProblemDomain m_domain;
00137
00138
00139 int m_refineCoarse;
00140
00141
00142 int m_numCons;
00143
00144
00145 int m_numFluxes;
00146
00147
00148 bool m_hasCoarser;
00149 bool m_hasFiner;
00150
00151 private:
00152
00153 void operator=(const LevelGodunov& a_input)
00154 {
00155 MayDay::Error("invalid operator");
00156 }
00157
00158
00159 LevelGodunov(const LevelGodunov& a_input)
00160 {
00161 MayDay::Error("invalid operator");
00162 }
00163 };
00164
00165 #endif