00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _GODUNOVUTILITIES_H_
00012 #define _GODUNOVUTILITIES_H_
00013
00014 #include "Box.H"
00015 #include "IntVectSet.H"
00016 #include "Vector.H"
00017 #include "REAL.H"
00018 #include "FArrayBox.H"
00019 #include "FluxBox.H"
00020 #include "NamespaceHeader.H"
00021
00022 class GodunovPhysics;
00023
00025
00032 class GodunovUtilities
00033 {
00034 public:
00036
00038 GodunovUtilities();
00039
00041
00043 ~GodunovUtilities();
00044
00046
00048 void define(ProblemDomain& a_domain,
00049 const Real& a_dx);
00050
00052
00056 void computeFlattening(
00057 FArrayBox& a_flattening,
00059 const FArrayBox& a_W,
00061 const Interval& a_velInt,
00063 const int& a_presInd,
00065 const Real& a_smallPres,
00067 const int& a_bulkModulusInd,
00069 const Box& a_box);
00070
00072
00075 void applyFlattening(
00076 FArrayBox& a_dW,
00078 const FArrayBox& a_flat,
00080 const Box& a_box);
00081
00083
00087 void vanLeerSlopes(FArrayBox& a_dW,
00088 const FArrayBox& a_W,
00089 const int& a_numSlopes,
00090 const bool& a_useLimiting,
00091 const int& a_dir,
00092 const Box& a_box);
00093
00095
00099 void fourthOrderSlopes(FArrayBox& a_dW4,
00100 const FArrayBox& a_W,
00101 const FArrayBox& a_dWvL,
00102 const int& a_numSlopes,
00103 const int& a_dir,
00104 const Box& a_box);
00105
00107
00109 void oneSidedDifferences(FArrayBox& a_dWMinus,
00110 FArrayBox& a_dWPlus,
00111 const FArrayBox& a_W,
00112 const int& a_dir,
00113 const Box& a_box);
00114
00116
00131 void slopes(FArrayBox& a_dWCent,
00132 FArrayBox& a_dWMinus,
00133 FArrayBox& a_dWPlus,
00134 const FArrayBox& a_W,
00135 const int& a_numSlopes,
00136 const int& a_dir,
00137 const Box& a_loBox,
00138 const Box& a_hiBox,
00139 const Box& a_centerBox,
00140 const Box& a_entireBox,
00141 const int& a_hasLo,
00142 const int& a_hasHi);
00143
00145
00151 void slopeLimiter(FArrayBox& a_dW,
00152 const FArrayBox& a_dWMinus,
00153 const FArrayBox& a_dWPlus,
00154 const int& a_numSlopes,
00155 const Box& a_box);
00156
00158
00164 void slopeLimiterExtPreserving(FArrayBox& a_dW,
00165 const FArrayBox& a_dWMinus,
00166 const FArrayBox& a_dWPlus,
00167 const int& a_numSlopes,
00168 const Box& a_box,
00169 const int& a_dir);
00170
00172
00175 void PLMNormalPred(FArrayBox& a_dWCharMinus,
00176 FArrayBox& a_dWCharPlus,
00177 const FArrayBox& a_dWChar,
00178 const FArrayBox& a_Lambda,
00179 const Real& a_dtbydx,
00180 const Box& a_box);
00181
00183
00188 void PPMFaceValues(FArrayBox& a_WFace,
00189 const FArrayBox& a_W,
00190 const int& a_numSlopes,
00191 const bool& a_useLimiting,
00192 const int& a_dir,
00193 const Box& a_box,
00194 const Real& a_time,
00195 const GodunovPhysics* a_physPtr = NULL);
00196
00197 void PPMFaceValuesunused(FArrayBox& a_WFace,
00198 const FArrayBox& a_W,
00199 const int& a_numSlopes,
00200 const bool& a_useLimiting,
00201 const int& a_dir,
00202 const Box& a_box,
00203 const Real& a_time,
00204 const GodunovPhysics* a_physPtr = NULL);
00205
00207
00218 void PPMLimiter(FArrayBox& a_dWMinus,
00219 FArrayBox& a_dWPlus,
00220 const FArrayBox& a_W,
00221 const int& a_numSlopes,
00222 const int& a_dir,
00223 const Box& a_box);
00224
00226
00233 void PPMNormalPred(FArrayBox& a_dWMinus,
00234 FArrayBox& a_dWPlus,
00235 const FArrayBox& a_Lambda,
00236 const Real& a_dtbydx,
00237 const int& a_numSlopes,
00238 const Box& a_box);
00239
00241
00246 void divVel(FArrayBox& a_divVel,
00247 const FArrayBox& a_W,
00248 const Interval& a_velInt,
00249 const int& a_dir,
00250 const Box& a_box);
00251
00253
00257 void artificialViscosity(FArrayBox& a_F,
00258 const FArrayBox& a_U,
00259 const FArrayBox& a_divVel,
00260 const Real& a_scale,
00261 const int& a_dir,
00262 const Box& a_box);
00263
00265 void highOrderLimiter(bool a_highOrderLimiter);
00266
00268 void deconvolve(FArrayBox& a_avgFab,
00269 const FArrayBox& a_cellFab,
00270 int a_sign = 1);
00271
00273 void deconvolveFace(FluxBox& a_avgFlux,
00274 const FluxBox& a_cellFlux,
00275 int a_sign = 1);
00276
00277 protected:
00278
00279 ProblemDomain m_domain;
00280 Real m_dx;
00281
00282
00283 bool m_isDefined;
00284
00285
00286 bool m_highOrderLimiter;
00287
00288 private:
00289
00290
00291 void operator=(const GodunovUtilities& a_input)
00292 {
00293 MayDay::Error("invalid operator");
00294 }
00295
00296
00297 GodunovUtilities(const GodunovUtilities& a_input)
00298 {
00299 MayDay::Error("invalid operator");
00300 }
00301 };
00302
00303 #include "NamespaceFooter.H"
00304 #endif