chombo-discharge
Loading...
Searching...
No Matches
CD_MultiFluidIndexSpace.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
12
13#ifndef CD_MULTIFLUIDINDEXSPACE_H
14#define CD_MULTIFLUIDINDEXSPACE_H
15
16// Chombo includes
17#include <GeometryService.H>
18#include <EBIndexSpace.H>
19#include <RealVect.H>
20#include <MFIndexSpace.H>
21
22// Our includes
23#include <CD_NamespaceHeader.H>
24
28namespace phase {
32const int numPhases = 2;
33
38{
39 gas = 0,
40 solid = 1
41};
42} // namespace phase
43
50{
51public:
56
61
71 void
72 define(const Vector<ProblemDomain>& a_domains,
73 const RealVect& a_origin,
74 const Real a_finestDx,
75 const Vector<EBISLayout::Filler>& a_fillers);
76
88 virtual void
89 define(const Box& a_domain,
90 const RealVect& a_origin,
91 const Real& a_dx,
92 const Vector<GeometryService*>& a_geoservers,
93 const bool a_distributedData,
94 int a_nCellMax = -1,
95 int a_max_coar = -1,
96 bool a_fixOnlyFirstPhaseRegNextToMultiValued = false);
97
103 const RefCountedPtr<EBIndexSpace>&
104 getEBIndexSpace(const phase::which_phase a_phase) const;
105
111 const RefCountedPtr<EBIndexSpace>&
112 getEBIndexSpace(const int a_phase) const;
113
119 RefCountedPtr<EBIndexSpace>&
120 getEBIndexSpace(const phase::which_phase a_phase);
121
127 RefCountedPtr<EBIndexSpace>&
128 getEBIndexSpace(const int a_phase);
129
138 IntVectSet
139 interfaceRegion(const IntVectSet& a_gasCutCells, const IntVectSet& a_solidCutCells) const;
140
145 int
146 numPhases() const;
147
148protected:
152 Vector<RefCountedPtr<EBIndexSpace>> m_ebis;
153
157 RefCountedPtr<MFIndexSpace> m_multifluidIndexSpace;
158};
159
160#include <CD_NamespaceFooter.H>
161
162#endif
MultiFluidIndexSpace()
Weak constructor. Must call define later.
Definition CD_MultiFluidIndexSpace.cpp:21
virtual ~MultiFluidIndexSpace()
Destructor.
void define(const Vector< ProblemDomain > &a_domains, const RealVect &a_origin, const Real a_finestDx, const Vector< EBISLayout::Filler > &a_fillers)
Define the index spaces in filler mode: each phase's EBIndexSpace fills every layout through its fill...
Definition CD_MultiFluidIndexSpace.cpp:65
Vector< RefCountedPtr< EBIndexSpace > > m_ebis
EBIndexSpaces.
Definition CD_MultiFluidIndexSpace.H:152
const RefCountedPtr< EBIndexSpace > & getEBIndexSpace(const phase::which_phase a_phase) const
Get a particular EBIndexSpace.
Definition CD_MultiFluidIndexSpace.cpp:91
RefCountedPtr< MFIndexSpace > m_multifluidIndexSpace
MFIndexSpace.
Definition CD_MultiFluidIndexSpace.H:157
int numPhases() const
Get number of phases.
Definition CD_MultiFluidIndexSpace.cpp:115
IntVectSet interfaceRegion(const IntVectSet &a_gasCutCells, const IntVectSet &a_solidCutCells) const
Get the interface region: the cells cut in both phases.
Definition CD_MultiFluidIndexSpace.cpp:128
Phase names namespace.
Definition CD_MultiFluidIndexSpace.H:28
which_phase
Enumeration of supported phases.
Definition CD_MultiFluidIndexSpace.H:38
@ solid
Solid (dielectric) phase.
Definition CD_MultiFluidIndexSpace.H:40
@ gas
Gas phase.
Definition CD_MultiFluidIndexSpace.H:39
const int numPhases
Number of supported phases.
Definition CD_MultiFluidIndexSpace.H:32