00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _PATCHGODUNOV_H_
00012 #define _PATCHGODUNOV_H_
00013
00014 #include "Box.H"
00015 #include "IntVectSet.H"
00016 #include "Vector.H"
00017 #include "FluxBox.H"
00018
00019 #include "GodunovPhysics.H"
00020 #include "GodunovUtilities.H"
00021 #include "NamespaceHeader.H"
00022
00023 class HDF5HeaderData;
00024
00026
00033 class PatchGodunov
00034 {
00035 public:
00037
00039 PatchGodunov();
00040
00042
00044 virtual ~PatchGodunov();
00045
00047
00049 virtual void define(const ProblemDomain& a_domain,
00050 const Real& a_dx,
00051 const GodunovPhysics* const a_gdnvPhysicsPtr,
00052 const int& a_normalPredOrder,
00053 const bool& a_useFourthOrderSlopes,
00054 const bool& a_usePrimLimiting,
00055 const bool& a_useCharLimiting,
00056 const bool& a_useFlattening,
00057 const bool& a_useArtificialViscosity,
00058 const Real& a_artificialViscosity);
00059
00061
00063 virtual void setCurrentTime(const Real& a_currentTime);
00064
00066
00068 virtual void setCurrentBox(const Box& a_currentBox);
00069
00071
00078 virtual void updateState(FArrayBox& a_U,
00079 FluxBox& a_F,
00080 Real& a_maxWaveSpeed,
00081 const FArrayBox& a_S,
00082 const Real& a_dt,
00083 const Box& a_box);
00084
00085 virtual void updateState(FArrayBox& a_U,
00086 FluxBox& a_F,
00087 FluxBox& a_wHalf,
00088 Real& a_maxWaveSpeed,
00089 const FArrayBox& a_S,
00090 const Real& a_dt,
00091 const Box& a_box);
00092
00094
00102 virtual void computeWHalf(FluxBox& a_WHalf,
00103 const FArrayBox& a_U,
00104 const FArrayBox& a_S,
00105 const Real& a_dt,
00106 const Box& a_box);
00107
00109
00113 virtual void computeUpdate(FArrayBox& a_dU,
00114 FluxBox& a_F,
00115 const FArrayBox& a_U,
00116 const FluxBox& a_WHalf,
00117 const Real& a_dt,
00118 const Box& a_box);
00119
00121
00123 void computeFluxes(FluxBox& a_F,
00124 const FluxBox& a_WHalf,
00125 const Box& a_box);
00126
00128
00132 void CTUNormalPred(FArrayBox& a_WMinus,
00133 FArrayBox& a_WPlus,
00134 const Real& a_dt,
00135 const Real& a_dx,
00136 const FArrayBox& a_W,
00137 const FArrayBox& a_flat,
00138 const int& a_dir,
00139 const Box& a_box);
00140
00142
00145 void PLMNormalPred(FArrayBox& a_WMinus,
00146 FArrayBox& a_WPlus,
00147 const Real& a_dt,
00148 const Real& a_dx,
00149 const FArrayBox& a_W,
00150 const FArrayBox& a_flat,
00151 const int& a_dir,
00152 const Box& a_box);
00153
00155
00158 void PPMNormalPred(FArrayBox& a_WMinus,
00159 FArrayBox& a_WPlus,
00160 const Real& a_dt,
00161 const Real& a_dx,
00162 const FArrayBox& a_W,
00163 const FArrayBox& a_flat,
00164 const int& a_dir,
00165 const Box& a_box);
00166
00168
00170 GodunovPhysics* getGodunovPhysicsPtr();
00171
00173
00176 virtual bool isDefined() const;
00177
00179 void highOrderLimiter(bool a_highOrderLimiter);
00180
00181 #ifdef CH_USE_HDF5
00182 virtual void expressions(HDF5HeaderData& a_holder) const {;}
00183 #endif
00184
00185 protected:
00186
00187 ProblemDomain m_domain;
00188 Real m_dx;
00189
00190
00191 GodunovPhysics* m_gdnvPhysics;
00192
00193
00194 GodunovUtilities m_util;
00195
00196
00197 int m_normalPredOrder;
00198
00199
00200 bool m_useFourthOrderSlopes;
00201
00202
00203 bool m_usePrimLimiting;
00204 bool m_useCharLimiting;
00205
00206
00207 bool m_useFlattening;
00208
00209
00210 bool m_useArtificialViscosity;
00211 Real m_artificialViscosity;
00212
00213
00214 Real m_currentTime;
00215 bool m_isCurrentTimeSet;
00216
00217
00218 Box m_currentBox;
00219 bool m_isCurrentBoxSet;
00220
00221
00222 bool m_isDefined;
00223
00224
00225 bool m_highOrderLimiter;
00226
00227 private:
00228
00229 void operator=(const PatchGodunov& a_input)
00230 {
00231 MayDay::Error("invalid operator");
00232 }
00233
00234
00235 PatchGodunov(const PatchGodunov& a_input)
00236 {
00237 MayDay::Error("invalid operator");
00238 }
00239 };
00240
00241 #include "NamespaceFooter.H"
00242 #endif