00001 #ifdef CH_LANG_CC
00002
00003
00004
00005
00006
00007
00008
00009 #endif
00010
00011 #ifndef _PATCHCONSOPERATOR_H_
00012 #define _PATCHCONSOPERATOR_H_
00013
00014
00015
00016
00017
00018 #include "FArrayBox.H"
00019 #include "FluxBox.H"
00020 #include "ProblemDomain.H"
00021 #include "MOLPhysics.H"
00022 #include "MOLUtilities.H"
00023
00024 #include "NamespaceHeader.H"
00025
00026
00027
00028
00029
00030 class PatchConsOperator
00031 {
00032 public:
00033
00034
00035
00036
00037 PatchConsOperator();
00038
00039
00040
00041
00042
00043
00044 virtual ~PatchConsOperator();
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 virtual void define(const ProblemDomain& a_domain,
00055 const Real& a_dx,
00056 const MOLPhysics* const a_molPhysics,
00057 const int& a_numStates);
00058
00059
00060
00061
00062 virtual void setCurrentTime(const Real& a_currentTime);
00063
00064
00065
00066
00067 virtual void setCurrentBox(const Box& a_currentBox);
00068
00069
00070 virtual void getNormalFlux(FluxBox& a_FfaceAvg,
00071 const FArrayBox& a_UavgFab,
00072 Real a_weight,
00073 bool a_setFlattening,
00074 FArrayBox& a_flatteningFab);
00075
00076
00077 virtual void updateODE(FArrayBox& a_solnFab,
00078 const FArrayBox& a_rhsFab,
00079 Real a_dt);
00080
00081
00082 virtual void getFaceAvg(
00083 FluxBox& a_faceW,
00084
00085 const FArrayBox& a_cellW,
00086 const FArrayBox& a_WofUavg,
00087 FArrayBox& a_flatteningFab,
00088 bool a_setFlattening);
00089
00090
00091
00092
00093
00094 void spaceOrder(int a_spaceOrder);
00095
00096
00097
00098 void limitFaceValues(bool a_limitFaceValues);
00099
00100
00101 void highOrderLimiter(bool a_highOrderLimiter);
00102
00103
00104 void useFlattening(bool a_useFlattening);
00105
00106
00107 void noPPM(bool a_noPPM);
00108
00109
00110 void doDeconvolution(bool a_doDeconvolution);
00111
00112
00113 void doFaceDeconvolution(bool a_doFaceDeconvolution);
00114
00115
00116 void useArtificialViscosity(bool a_useArtificialViscosity);
00117
00118
00119 void artificialViscosity(Real a_artificialViscosity);
00120
00121
00122 void numGhost(int a_numGhost);
00123
00124
00125 virtual void addArtificialViscosity(FArrayBox& a_UnewFab,
00126 const FArrayBox& a_UoldFab,
00127 FluxBox& a_flux,
00128 Real a_weight);
00129
00130 virtual void getFluxDivergence(FArrayBox& a_LofU,
00131 const FluxBox& a_FfaceAvg);
00132
00133
00134
00135
00136
00137 virtual bool isDefined() const;
00138
00139 protected:
00140
00141
00142 virtual void preRiemann(FArrayBox& a_WLeft,
00143 FArrayBox& a_WRight,
00144 int a_dir,
00145 const Box& a_box);
00146
00147
00148 virtual void postRiemann(FArrayBox& a_Wface,
00149 int a_dir,
00150 const Box& a_box);
00151
00152 virtual void getAllFluxes(FluxBox& a_FfaceAvg,
00153 FluxBox& a_FfaceCen,
00154 const FluxBox& a_WfaceAvg,
00155 const FluxBox& a_WfaceCen);
00156
00157
00158 virtual void reduceFlux(FluxBox& a_FfaceAvg,
00159 FluxBox& a_FfaceForGrad);
00160
00161
00162 bool m_isDefined;
00163
00164
00165 Real m_dx;
00166
00167
00168 ProblemDomain m_domain;
00169
00170 MOLPhysics* m_molPhysics;
00171
00172 MOLUtilities m_util;
00173
00174
00175 int m_spaceOrder;
00176
00177
00178 bool m_limitFaceValues;
00179
00180
00181 bool m_highOrderLimiter;
00182
00183
00184 bool m_useFlattening;
00185
00186
00187 int m_numFluxes;
00188
00189 int m_numGhost;
00190 int m_numFields;
00191
00192 int m_numFluxesPerField;
00193
00194
00195 bool m_hasCoarser;
00196 bool m_hasFiner;
00197
00198
00199 bool m_noPPM;
00200
00201
00202 bool m_doDeconvolution;
00203
00204
00205 bool m_doFaceDeconvolution;
00206
00207
00208 bool m_useArtificialViscosity;
00209
00210
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 private:
00222
00223 void operator=(const PatchConsOperator& a_input);
00224
00225
00226 PatchConsOperator(const PatchConsOperator& a_input);
00227 };
00228
00229 #include "NamespaceFooter.H"
00230
00231 #endif