chombo-discharge
CD_MultiFluidIndexSpace.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_MultiFluidIndexSpace_H
13 #define CD_MultiFluidIndexSpace_H
14 
15 // Chombo includes
16 #include <GeometryService.H>
17 #include <EBIndexSpace.H>
18 #include <RealVect.H>
19 #include <MFIndexSpace.H>
20 
21 // Our includes
22 #include <CD_NamespaceHeader.H>
23 
27 namespace phase {
28  const int numPhases = 2;
29 
30  enum which_phase
31  {
32  gas = 0,
33  solid = 1
34  };
35 } // namespace phase
36 
42 {
43 public:
48 
52  virtual ~MultiFluidIndexSpace();
53 
65  virtual void
66  define(const Box& a_domain,
67  const RealVect& a_origin,
68  const Real& a_dx,
69  const Vector<GeometryService*>& a_geoservers,
70  const bool a_distributedData,
71  int a_nCellMax = -1,
72  int a_maxCoarsenings = -1,
73  bool a_fixOnlyFirstPhaseRegNextToMultiValued = false);
74 
79  const RefCountedPtr<EBIndexSpace>&
80  getEBIndexSpace(const phase::which_phase a_phase) const;
81 
86  const RefCountedPtr<EBIndexSpace>&
87  getEBIndexSpace(const int a_phase) const;
88 
93  RefCountedPtr<EBIndexSpace>&
94  getEBIndexSpace(const phase::which_phase a_phase);
95 
100  RefCountedPtr<EBIndexSpace>&
101  getEBIndexSpace(const int a_phase);
102 
108  IntVectSet
109  interfaceRegion(const ProblemDomain& a_domain) const;
110 
114  int
115  numPhases() const;
116 
117 protected:
121  Vector<RefCountedPtr<EBIndexSpace>> m_ebis;
122 
126  RefCountedPtr<MFIndexSpace> m_multifluidIndexSpace;
127 };
128 
129 #include <CD_NamespaceFooter.H>
130 
131 #endif
Two-fluid index space.
Definition: CD_MultiFluidIndexSpace.H:42
MultiFluidIndexSpace()
Weak constructor. Must call define later.
Definition: CD_MultiFluidIndexSpace.cpp:20
virtual void define(const Box &a_domain, const RealVect &a_origin, const Real &a_dx, const Vector< GeometryService * > &a_geoservers, const bool a_distributedData, int a_nCellMax=-1, int a_maxCoarsenings=-1, bool a_fixOnlyFirstPhaseRegNextToMultiValued=false)
Define function.
Definition: CD_MultiFluidIndexSpace.cpp:32
virtual ~MultiFluidIndexSpace()
Destructor.
Definition: CD_MultiFluidIndexSpace.cpp:28
IntVectSet interfaceRegion(const ProblemDomain &a_domain) const
Get the interface region. This is defined as the intersection between the irregular cells of the gas ...
Definition: CD_MultiFluidIndexSpace.cpp:102
Vector< RefCountedPtr< EBIndexSpace > > m_ebis
EBIndexSpaces.
Definition: CD_MultiFluidIndexSpace.H:121
const RefCountedPtr< EBIndexSpace > & getEBIndexSpace(const phase::which_phase a_phase) const
Get a particular EBIndexSpace.
Definition: CD_MultiFluidIndexSpace.cpp:65
RefCountedPtr< MFIndexSpace > m_multifluidIndexSpace
MFIndexSpace.
Definition: CD_MultiFluidIndexSpace.H:126
int numPhases() const
Get number of phases.
Definition: CD_MultiFluidIndexSpace.cpp:89
phase names
Definition: CD_MultiFluidIndexSpace.H:27