The cut cells of one level of the polyhedral geometry, and what they connect to.
More...
|
|
| PolyhedralEBGraph () |
| | Constructor. Leaves the graph undefined.
|
| |
|
virtual | ~PolyhedralEBGraph () |
| | Destructor.
|
| |
| 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.
|
| |
| virtual void | define (const PolyhedralEBGraph &a_source, const DisjointBoxLayout &a_grids, const BaseIF &a_function) |
| | Build the graph of a level over a given layout, from another graph of the same level.
|
| |
| bool | equals (const PolyhedralEBGraph &a_other) const |
| | Whether another graph over the same layout holds the same cells, faces, mask and surfaces, bit for bit.
|
| |
| bool | isDefined () const noexcept |
| | Whether define has run.
|
| |
| const ProblemDomain & | getDomain () const noexcept |
| | The level's domain.
|
| |
| Real | getDx () const noexcept |
| | The level's grid spacing.
|
| |
| const DisjointBoxLayout & | getGrids () const noexcept |
| | The layout over the cut tiles.
|
| |
| const LayoutData< IntVectSet > & | getCutCells () const noexcept |
| | The cut cells of every box, its own and those of its ghost region that some tile carries.
|
| |
| 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. A signed char per cell, which is what the three values need. A ghost cell no tile carries is classified from its corners alone and has no surface even when cut; the face onto it is s_faceCoarser.
|
| |
| 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.
|
| |
| 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 has run.
|
| |
| 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.
|
| |
|
|
static constexpr int | s_covered = -1 |
| | Cell states, in the convention the polyhedral generator hands the index space.
|
| |
|
static constexpr int | s_cut = 0 |
| | Cell states, in the convention the polyhedral generator hands the index space.
|
| |
|
static constexpr int | s_regular = 1 |
| | Cell states, in the convention the polyhedral generator hands the index space.
|
| |
|
static constexpr int | s_faceClosed = 0 |
| | Face states: the face is closed, no fluid crosses it.
|
| |
|
static constexpr int | s_faceSameLevel = 1 |
| | Face states: the face opens onto a cell of this level.
|
| |
|
static constexpr int | s_faceFiner = 2 |
| | Face states: the face opens onto cells the finer level carries, and is described by them.
|
| |
|
static constexpr int | s_faceCoarser = 3 |
| | Face states: the face opens onto a cell no tile of this level carries, which the coarser level does.
|
| |
|
static constexpr int | s_faceBoundary = 4 |
| | Face states: the face lies in the domain boundary and is open.
|
| |
|
| void | defineGrids (const Vector< Box > &a_cutTiles) |
| | Build the layout over the tiles, load balanced by cell count.
|
| |
|
void | defineData () |
| | Allocate the per-cell containers over m_grids: the cut-cell sets, the cell states, the face states and the refined mask. The surfaces wait for the sets.
|
| |
| 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 cells some tile carries into each box's cut-cell set.
|
| |
| 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 another tile covers, zero elsewhere.
|
| |
| 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 with ghost cells, and set the face states the apertures decide.
|
| |
| 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 carries.
|
| |
|
|
bool | m_isDefined |
| | Whether define has run.
|
| |
|
int | m_numGhost |
| | Ghost cells the cell states are kept for.
|
| |
|
Real | m_dx |
| | Grid spacing of the level.
|
| |
|
RealVect | m_probLo |
| | Lower-left corner of the domain.
|
| |
|
ProblemDomain | m_domain |
| | Domain of the level.
|
| |
|
DisjointBoxLayout | m_grids |
| | Layout over the cut tiles.
|
| |
|
Vector< Box > | m_covered |
| | Cells of this level the finer level carries, coarsened onto this level.
|
| |
|
LayoutData< IntVectSet > | m_cutCells |
| | Cut cells of every box.
|
| |
|
LevelData< BaseFab< signed char > > | m_cellStates |
| | State of every cell, with ghost cells.
|
| |
|
LevelData< BaseFab< signed char > > | m_faceStates |
| | State of every face of every cell, component 2 * dir + side.
|
| |
|
LevelData< BaseFab< signed char > > | m_refined |
| | One where the finer level carries the cell.
|
| |
|
LevelData< IVSFAB< PolyhedralEB::CutCellSurface > > | m_surfaces |
| | Surface of every cut cell.
|
| |
The cut cells of one level of the polyhedral geometry, and what they connect to.
Holds, over the level's cut tiles, the classification of every cell, the surface every cut cell is reconstructed from, and for every face of every cell what lies across it: nothing, a cell of this level, a cell of the finer level, a cell of the coarser level, or the domain boundary. The surface is the source of everything else about a cut cell – its polyhedron and moments are rebuilt from it on demand – and it regrids: a coarse surface's corners are fine nodes and its crossings are the children's, and children are reconstructed from the implicit function. A cell whose face lies across a level boundary is not described by its own surface alone: the face is described by the level across it, which is what the face state records.
The graph covers the cut tiles only. A cell outside every tile is regular or covered, never cut, and which of the two is the geometry's box classification rather than the graph's business.
Built in two steps: define makes one level from its implicit function and its tiles, and knows about the domain boundary and about faces that open onto no tile of its own level; link, given two adjacent levels, marks the coarse cells the fine level carries and the coarse faces that open onto them.
| void PolyhedralEBGraph::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 |
|
) |
| |
|
virtual |
Build the graph of one level over its cut tiles.
Load balances the tiles by cell count, reconstructs every cell of every tile and its ghost region from the implicit function, classifies it as the polyhedral generator does, keeping every cell that holds anything – a body with nothing in it is a regular cell, and nothing else is discarded, since a cell's interface is what closes the surface against its neighbours – keeps the surface of every cut cell, and sets the face states this level can know by itself: closed or open from the apertures, open onto the domain boundary, and open onto a cell no tile of this level carries. Collective.
- Parameters
-
| [in] | a_function | Implicit function of the phase. |
| [in] | a_cutTiles | The level's cut tiles, identical on every rank. |
| [in] | a_domain | Domain of the level. |
| [in] | a_probLo | Lower-left corner of the domain. |
| [in] | a_dx | Grid spacing of the level. |
| [in] | a_numGhost | Ghost cells the cell states are kept for. |
| [in] | a_covered | Cells of this level the finer level will carry, coarsened onto this level. A cell in them is described up there and is not filled down here. |
| void PolyhedralEBGraph::findUnresolvedCells |
( |
const BaseFab< Real > & |
a_nodeValues, |
|
|
const Box & |
a_region, |
|
|
const Vector< Box > & |
a_covered, |
|
|
BaseFab< bool > & |
a_unresolved |
|
) |
| |
|
static |
Find the cells of a region that hold more than one sheet of interface.
Downstream holds one body and one interface to a cell, so a cell the surface enters as several sheets cannot be described at all. Such a cell is filled rather than built, which is the only reading that stays single valued and keeps a barrier thinner than a cell a barrier instead of letting the fluid run through it. Filling is a classification and changes no value another level reads, so the children a coarse cell restricts against still agree with it about where every edge is crossed – which is what a snap of the nodes themselves cannot promise.
A cell the finer level carries is left alone: the feature is resolved up there, and this level's reading of it is not the one that gets used. Only the combinatorics are read, so no root is solved for here.
Nothing is counted here. The region a caller asks about reaches past the cells it owns, so that a cell can see whether its neighbours were filled, and those reaches overlap between neighbouring boxes; a count taken here would report a cell near a box boundary once for every box that reaches it. The caller counts over the cells it owns.
- Parameters
-
| [in] | a_nodeValues | Node values of the region. |
| [in] | a_region | Cells to ask. |
| [in] | a_covered | Cells a finer level carries. |
| [out] | a_unresolved | True for each cell of the region that must be filled. |