13#ifndef CD_POLYHEDRALEBGRAPH_H
14#define CD_POLYHEDRALEBGRAPH_H
19#include <DisjointBoxLayout.H>
21#include <IntVectSet.H>
22#include <LayoutData.H>
24#include <ProblemDomain.H>
29#include <CD_NamespaceHeader.H>
119 define(
const BaseIF& a_function,
120 const Vector<Box>& a_cutTiles,
121 const ProblemDomain& a_domain,
122 const RealVect& a_probLo,
124 const int a_numGhost,
125 const Vector<Box>& a_covered);
188 const Vector<Box>& a_covered,
189 BaseFab<bool>& a_unresolved);
210 getDx() const noexcept;
216 const DisjointBoxLayout&
223 const LayoutData<IntVectSet>&
232 const LevelData<BaseFab<
signed char>>&
239 const LevelData<BaseFab<
signed char>>&
247 const LevelData<BaseFab<
signed char>>&
254 const LevelData<IVSFAB<PolyhedralEB::CutCellSurface>>&
340 defineGhostCells(const BaseIF& a_function, const LevelData<BaseFab<
signed char>>& a_carried);
348 markCarried(LevelData<BaseFab<
signed char>>& a_carried) const;
357 defineCells(const BaseIF& a_function, const LevelData<BaseFab<
signed char>>& a_carried);
367#include <CD_NamespaceFooter.H>
Declaration of the data a cut cell's embedded boundary is reconstructed from.
The cut cells of one level of the polyhedral geometry, and what they connect to.
Definition CD_PolyhedralEBGraph.H:49
static constexpr int s_cut
Cell states, in the convention the polyhedral generator hands the index space.
Definition CD_PolyhedralEBGraph.H:59
bool isDefined() const noexcept
Whether define has run.
Definition CD_PolyhedralEBGraph.cpp:732
void defineOuterFaces(const LevelData< BaseFab< signed char > > &a_carried)
Mark the open faces that lie in the domain boundary, and those onto cells no tile of this level carri...
Definition CD_PolyhedralEBGraph.cpp:621
void defineCells(const BaseIF &a_function, const LevelData< BaseFab< signed char > > &a_carried)
Reconstruct and classify every cell of every box and its ghost region, keep the cut cells' surfaces w...
Definition CD_PolyhedralEBGraph.cpp:180
const LevelData< BaseFab< signed char > > & getRefinedMask() const noexcept
Whether the finer level carries a cell, one where it does, with two ghost cells; all zero until link ...
Definition CD_PolyhedralEBGraph.cpp:774
const DisjointBoxLayout & getGrids() const noexcept
The layout over the cut tiles.
Definition CD_PolyhedralEBGraph.cpp:750
virtual ~PolyhedralEBGraph()
Destructor.
Definition CD_PolyhedralEBGraph.cpp:36
const ProblemDomain & getDomain() const noexcept
The level's domain.
Definition CD_PolyhedralEBGraph.cpp:738
bool m_isDefined
Whether define has run.
Definition CD_PolyhedralEBGraph.H:261
static constexpr int s_faceSameLevel
Face states: the face opens onto a cell of this level.
Definition CD_PolyhedralEBGraph.H:74
void defineGhostCells(const BaseIF &a_function, const LevelData< BaseFab< signed char > > &a_carried)
Classify the ghost cells no tile of this level carries from their corners, and take the ghost cut cel...
Definition CD_PolyhedralEBGraph.cpp:366
LayoutData< IntVectSet > m_cutCells
Cut cells of every box.
Definition CD_PolyhedralEBGraph.H:296
void markCarried(LevelData< BaseFab< signed char > > &a_carried) const
Mark the cells some tile of this level carries: one in every valid cell and in every ghost cell anoth...
Definition CD_PolyhedralEBGraph.cpp:604
const LayoutData< IntVectSet > & getCutCells() const noexcept
The cut cells of every box, its own and those of its ghost region that some tile carries.
Definition CD_PolyhedralEBGraph.cpp:756
bool equals(const PolyhedralEBGraph &a_other) const
Whether another graph over the same layout holds the same cells, faces, mask and surfaces,...
Definition CD_PolyhedralEBGraph.cpp:542
ProblemDomain m_domain
Domain of the level.
Definition CD_PolyhedralEBGraph.H:281
Real m_dx
Grid spacing of the level.
Definition CD_PolyhedralEBGraph.H:271
static constexpr int s_regular
Cell states, in the convention the polyhedral generator hands the index space.
Definition CD_PolyhedralEBGraph.H:64
static constexpr int s_faceCoarser
Face states: the face opens onto a cell no tile of this level carries, which the coarser level does.
Definition CD_PolyhedralEBGraph.H:84
static void link(PolyhedralEBGraph &a_coarse, const PolyhedralEBGraph &a_fine)
Mark, on the coarse level, the cells the fine level carries and the faces that open onto them.
Definition CD_PolyhedralEBGraph.cpp:659
LevelData< IVSFAB< PolyhedralEB::CutCellSurface > > m_surfaces
Surface of every cut cell.
Definition CD_PolyhedralEBGraph.H:316
int m_numGhost
Ghost cells the cell states are kept for.
Definition CD_PolyhedralEBGraph.H:266
PolyhedralEBGraph()
Constructor. Leaves the graph undefined.
Definition CD_PolyhedralEBGraph.cpp:30
static void findUnresolvedCells(const BaseFab< Real > &a_nodeValues, const Box &a_region, const Vector< Box > &a_covered, BaseFab< bool > &a_unresolved)
Find the cells of a region that hold more than one sheet of interface.
Definition CD_PolyhedralEBGraph.cpp:121
const LevelData< BaseFab< signed char > > & getFaceStates() const noexcept
The state of every face of every cell, one of the s_face constants; component 2 * dir + side.
Definition CD_PolyhedralEBGraph.cpp:768
void defineGrids(const Vector< Box > &a_cutTiles)
Build the layout over the tiles, load balanced by cell count.
Definition CD_PolyhedralEBGraph.cpp:79
static constexpr int s_faceClosed
Face states: the face is closed, no fluid crosses it.
Definition CD_PolyhedralEBGraph.H:69
RealVect m_probLo
Lower-left corner of the domain.
Definition CD_PolyhedralEBGraph.H:276
static constexpr int s_faceBoundary
Face states: the face lies in the domain boundary and is open.
Definition CD_PolyhedralEBGraph.H:89
static constexpr int s_faceFiner
Face states: the face opens onto cells the finer level carries, and is described by them.
Definition CD_PolyhedralEBGraph.H:79
LevelData< BaseFab< signed char > > m_refined
One where the finer level carries the cell.
Definition CD_PolyhedralEBGraph.H:311
const LevelData< IVSFAB< PolyhedralEB::CutCellSurface > > & getSurfaces() const noexcept
The surface every cut cell is reconstructed from, in the box's own cells and in its ghost cells.
Definition CD_PolyhedralEBGraph.cpp:780
LevelData< BaseFab< signed char > > m_faceStates
State of every face of every cell, component 2 * dir + side.
Definition CD_PolyhedralEBGraph.H:306
static constexpr int s_covered
Cell states, in the convention the polyhedral generator hands the index space.
Definition CD_PolyhedralEBGraph.H:54
void defineData()
Allocate the per-cell containers over m_grids: the cut-cell sets, the cell states,...
Definition CD_PolyhedralEBGraph.cpp:101
virtual void define(const BaseIF &a_function, const Vector< Box > &a_cutTiles, const ProblemDomain &a_domain, const RealVect &a_probLo, const Real a_dx, const int a_numGhost, const Vector< Box > &a_covered)
Build the graph of one level over its cut tiles.
Definition CD_PolyhedralEBGraph.cpp:42
Vector< Box > m_covered
Cells of this level the finer level carries, coarsened onto this level.
Definition CD_PolyhedralEBGraph.H:291
LevelData< BaseFab< signed char > > m_cellStates
State of every cell, with ghost cells.
Definition CD_PolyhedralEBGraph.H:301
Real getDx() const noexcept
The level's grid spacing.
Definition CD_PolyhedralEBGraph.cpp:744
const LevelData< BaseFab< signed char > > & getCellStates() const noexcept
The state of every cell, s_covered, s_cut or s_regular, with ghost cells filled from the geometry....
Definition CD_PolyhedralEBGraph.cpp:762
DisjointBoxLayout m_grids
Layout over the cut tiles.
Definition CD_PolyhedralEBGraph.H:286