Chombo + EB + MF  3.2
LevelSourceTerm.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 _LEVELSOURCETERM_H_
12 #define _LEVELSOURCETERM_H_
13 
14 #include "MultiBlockCoordSys.H"
15 #include "MOLPhysics.H"
16 #include "LevelData.H"
17 #include "FArrayBox.H"
18 
19 #include "NamespaceHeader.H"
20 
22 {
23 public:
24 
25  /// Default constructor
27 
28  /// Destructor
29  virtual ~LevelSourceTerm();
30 
31  /// Define the object so that time stepping can begin (actual constructor)
32  virtual void define(MultiBlockCoordSys* const a_coordSysPtr,
33  const MOLPhysics* const a_molPhysics,
34  const DisjointBoxLayout& a_grids,
35  const RealVect & a_dx)
36  {
37  define(a_coordSysPtr, a_molPhysics, a_grids);
38  }
39 
40  /// Define the object so that time stepping can begin (actual constructor)
41  virtual void define(MultiBlockCoordSys* const a_coordSysPtr,
42  const MOLPhysics* const a_molPhysics,
43  const DisjointBoxLayout& a_grids);
44 
45  /// Object factory for this class. Pure virtual function.
46  /**
47  */
48  virtual LevelSourceTerm* new_sourceTerm() const = 0;
49 
50  /// Increment a_rhs by source term, using a_U. Pure = 0; virtual function.
51  virtual void addSourceTerm(LevelData<FArrayBox>& a_rhs,
53  {
54  MayDay::Error("not implemented");
55  }
56 
57  virtual void addSourceTerm(LevelData<FArrayBox>& a_rhs,
59  const RealVect & a_dx)
60  {
61  addSourceTerm(a_rhs, a_U);
62  }
63 
64 protected:
65 
67 
69 
71 
73 
74 private:
75 
76  // Disallowed for all the usual reasons
77  void operator=(const LevelSourceTerm&);
79 };
80 
81 #include "NamespaceFooter.H"
82 
83 #endif
DisjointBoxLayout m_grids
Definition: LevelSourceTerm.H:72
bool m_isDefined
Definition: LevelSourceTerm.H:66
virtual void define(MultiBlockCoordSys *const a_coordSysPtr, const MOLPhysics *const a_molPhysics, const DisjointBoxLayout &a_grids, const RealVect &a_dx)
Define the object so that time stepping can begin (actual constructor)
Definition: LevelSourceTerm.H:32
Definition: MOLPhysics.H:37
virtual void addSourceTerm(LevelData< FArrayBox > &a_rhs, LevelData< FArrayBox > &a_U)
Increment a_rhs by source term, using a_U. Pure = 0; virtual function.
Definition: LevelSourceTerm.H:51
const MOLPhysics * m_molPhysics
Definition: LevelSourceTerm.H:70
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
MultiBlockCoordSys * m_coordSysPtr
Definition: LevelSourceTerm.H:68
virtual interface class encapsulating multi-block mapping API
Definition: MultiBlockCoordSys.H:34
static void Error(const char *const a_msg=m_nullString, int m_exitCode=CH_DEFAULT_ERROR_CODE)
Print out message to cerr and exit with the specified exit code.
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
LevelSourceTerm()
Default constructor.
virtual void addSourceTerm(LevelData< FArrayBox > &a_rhs, LevelData< FArrayBox > &a_U, const RealVect &a_dx)
Definition: LevelSourceTerm.H:57
Definition: LevelSourceTerm.H:21
void operator=(const LevelSourceTerm &)
virtual LevelSourceTerm * new_sourceTerm() const =0
Object factory for this class. Pure virtual function.
virtual ~LevelSourceTerm()
Destructor.