chombo-discharge
CD_MFLevelGrid.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2021 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_MFLevelGrid_H
13 #define CD_MFLevelGrid_H
14 
15 // Std includes
16 #include <map>
17 
18 // Chombo includes
19 #include <EBLevelGrid.H>
20 
21 // Our includes
23 #include <CD_NamespaceHeader.H>
24 
29 {
30 public:
34  MFLevelGrid();
35 
43  MFLevelGrid(const DisjointBoxLayout& a_dbl,
44  const ProblemDomain& a_domain,
45  const int a_ebghost,
46  const RefCountedPtr<MultiFluidIndexSpace>& a_mfis);
47 
53  MFLevelGrid(const RefCountedPtr<MultiFluidIndexSpace>& a_multiFluidIndexSpace, const Vector<EBLevelGrid>& a_eblgs);
54 
58  virtual ~MFLevelGrid();
59 
63  virtual int
64  numPhases() const;
65 
71  virtual void
72  define(const RefCountedPtr<MultiFluidIndexSpace>& a_multiFluidIndexSpace, const Vector<EBLevelGrid>& a_eblgs);
73 
78  virtual void
79  setMaxRefinementRatio(const int a_refRat);
80 
84  virtual const RefCountedPtr<MultiFluidIndexSpace>&
85  getMfIndexSpace() const;
86 
90  virtual ProblemDomain
91  getDomain() const;
92 
96  virtual DisjointBoxLayout
97  getGrids() const;
98 
103  virtual EBLevelGrid&
104  getEBLevelGrid(int a_phase);
105 
110  virtual const EBLevelGrid&
111  getEBLevelGrid(int a_phase) const;
112 
121  virtual IntVectSet
122  interfaceRegion(const Box& a_box, const DataIndex& a_dit, const int a_phase1 = 0, const int a_phase2 = 1) const;
123 
124 #if 0 // Taken out of chombo-discharge for now
128  virtual bool interfacePair(IntVect& a_iv,
129  const IntVect& a_iv_in,
130  const Box& a_box,
131  const DataIndex& a_dit,
132  const int a_phase1 = 0,
133  const int a_phase2 = 1) const;
134 #endif
135 
136 private:
140  RefCountedPtr<MultiFluidIndexSpace> m_multifluidIndexSpace;
141 
145  Vector<EBLevelGrid> m_eblg;
146 };
147 
148 #include <CD_NamespaceFooter.H>
149 
150 #endif
Multi-fluid index space.
Wrapper class for holding multifluid EBLevelGrids.
Definition: CD_MFLevelGrid.H:29
virtual ProblemDomain getDomain() const
Get the problem domain.
Definition: CD_MFLevelGrid.cpp:72
virtual int numPhases() const
Get number of phases.
Definition: CD_MFLevelGrid.cpp:52
virtual void setMaxRefinementRatio(const int a_refRat)
Set max refinement ratio.
Definition: CD_MFLevelGrid.cpp:21
virtual DisjointBoxLayout getGrids() const
Get the grids.
Definition: CD_MFLevelGrid.cpp:78
virtual IntVectSet interfaceRegion(const Box &a_box, const DataIndex &a_dit, const int a_phase1=0, const int a_phase2=1) const
Get interface region between two phases.
Definition: CD_MFLevelGrid.cpp:98
MFLevelGrid()
Weak constructor, must subsequently call define.
Definition: CD_MFLevelGrid.cpp:17
virtual ~MFLevelGrid()
Destructor.
Definition: CD_MFLevelGrid.cpp:48
virtual const RefCountedPtr< MultiFluidIndexSpace > & getMfIndexSpace() const
Get the index space.
Definition: CD_MFLevelGrid.cpp:66
virtual void define(const RefCountedPtr< MultiFluidIndexSpace > &a_multiFluidIndexSpace, const Vector< EBLevelGrid > &a_eblgs)
Define function.
Definition: CD_MFLevelGrid.cpp:58
virtual EBLevelGrid & getEBLevelGrid(int a_phase)
Get grids on specified phase.
Definition: CD_MFLevelGrid.cpp:84