Chombo + EB + MF  3.2
AMRLevelConsFactory.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _AMRLEVELCONSFACTORY_H_
12 #define _AMRLEVELCONSFACTORY_H_
13 
14 #include "AMRLevelFactory.H"
15 #include "AMRLevelCons.H"
16 
17 #include "NamespaceHeader.H"
18 
19 /// AMR Cons Equation factory
20 /**
21  */
23 {
24 public:
25  /// Null constructor
26  /**
27  */
29 
30  /// Virtual constructor
31  /**
32  */
33  virtual AMRLevel* new_amrlevel() const;
34 
35  /// Destructor
36  /**
37  */
38  virtual ~AMRLevelConsFactory();
39 
40  /// CFL number
41  /**
42  */
43  virtual void CFL(Real a_cfl);
44 
45  /// spatial order of accuracy (default is 4)
46  virtual void spaceOrder(int a_spaceOrder);
47 
48  /// sets whether to limit face values in advection (default is false)
49  virtual void limitFaceValues(bool a_limitFaceValues);
50 
51  /// sets whether to use high-order limiter (default is true)
52  virtual void highOrderLimiter(bool a_highOrderLimiter);
53 
54  /// sets whether initial data is average; default false
55  virtual void initialAverage(bool a_initialAverage);
56 
57  /// sets whether to flatten extrapolations to faces
58  virtual void useFlattening(bool a_useFlattening);
59 
60  /// sets whether to turn PPM off
61  virtual void noPPM(bool a_noPPM);
62 
63  /// sets m_doDeconvolution
64  virtual void doDeconvolution(bool a_doDeconvolution);
65 
66  /// sets m_doFaceDeconvolution
67  virtual void doFaceDeconvolution(bool a_doFaceDeconvolution);
68 
69  /// sets whether to use artificial viscosity (from divergence)
70  virtual void useArtificialViscosity(bool a_useArtificialViscosity);
71 
72  /// sets coefficient of artificial viscosity (from divergence)
73  virtual void artificialViscosity(Real a_artificialViscosity);
74 
75  /// sets whether to use artificial viscosity
76  virtual void useArtVisc(bool a_useArtVisc);
77 
78  /// sets coefficient of artificial viscosity
79  virtual void ratioArtVisc(Real a_ratioArtVisc);
80 
81  /// sets whether forward Euler is used (instead of RK4)
82  virtual void forwardEuler(bool a_forwardEuler);
83 
84  /// sets whether to enforce a min value in advection, along with valeu
85  virtual void enforceMinVal(bool a_enforceMinVal, Real a_minVal);
86 
87  /// Physical dimension of the longest side of the domain
88  /**
89  */
90  virtual void domainLength(Real a_domainLength);
91 
92  void x0(const Real& a_x0);
93 
94  ///
95  /**
96  */
97  virtual void verbosity(const int& verbosity);
98 
99  /// Refinement threshold
100  /**
101  */
102  virtual void refinementThreshold(Real a_refineThresh);
103 
104  /// Set whether refinement threshold is scaled with dx
105  /**
106  */
107  virtual void refinementIsScaled(bool a_refinementIsScaled);
108 
109  /// Set whether to tag on pressure instead of on density
110  /**
111  */
112  virtual void tagPressure(bool a_tagPressure);
113 
114  /// Set whether to tag on vorticity instead of on density
115  /**
116  */
117  virtual void tagVorticity(bool a_tagVorticity);
118 
119  /// Tag buffer size
120  /**
121  */
122  virtual void tagBufferSize(int a_tagBufferSize);
123 
124  /// MOLPhysics class
125  /**
126  */
127  virtual void molPhysics(const MOLPhysics* const a_molPhysics);
128 
129  /// Initial dt multiplier
130  /**
131  */
132  void initialDtMultiplier(Real a_initialDtMultiplier);
133 
134  /// Check that everything is defined
135  /**
136  */
137  virtual bool isDefined() const;
138 
139 protected:
140 
141  // Some default values
142  virtual void setDefaultValues();
143 
144  virtual void transferSettings(AMRLevelCons* a_newPtr) const;
145 
147 
148  // CFL number
150  bool m_cflSet;
151  // PhysIBC* m_cons_ibc;
152 
153  /// spatial order of accuracy (default is 4)
155 
156  /// if true, limit face values in advection
158 
159  /// if true, use high-order limiter
161 
162  // if true, initial values are average
164 
165  // if true, use flattening
167 
168  // Avoid PPM? Default false.
169  bool m_noPPM;
170 
171  // Do deconvolution? Default yes.
173 
174  // Do face deconvolution? Default yes.
176 
177  // use artificial viscosity (from divergence)?
179 
180  // coefficient of artificial viscosity (from divergence)
182 
183  // if true, use artificial viscosity
185 
186  // if m_useArtVisc, artificial viscosity coefficient
188 
189  // use forward Euler if true, or RK4 if false
191 
192  /// if true, enforce min value
194 
195  /// min value to enforce
197 
198  // Physical dimension of the longest side of the domain
201 
202  // Refinement threshold for gradient
205 
206  // Whether refinement threshold is scaled with dx
208 
209  // Tag on pressure instead of on density?
211 
212  // Tag on vorticity instead of on density?
214 
215  // Tag buffer size
218 
219  // Initial dt multiplier
222 
223  // Pointer to the object that supplies the physics needed by the integrator
224  // (used as a factory here)
226 
227 private:
228 
229  // Disallowed for all the usual reasons
230  void operator=(const AMRLevelConsFactory& a_input);
231 
232  // Disallowed for all the usual reasons
234 };
235 
236 #include "NamespaceFooter.H"
237 
238 #endif
virtual void useArtificialViscosity(bool a_useArtificialViscosity)
sets whether to use artificial viscosity (from divergence)
AMRLevelConsFactory()
Null constructor.
int m_spaceOrder
spatial order of accuracy (default is 4)
Definition: AMRLevelConsFactory.H:154
virtual void spaceOrder(int a_spaceOrder)
spatial order of accuracy (default is 4)
Real m_minVal
min value to enforce
Definition: AMRLevelConsFactory.H:196
virtual void molPhysics(const MOLPhysics *const a_molPhysics)
MOLPhysics class.
virtual void doFaceDeconvolution(bool a_doFaceDeconvolution)
sets m_doFaceDeconvolution
virtual void forwardEuler(bool a_forwardEuler)
sets whether forward Euler is used (instead of RK4)
virtual void domainLength(Real a_domainLength)
Physical dimension of the longest side of the domain.
virtual void useArtVisc(bool a_useArtVisc)
sets whether to use artificial viscosity
virtual void tagVorticity(bool a_tagVorticity)
Set whether to tag on vorticity instead of on density.
bool m_cflSet
Definition: AMRLevelConsFactory.H:150
virtual void enforceMinVal(bool a_enforceMinVal, Real a_minVal)
sets whether to enforce a min value in advection, along with valeu
Abstract base class for time-dependent data at a level of refinement.
Definition: AMRLevel.H:47
virtual void setDefaultValues()
Definition: MOLPhysics.H:37
virtual void highOrderLimiter(bool a_highOrderLimiter)
sets whether to use high-order limiter (default is true)
Real m_domainLength
Definition: AMRLevelConsFactory.H:199
virtual void transferSettings(AMRLevelCons *a_newPtr) const
AMR Level for fourth-order solution to conservation law.
Definition: AMRLevelCons.H:32
Real m_initialDtMultiplier
Definition: AMRLevelConsFactory.H:220
Real m_refineThresh
Definition: AMRLevelConsFactory.H:203
virtual void verbosity(const int &verbosity)
bool m_highOrderLimiter
if true, use high-order limiter
Definition: AMRLevelConsFactory.H:160
bool m_noPPM
Definition: AMRLevelConsFactory.H:169
Real m_ratioArtVisc
Definition: AMRLevelConsFactory.H:187
bool m_refinementIsScaled
Definition: AMRLevelConsFactory.H:207
virtual void refinementThreshold(Real a_refineThresh)
Refinement threshold.
void operator=(const AMRLevelConsFactory &a_input)
bool m_forwardEuler
Definition: AMRLevelConsFactory.H:190
const MOLPhysics * m_molPhysics
Definition: AMRLevelConsFactory.H:225
bool m_tagPressure
Definition: AMRLevelConsFactory.H:210
virtual void initialAverage(bool a_initialAverage)
sets whether initial data is average; default false
Real m_cfl
Definition: AMRLevelConsFactory.H:149
bool m_refineThreshSet
Definition: AMRLevelConsFactory.H:204
void initialDtMultiplier(Real a_initialDtMultiplier)
Initial dt multiplier.
AMR Cons Equation factory.
Definition: AMRLevelConsFactory.H:22
virtual void ratioArtVisc(Real a_ratioArtVisc)
sets coefficient of artificial viscosity
double Real
Definition: REAL.H:33
virtual void refinementIsScaled(bool a_refinementIsScaled)
Set whether refinement threshold is scaled with dx.
bool m_initialAverage
Definition: AMRLevelConsFactory.H:163
int m_verbosity
Definition: AMRLevelConsFactory.H:146
virtual void CFL(Real a_cfl)
CFL number.
bool m_enforceMinVal
if true, enforce min value
Definition: AMRLevelConsFactory.H:193
bool m_doFaceDeconvolution
Definition: AMRLevelConsFactory.H:175
virtual void tagPressure(bool a_tagPressure)
Set whether to tag on pressure instead of on density.
virtual ~AMRLevelConsFactory()
Destructor.
bool m_initialDtMultiplierSet
Definition: AMRLevelConsFactory.H:221
bool m_useArtificialViscosity
Definition: AMRLevelConsFactory.H:178
bool m_useFlattening
Definition: AMRLevelConsFactory.H:166
virtual void tagBufferSize(int a_tagBufferSize)
Tag buffer size.
bool m_useArtVisc
Definition: AMRLevelConsFactory.H:184
virtual void limitFaceValues(bool a_limitFaceValues)
sets whether to limit face values in advection (default is false)
virtual void useFlattening(bool a_useFlattening)
sets whether to flatten extrapolations to faces
bool m_limitFaceValues
if true, limit face values in advection
Definition: AMRLevelConsFactory.H:157
Factory class to produce an AMRLevel.
Definition: AMRLevelFactory.H:22
virtual void doDeconvolution(bool a_doDeconvolution)
sets m_doDeconvolution
virtual AMRLevel * new_amrlevel() const
Virtual constructor.
Real m_artificialViscosity
Definition: AMRLevelConsFactory.H:181
virtual void noPPM(bool a_noPPM)
sets whether to turn PPM off
bool m_domainLengthSet
Definition: AMRLevelConsFactory.H:200
bool m_doDeconvolution
Definition: AMRLevelConsFactory.H:172
bool m_tagBufferSizeSet
Definition: AMRLevelConsFactory.H:217
bool m_tagVorticity
Definition: AMRLevelConsFactory.H:213
int m_tagBufferSize
Definition: AMRLevelConsFactory.H:216
virtual bool isDefined() const
Check that everything is defined.
void x0(const Real &a_x0)
virtual void artificialViscosity(Real a_artificialViscosity)
sets coefficient of artificial viscosity (from divergence)