00001 #ifdef CH_LANG_CC 00002 /* 00003 * _______ __ 00004 * / ___/ / ___ __ _ / / ___ 00005 * / /__/ _ \/ _ \/ V \/ _ \/ _ \ 00006 * \___/_//_/\___/_/_/_/_.__/\___/ 00007 * Please refer to Copyright.txt, in Chombo's root directory. 00008 */ 00009 #endif 00010 00011 #ifndef _AMRLEVELCONSFACTORY_H_ 00012 #define _AMRLEVELCONSFACTORY_H_ 00013 00014 #include "AMRLevelFactory.H" 00015 #include "AMRLevelCons.H" 00016 00017 #include "NamespaceHeader.H" 00018 00019 /// AMR Cons Equation factory 00020 /** 00021 */ 00022 class AMRLevelConsFactory : public AMRLevelFactory 00023 { 00024 public: 00025 /// Null constructor 00026 /** 00027 */ 00028 AMRLevelConsFactory(); 00029 00030 /// Virtual constructor 00031 /** 00032 */ 00033 virtual AMRLevel* new_amrlevel() const; 00034 00035 /// Destructor 00036 /** 00037 */ 00038 virtual ~AMRLevelConsFactory(); 00039 00040 /// CFL number 00041 /** 00042 */ 00043 virtual void CFL(Real a_cfl); 00044 00045 /// spatial order of accuracy (default is 4) 00046 virtual void spaceOrder(int a_spaceOrder); 00047 00048 /// sets whether to limit face values in advection (default is false) 00049 virtual void limitFaceValues(bool a_limitFaceValues); 00050 00051 /// sets whether to use high-order limiter (default is true) 00052 virtual void highOrderLimiter(bool a_highOrderLimiter); 00053 00054 /// sets whether initial data is average; default false 00055 virtual void initialAverage(bool a_initialAverage); 00056 00057 /// sets whether to flatten extrapolations to faces 00058 virtual void useFlattening(bool a_useFlattening); 00059 00060 /// sets whether to turn PPM off 00061 virtual void noPPM(bool a_noPPM); 00062 00063 /// sets m_doDeconvolution 00064 virtual void doDeconvolution(bool a_doDeconvolution); 00065 00066 /// sets m_doFaceDeconvolution 00067 virtual void doFaceDeconvolution(bool a_doFaceDeconvolution); 00068 00069 /// sets whether to use artificial viscosity (from divergence) 00070 virtual void useArtificialViscosity(bool a_useArtificialViscosity); 00071 00072 /// sets coefficient of artificial viscosity (from divergence) 00073 virtual void artificialViscosity(Real a_artificialViscosity); 00074 00075 /// sets whether to use artificial viscosity 00076 virtual void useArtVisc(bool a_useArtVisc); 00077 00078 /// sets coefficient of artificial viscosity 00079 virtual void ratioArtVisc(Real a_ratioArtVisc); 00080 00081 /// sets whether forward Euler is used (instead of RK4) 00082 virtual void forwardEuler(bool a_forwardEuler); 00083 00084 /// sets whether to enforce a min value in advection, along with valeu 00085 virtual void enforceMinVal(bool a_enforceMinVal, Real a_minVal); 00086 00087 /// Physical dimension of the longest side of the domain 00088 /** 00089 */ 00090 virtual void domainLength(Real a_domainLength); 00091 00092 void x0(const Real& a_x0); 00093 00094 /// 00095 /** 00096 */ 00097 virtual void verbosity(const int& verbosity); 00098 00099 /// Refinement threshold 00100 /** 00101 */ 00102 virtual void refinementThreshold(Real a_refineThresh); 00103 00104 /// Set whether refinement threshold is scaled with dx 00105 /** 00106 */ 00107 virtual void refinementIsScaled(bool a_refinementIsScaled); 00108 00109 /// Set whether to tag on pressure instead of on density 00110 /** 00111 */ 00112 virtual void tagPressure(bool a_tagPressure); 00113 00114 /// Set whether to tag on vorticity instead of on density 00115 /** 00116 */ 00117 virtual void tagVorticity(bool a_tagVorticity); 00118 00119 /// Tag buffer size 00120 /** 00121 */ 00122 virtual void tagBufferSize(int a_tagBufferSize); 00123 00124 /// MOLPhysics class 00125 /** 00126 */ 00127 virtual void molPhysics(const MOLPhysics* const a_molPhysics); 00128 00129 /// Initial dt multiplier 00130 /** 00131 */ 00132 void initialDtMultiplier(Real a_initialDtMultiplier); 00133 00134 /// Check that everything is defined 00135 /** 00136 */ 00137 virtual bool isDefined() const; 00138 00139 protected: 00140 00141 // Some default values 00142 virtual void setDefaultValues(); 00143 00144 virtual void transferSettings(AMRLevelCons* a_newPtr) const; 00145 00146 int m_verbosity; 00147 00148 // CFL number 00149 Real m_cfl; 00150 bool m_cflSet; 00151 // PhysIBC* m_cons_ibc; 00152 00153 /// spatial order of accuracy (default is 4) 00154 int m_spaceOrder; 00155 00156 /// if true, limit face values in advection 00157 bool m_limitFaceValues; 00158 00159 /// if true, use high-order limiter 00160 bool m_highOrderLimiter; 00161 00162 // if true, initial values are average 00163 bool m_initialAverage; 00164 00165 // if true, use flattening 00166 bool m_useFlattening; 00167 00168 // Avoid PPM? Default false. 00169 bool m_noPPM; 00170 00171 // Do deconvolution? Default yes. 00172 bool m_doDeconvolution; 00173 00174 // Do face deconvolution? Default yes. 00175 bool m_doFaceDeconvolution; 00176 00177 // use artificial viscosity (from divergence)? 00178 bool m_useArtificialViscosity; 00179 00180 // coefficient of artificial viscosity (from divergence) 00181 Real m_artificialViscosity; 00182 00183 // if true, use artificial viscosity 00184 bool m_useArtVisc; 00185 00186 // if m_useArtVisc, artificial viscosity coefficient 00187 Real m_ratioArtVisc; 00188 00189 // use forward Euler if true, or RK4 if false 00190 bool m_forwardEuler; 00191 00192 /// if true, enforce min value 00193 bool m_enforceMinVal; 00194 00195 /// min value to enforce 00196 Real m_minVal; 00197 00198 // Physical dimension of the longest side of the domain 00199 Real m_domainLength; 00200 bool m_domainLengthSet; 00201 00202 // Refinement threshold for gradient 00203 Real m_refineThresh; 00204 bool m_refineThreshSet; 00205 00206 // Whether refinement threshold is scaled with dx 00207 bool m_refinementIsScaled; 00208 00209 // Tag on pressure instead of on density? 00210 bool m_tagPressure; 00211 00212 // Tag on vorticity instead of on density? 00213 bool m_tagVorticity; 00214 00215 // Tag buffer size 00216 int m_tagBufferSize; 00217 bool m_tagBufferSizeSet; 00218 00219 // Initial dt multiplier 00220 Real m_initialDtMultiplier; 00221 bool m_initialDtMultiplierSet; 00222 00223 // Pointer to the object that supplies the physics needed by the integrator 00224 // (used as a factory here) 00225 const MOLPhysics* m_molPhysics; 00226 00227 private: 00228 00229 // Disallowed for all the usual reasons 00230 void operator=(const AMRLevelConsFactory& a_input); 00231 00232 // Disallowed for all the usual reasons 00233 AMRLevelConsFactory(const AMRLevelConsFactory& a_input); 00234 }; 00235 00236 #include "NamespaceFooter.H" 00237 00238 #endif
1.5.5