Chombo + EB + MF  3.2
AMRLevelMappedStabilityStrategy.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 _AMRLEVELMAPPEDSTABILITYSTRATEGY_H_
12 #define _AMRLEVELMAPPEDSTABILITYSTRATEGY_H_
13 
14 #include "MOLPhysics.H"
15 #include "LevelGridMetrics.H"
16 #include "MappedLevelData.H"
17 
18 #include "NamespaceHeader.H"
19 
20 //! \class AMRLevelMappedStabilityStrategy
21 //! This class defines an interface for computing quantities needed for
22 //! deciding on a stable time step for high-order mapped AMR algorithms.
24 {
25  public:
26 
27  //! Base class strategy constructor. Must be called by all subclasses.
28  //! \param a_stabilityFactor The factor representing the broadest height of the region
29  //! of stability for the time integrator of interest.
30  explicit AMRLevelMappedStabilityStrategy(Real a_stabilityFactor);
31 
32  /// Destructor.
34 
35  //! This returns the maximum allowable time step (without a CFL safety factor.
36  //! \param a_data The mapped grid data to be used in determining the time step.
37  //! \param a_dx The grid spacing that determines the time step.
38  //! \param a_time The time at which the time step is computed.
39  Real maxTimeStep(const ProblemDomain& a_problem_domain,
40  const DisjointBoxLayout& a_grids,
41  const LevelGridMetrics* const a_gridMetrics,
42  const MOLPhysics& a_physics,
43  const MappedLevelData& a_data,
44  Real a_dx,
45  Real a_time) const;
46 
47  //! Override this method to determine the maximum wave speed
48  //! on the computational domain.
49  //! \param a_data The mapped grid data to be used in determining the wave speed.
50  virtual Real maxWaveSpeed(const ProblemDomain& a_problem_domain,
51  const DisjointBoxLayout& a_grids,
52  const LevelGridMetrics* const a_gridMetrics,
53  const MOLPhysics& a_physics,
54  const MappedLevelData& a_data,
55  Real a_dx,
56  Real a_time) const = 0;
57 
58  //! Override this method to create a new AMRLevelMappedStabilityStrategy instance.
59  virtual AMRLevelMappedStabilityStrategy* clone() const = 0;
60 
61  protected:
62 
63  //! The stability factor.
65 
66  private:
67 
68  // Default constructor, copy and assignment not allowed
72 };
73 
74 #include "NamespaceFooter.H"
75 
76 #endif
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
Grid metrics on and between levels.
Solution data on a level for mapped grids.
Definition: MappedLevelData.H:54
Definition: MOLPhysics.H:37
virtual ~AMRLevelMappedStabilityStrategy()
Destructor.
Real maxTimeStep(const ProblemDomain &a_problem_domain, const DisjointBoxLayout &a_grids, const LevelGridMetrics *const a_gridMetrics, const MOLPhysics &a_physics, const MappedLevelData &a_data, Real a_dx, Real a_time) const
Definition: AMRLevelMappedStabilityStrategy.H:23
virtual AMRLevelMappedStabilityStrategy * clone() const =0
Override this method to create a new AMRLevelMappedStabilityStrategy instance.
Real m_stabilityFactor
The stability factor.
Definition: AMRLevelMappedStabilityStrategy.H:64
double Real
Definition: REAL.H:33
Grid metrics for a level.
Definition: LevelGridMetrics.H:223
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
Maintenance of <U> and <JU>
virtual Real maxWaveSpeed(const ProblemDomain &a_problem_domain, const DisjointBoxLayout &a_grids, const LevelGridMetrics *const a_gridMetrics, const MOLPhysics &a_physics, const MappedLevelData &a_data, Real a_dx, Real a_time) const =0
AMRLevelMappedStabilityStrategy & operator=(const AMRLevelMappedStabilityStrategy &)