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, const PolyhedralEBGraph *a_coarser, const bool a_fillSplitFluid) |
| | 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.
|
| long long | spreadAnchors () |
| | Spread anchoring through the open faces of this level until it stops.
|
|
void | anchorUncarriedCells () |
| | Anchor every cut ghost cell no tile carries, for a level with no coarser graph to answer for them.
|
| long long | fillSealedCells () |
| | Fill every cut cell anchoring did not reach, and let go of the anchoring.
|
| 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 cell of the surface sets is reconstructed from, in the box's own cells and in its ghost cells. A stitched level's surfaces carry the crossings its refined edges take from the finer level.
|
| LevelData< IVSFAB< PolyhedralEB::CutCellSurface > > & | getSurfaces () noexcept |
| | The surfaces, for the shop to write the crossings it takes from the finer level into.
|
| const LayoutData< IntVectSet > & | getSurfaceCells () const noexcept |
| | The cells of every box that hold a surface: every cut cell of its set, and every cell, own or ghost, whose corners disagree though it was dropped as dust or filled, or that lies beside a cell the finer level carries.
|
| const LayoutData< PolyhedralEB::CutCellFaceOverrides > & | getFaceOverrides () const noexcept |
| | The faces of every box's cut cells, own and ghost, that their surfaces do not describe.
|
| LayoutData< PolyhedralEB::CutCellFaceOverrides > & | getFaceOverrides () noexcept |
| | The face overrides, for the shop to write.
|
| 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. Collective.
|
| void | markCoarserFilled (LevelData< BaseFab< signed char > > &a_filled, const PolyhedralEBGraph &a_coarser, const int a_ghost) const |
| | Mark the cells of this level, valid and ghost, that lie under a cell the coarser level filled.
|
| void | promoteToCut (const DataIndex &a_dit, const IntVect &a_cell) |
| | Make a regular or covered cell of a box, own or ghost, a cut cell of this level.
|
| void | markSurfaces (LevelData< BaseFab< signed char > > &a_mask) const |
| | Mark the cells that hold a surface.
|
|
| static void | link (PolyhedralEBGraph &a_coarse, const PolyhedralEBGraph &a_fine) |
| | Mark, on the coarse level, the faces that open onto cells the fine level carries.
|
| static long long | anchorAcrossLevels (PolyhedralEBGraph &a_coarse, PolyhedralEBGraph &a_fine) |
| | Carry anchoring across a level boundary, both ways.
|
| static void | findUnresolvedCells (BaseFab< signed char > &a_unresolved, const BaseIF &a_function, const BaseFab< Real > &a_nodeValues, const Box &a_region, const Vector< Box > &a_covered, const RealVect &a_probLo, const Real a_dx, const bool a_fillSplitFluid) |
| | Find the cells of a region that one body cannot describe, or that are mostly a gap of fluid.
|
| static bool | isFilled (const BaseFab< signed char > &a_states, const BaseFab< signed char > &a_refined, const IntVectSet &a_withSurface, const IVSFAB< PolyhedralEB::CutCellSurface > &a_surfaces, const IntVect &a_cell) |
| | Whether the graph filled a cell: covered, with corners that disagree, and not carried by the finer level.
|
|
|
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.
|
|
static constexpr int | s_notFilled = 0 |
| | Why a cell was filled: it was not.
|
|
static constexpr int | s_filledPieces = 1 |
| | Why a cell was filled: its fluid falls into more than one piece, which one body cannot hold.
|
|
static constexpr int | s_filledGap = 2 |
| | Why a cell was filled: its one piece of fluid is the smaller part of it, a gap between pieces of solid.
|
|
| void | addGhostSurfaceCells () |
| | Put into every box's surface set the ghost cells whose owning tile keeps a surface for them.
|
| 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 | beginAnchoring (const LevelData< BaseFab< signed char > > &a_carried) |
| | Record which cells anchor fluid before any of it is spread, for fillSealedCells.
|
|
void | markRefined () |
| | Set m_refined from m_covered, over every box and its ghost cells.
|
| void | defineCells (const BaseIF &a_function, const LevelData< BaseFab< signed char > > &a_carried, const LevelData< BaseFab< signed char > > *a_coarserFilled, const bool a_fillSplitFluid) |
| | 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, with at least two ghost cells.
|
|
LevelData< BaseFab< signed char > > | m_anchored |
| | Anchoring, from beginAnchoring until fillSealedCells: one where a cell's fluid reaches a regular cell, and in a second component one on the cut ghost cells no tile carries, which the coarser level answers for.
|
|
LayoutData< IntVectSet > | m_surfaceCells |
| | Cells of every box that hold a surface.
|
|
LevelData< IVSFAB< PolyhedralEB::CutCellSurface > > | m_surfaces |
| | Surface of every cell of m_surfaceCells.
|
|
LayoutData< PolyhedralEB::CutCellFaceOverrides > | m_faceOverrides |
| | Faces of every box's cut cells that their surfaces do not describe.
|
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. A cell whose face lies across a level boundary, or opens onto a covered cell, is not described by its own surface alone: PolyhedralGeometryShop stitches it once, from the stored cells of the level across, writes the crossings it takes from there into the surface and keeps the faces it changes as face overrides, so that the cell's body is rebuilt from its own surface and its own overrides with no call to the implicit function.
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::findUnresolvedCells |
( |
BaseFab< signed char > & | a_unresolved, |
|
|
const BaseIF & | a_function, |
|
|
const BaseFab< Real > & | a_nodeValues, |
|
|
const Box & | a_region, |
|
|
const Vector< Box > & | a_covered, |
|
|
const RealVect & | a_probLo, |
|
|
const Real | a_dx, |
|
|
const bool | a_fillSplitFluid ) |
|
static |
Find the cells of a region that one body cannot describe, or that are mostly a gap of fluid.
A cell the surface enters as more than one sheet holds more than one piece of fluid or more than one piece of solid. Two pieces of fluid – a plate between them – are more than one body can hold, and the cell is filled, which is the only reading that stays single valued and keeps a barrier a barrier instead of letting the fluid run through it. One piece of fluid with several pieces of solid is either a gap of fluid thinner than the cell between two solid lobes, or pieces that merely sit apart in it, such as two solid tips at opposite corners of a face. The two share their topology and their corners, and a pattern that repeats at every scale – a surface lying in a node plane – looks the same in every subcell as well, so it is the volume that decides: the cell's body is built from its crossings, and the cell is filled when the fluid is the smaller part of it, erring toward blocking a gap, and kept, as one body with several sheets of interface, when the fluid fills most of it. Fluid pieces are counted the way the body joins them: across a face by its face decision, never through the interior. 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
-
| [out] | a_unresolved | For each cell of the region, why it must be filled – s_filledPieces or s_filledGap – or s_notFilled. |
| [in] | a_function | Implicit function, read at face centres and along the edges of multi-sheet cells. |
| [in] | a_nodeValues | Node values of the region. |
| [in] | a_region | Cells to ask. |
| [in] | a_covered | Cells a finer level carries. |
| [in] | a_probLo | Lower-left corner of the domain. |
| [in] | a_dx | Grid spacing. |
| [in] | a_fillSplitFluid | True to fill every cell whose fluid falls into more than one piece. False to fill such a cell only when its fluid is the larger part of it – a thin solid sheet between fluid, which has to stay a barrier – and otherwise keep it as one body of several pieces. |