|
chombo-discharge
|
Class for holding multifluid Realms, which are the Realms that we actually use. More...
#include <CD_Realm.H>
Public Member Functions | |
| Realm () | |
| Default constructor. Must subsequently call define. | |
| Realm (const Realm &a_other)=delete | |
| Disallowed copy ctor. | |
| Realm (const Realm &&a_other)=delete | |
| Disallowed move ctor. | |
| Realm & | operator= (const Realm &a_other)=delete |
| Disallowed copy assignment operator. | |
| Realm & | operator= (const Realm &&a_other)=delete |
| Disallowed move assignment operator. | |
| ~Realm () | |
| Destructor. | |
| void | define (const Vector< DisjointBoxLayout > &a_grids, const Vector< ProblemDomain > &a_domains, const Vector< int > &a_refRat, const Vector< Real > &a_dx, const RealVect &a_probLo, const int a_finestLevel, const int a_minBlockSize, const int a_ebGhost, const int a_numGhost, const int a_lsfGhost, const int a_redistRad, const int a_mgInterpOrder, const int a_mgInterpRadius, const int a_mgInterpWeight, const CellCentroidInterpolation::Type a_centroidInterpType, const EBCentroidInterpolation::Type a_ebInterpType, const std::map< phase::which_phase, RefCountedPtr< BaseIF > > &a_baseif, const RefCountedPtr< MultiFluidIndexSpace > &a_mfis) |
| Full define function. | |
| void | setGrids (const Vector< DisjointBoxLayout > &a_grids, const int a_finestLevel) |
| Set grid method. | |
| void | preRegrid () |
| Perform pre-regrid operations. | |
| void | regridBase (const int a_lmin) |
| Regrid method for EBAMR base. | |
| void | regridOperators (const int a_lmin) |
| Regrid method for EBAMR operators. | |
| void | registerOperator (const std::string &a_operator, const phase::which_phase a_phase) |
| Register an AMR operator. | |
| bool | queryOperator (const std::string &a_operator, const phase::which_phase a_phase) const |
| Query if an AMR operator has been registered. | |
| void | registerMask (const std::string &a_mask, const int a_buffer) |
| Register a mask. | |
| bool | queryMask (const std::string &a_mask, const int a_buffer) const |
| Query if a mask has been registered. | |
| const Vector< int > & | getRefinementRatios () const |
| Get refinement ratios. | |
| const Vector< Real > & | getDx () const |
| Get grid resolutions. | |
| const Vector< DisjointBoxLayout > & | getGrids () const |
| Get AMR grids. | |
| const Vector< ProblemDomain > & | getDomains () const |
| Get problem domains. | |
| Vector< RefCountedPtr< MFLevelGrid > > & | getMFLevelGrid () |
| Get MFLevelGrids. | |
| Vector< RefCountedPtr< MFLevelGrid > > & | getMFLevelGridCoFi () |
| Get the coarsened grids. | |
| Vector< RefCountedPtr< MFLevelGrid > > & | getMFLevelGridFiCo () |
| Get the refined grids. | |
| const RefCountedPtr< EBIndexSpace > & | getEBIndexSpace (const phase::which_phase a_phase) const |
| Get EBIndexSpace for particular phase. | |
| const Vector< EBISLayout > & | getEBISLayout (const phase::which_phase a_phase) const |
| Get EBISLayout for particular phase. | |
| const Vector< RefCountedPtr< EBLevelGrid > > & | getEBLevelGrid (const phase::which_phase a_phase) const |
| Get EBLevelGrid for particular phase. | |
| const Vector< RefCountedPtr< EBLevelGrid > > & | getEBLevelGridCoFi (const phase::which_phase a_phase) const |
| Get coarsened fine EBLevelGrid for particular phase. | |
| Vector< RefCountedPtr< LayoutData< VoFIterator > > > & | getVofIterator (const phase::which_phase a_phase) const |
| Get VoFIterators covering all cut-cells (singly- and multiply-cut) for a particular phase. | |
| Vector< RefCountedPtr< LayoutData< VoFIterator > > > & | getMultiCutVofIterator (const phase::which_phase a_phase) const |
| Get VoFIterators restricted to multiply-cut cells for a particular phase. | |
| Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & | getFaceIterator (const phase::which_phase a_phase) const |
| Get face iterators with FaceStop::SurroundingWithBoundary over cut-cell faces in each valid grid box for a particular phase. | |
| Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & | getFaceIteratorNoBoundary (const phase::which_phase a_phase) const |
| Get face iterators with FaceStop::SurroundingNoBoundary over cut-cell faces in each valid grid box for a particular phase. | |
| Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & | getFaceIteratorWithTangentialGhosts (const phase::which_phase a_phase) const |
| Get per-direction face iterators covering cut-cell faces that reach into the tangential ghost layer. | |
| Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & | getMultiCutFaceIterator (const phase::which_phase a_phase) const |
| Get face iterators restricted to multiply-cut faces in each valid grid box. | |
| const Vector< RefCountedPtr< EBNonConservativeDivergence > > & | getNonConservativeDivergence (const phase::which_phase a_phase) const |
| Get objects for computing "non-conservative divergences". | |
| const Vector< RefCountedPtr< CellCentroidInterpolation > > & | getCellCentroidInterpolation (const phase::which_phase a_phase) const |
| Get objects for computing interpolation of cell-centered data to cell centroids. | |
| const Vector< RefCountedPtr< EBCentroidInterpolation > > & | getEBCentroidInterpolation (const phase::which_phase a_phase) const |
| Get objects for computing interpolation of cell-centered data to EB centroids. | |
| Vector< RefCountedPtr< EBCoarAve > > & | getCoarseAverage (const phase::which_phase a_phase) |
| Get data coarsening utility. | |
| Vector< RefCountedPtr< EBMultigridInterpolator > > & | getMultigridInterpolator (const phase::which_phase a_phase) |
| Get the multigrid interpolator. | |
| EBAMRParticleMesh & | getParticleMesh (const phase::which_phase a_phase) |
| Get the particle mesh operator. | |
| EBAMRSurfaceDeposition & | getSurfaceDeposition (const phase::which_phase a_phase) |
| Get the particle mesh operator. | |
| const Vector< RefCountedPtr< EBGradient > > & | getGradientOp (const phase::which_phase a_phase) const |
| Get gradient operator. | |
| Vector< RefCountedPtr< EBGhostCellInterpolator > > & | getGhostCellInterpolator (const phase::which_phase a_phase) |
| Get ghost cell interpolator. | |
| Vector< RefCountedPtr< EBCoarseToFineInterp > > & | getFineInterp (const phase::which_phase a_phase) |
| Get piecewise linear ghost cell interpolation utility. | |
| Vector< RefCountedPtr< EBReflux > > & | getFluxRegister (const phase::which_phase a_phase) |
| Get flux register utility. | |
| Vector< RefCountedPtr< EBFluxRedistribution > > & | getRedistributionOp (const phase::which_phase a_phase) |
| Get the redistribution operators. | |
| const EBAMRFAB & | getLevelset (const phase::which_phase a_phase) const |
| Get level-set function. | |
| const EBAMRCellData & | getRegularCells (const phase::which_phase a_phase) const |
| Get the regular-cell mask (value 1 in regular cells, 0 elsewhere) for a phase. | |
| const EBAMRCellData & | getCoveredCells (const phase::which_phase a_phase) const |
| Get the covered-cell mask (value 1 in covered cells, 0 elsewhere) for a phase. | |
| const EBAMRCellData & | getNotCoveredCells (const phase::which_phase a_phase) const |
| Get the non-covered-cell mask (1 in regular/irregular cells, 0 in covered cells) for a phase. | |
| const EBAMRCellData & | getIrregularCells (const phase::which_phase a_phase) const |
| Get the irregular-cell mask (value 1 in irregular cells, 0 elsewhere) for a phase. | |
| const AMRMask & | getMask (const std::string &a_mask, const int a_buffer) const |
| Get AMR mask. | |
| const AMRMask & | getValidCells () const |
| Get all valid cells. | |
| void | registerParticleGhostMask (const int a_width) noexcept |
| Register a particle ghost-mask width so it is (re)built at every regrid. | |
| const AMRParticleGhostMask & | getParticleGhostMask (const int a_width) const noexcept |
| Get the same-level particle ghost mask for a registered width. | |
| const AMRParticleGhostMask & | getParticleGhostMaskFineToCoar (const int a_width) const noexcept |
| Get the fine-to-coarse particle ghost mask for a registered width. | |
| const AMRParticleGhostMask & | getParticleGhostMaskCoarToFine (const int a_width) const noexcept |
| Get the coarse-to-fine particle ghost mask for a registered width. | |
| const AMRParticleGhostMask & | getTrivialParticleGhostMask () const noexcept |
| Get a trivial (empty) particle ghost mask that scatters no particles. | |
| const AMRMask & | getParticleGhostExposure (const int a_width) const noexcept |
| Get the boundary-exposure mask for a registered particle ghost width. | |
| const Vector< RefCountedPtr< LevelTiles > > & | getLevelTiles () const noexcept |
| Get the tiled space. | |
| LevelTiles::LevelAndBox | getLevelAndBox (const RealVect &a_pos) const noexcept |
| Find the (finest) grid box covering a physical position. | |
Static Public Attributes | |
| static const std::string | Primal = "primal" |
| Identifier for perimal realm. | |
| static const std::string | primal = "primal" |
| Identifier for perimal realm. | |
Protected Member Functions | |
| void | defineMFLevelGrid (const int a_lmin) |
| Define MFLevelGrid. | |
| void | defineMasks (const int a_lmin) |
| Define masks. | |
| void | defineOuterHaloMask (const int a_lmin) |
| Define outer particle halo mask. | |
| void | defineOuterHaloMask (LevelData< BaseFab< bool > > &a_coarMask, const ProblemDomain &a_domainCoar, const ProblemDomain &a_domainFine, const DisjointBoxLayout &a_gridsCoar, const DisjointBoxLayout &a_gridsFine, const int a_buffer, const int a_refRat) |
| Define the outer particle halo masks. This is the level-version. | |
| void | defineInnerHaloMask (const int a_lmin) |
| Define inner particle halo mask. | |
| void | defineOuterCFMask (const int a_lmin) |
| Define a mask which is true on the outside (i.e., coarse side) of the refinement boundary. | |
| void | defineOuterCFMask (LevelData< BaseFab< bool > > &a_coarMask, const ProblemDomain &a_domainCoar, const ProblemDomain &a_domainFine, const DisjointBoxLayout &a_gridsCoar, const DisjointBoxLayout &a_gridsFine, const int a_buffer, const int a_refRat) |
| Define the outer cf region mask. This is the level-version. | |
| void | defineInnerCFMask (const int a_lmin) |
| Define a mask which is true on the inside (i.e., fine side) of the refinement boundary. | |
| void | defineCFIVS (const int a_lmin) |
| Define the coarse-fine interface. | |
| void | defineValidCells () |
| Define the valid cell region mask. | |
| void | defineLevelTiles () noexcept |
| Define the tiled space. | |
| void | defineParticleGhostMasks () noexcept |
| Define the same-level, fine-to-coarse, and coarse-to-fine particle ghost masks on every level. | |
| void | defineParticleGhostMaskSameLevel (LayoutData< ParticleGhostMask > &a_mask, const DisjointBoxLayout &a_dbl, const ProblemDomain &a_domain, const int a_ghost) noexcept |
| Define the SAME-level particle ghost mask on one level. | |
| void | defineParticleGhostMaskFineToCoar (LayoutData< ParticleGhostMask > &a_mask, const DisjointBoxLayout &a_thisLayout, const DisjointBoxLayout &a_coarLayout, const ProblemDomain &a_coarDomain, const int a_refRat, const int a_ghost) noexcept |
| Define the FINE-to-COARSE particle ghost mask on one level (targets on the next-coarser level). | |
| void | defineParticleGhostMaskCoarToFine (LayoutData< ParticleGhostMask > &a_mask, const DisjointBoxLayout &a_thisLayout, const DisjointBoxLayout &a_fineLayout, const LevelData< BaseFab< bool > > &a_validCells, const ProblemDomain &a_fineDomain, const int a_refRat, const int a_ghost) noexcept |
| Define the COARSE-to-FINE particle ghost mask on one level (targets on the next-finer level). | |
| void | defineParticleGhostExposure (LevelData< BaseFab< bool > > &a_exposure, const DisjointBoxLayout &a_dbl, const LayoutData< ParticleGhostMask > &a_same, const LayoutData< ParticleGhostMask > &a_fineToCoar, const LayoutData< ParticleGhostMask > &a_coarToFine, const bool a_hasCoar, const bool a_hasFine) noexcept |
| Define the boundary-exposure mask on one level from that level's three particle ghost masks. | |
| void | definePetscGrid () noexcept |
| Define the PETSc composite grid. | |
| PhaseRealm & | getRealm (const phase::which_phase a_phase) |
| Get a particular realm. | |
Protected Attributes | |
| bool | m_isDefined |
| Realm defined or not. | |
| int | m_verbosity |
| Realm verbosity. Used for debugging. | |
| int | m_finestLevel |
| Finest AMR level. | |
| int | m_minBlockSize |
| Blocking factor. | |
| int | m_numGhost |
| Number of ghost cells. | |
| RealVect | m_probLo |
| Physical coordinates of lower-left corner in simulation domain. | |
| Vector< Real > | m_dx |
| Grid resolutions. | |
| Vector< int > | m_refinementRatios |
| Refinement ratios. | |
| Vector< DisjointBoxLayout > | m_grids |
| AMR grids. | |
| Vector< ProblemDomain > | m_domains |
| Domains. | |
| Vector< RefCountedPtr< MFLevelGrid > > | m_mflg |
| MFLevelGrids. | |
| Vector< RefCountedPtr< MFLevelGrid > > | m_mflgCoFi |
| Coarsened grids. Entry lvl contains the coarsened version of grids on level lvl+1. | |
| Vector< RefCountedPtr< MFLevelGrid > > | m_mflgFiCo |
| Refined grids. Entry lvl+1 contains the refined version of grids on level lvl. | |
| Vector< RefCountedPtr< LevelTiles > > | m_levelTiles |
| Level "tiles" – i.e. the grids viewed as constant-size boxes. | |
| RefCountedPtr< MultiFluidIndexSpace > | m_multifluidIndexSpace |
| Index spaces. | |
| AMRMask | m_validCells |
| Mask which is true for all valid cells. | |
| std::set< int > | m_particleGhostMaskWidths |
| Registered particle ghost-mask widths (>0). Persist across regrids; the masks below are (re)built for exactly these widths in defineParticleGhostMasks(). | |
| std::map< int, AMRParticleGhostMask > | m_particleGhostMask |
| Same-level particle ghost masks, keyed by ghost width. Per width: indexed by source level, and per source box maps a source cell to the same-level boxes whose ghosted region covers it. | |
| std::map< int, AMRParticleGhostMask > | m_particleGhostMaskFineToCoar |
| Fine-to-coarse particle ghost masks, keyed by ghost width. Per width: indexed by source level (>=1); per source (fine) box maps a source cell to the coarser-level boxes whose ghosted region covers it. | |
| std::map< int, AMRParticleGhostMask > | m_particleGhostMaskCoarToFine |
| Coarse-to-fine particle ghost masks, keyed by ghost width. Per width: indexed by source level (<finest); per source (coarse) box maps a source cell to the finer-level boxes whose ghosted region covers it. | |
| std::map< int, AMRMask > | m_particleGhostExposure |
| Particle boundary-exposure masks, keyed by ghost width. Per width: indexed by level, true in every cell that has at least one outgoing ghost-shipment target in ANY direction – i.e. the OR over the same-level, fine-to-coarse and coarse-to-fine masks of numTargets(cell) > 0. | |
| std::map< phase::which_phase, RefCountedPtr< PhaseRealm > > | m_realms |
| Phase realms. | |
| std::map< phase::which_phase, RefCountedPtr< BaseIF > > | m_baseif |
| Implicit/signed distance functions on each phase. | |
| std::map< std::pair< std::string, int >, AMRMask > | m_masks |
| Masks. | |
Class for holding multifluid Realms, which are the Realms that we actually use.
|
delete |
Disallowed copy ctor.
| [in] | a_other | Other realm |
|
delete |
Disallowed move ctor.
| [in] | a_other | Other realm |
| void Realm::define | ( | const Vector< DisjointBoxLayout > & | a_grids, |
| const Vector< ProblemDomain > & | a_domains, | ||
| const Vector< int > & | a_refRat, | ||
| const Vector< Real > & | a_dx, | ||
| const RealVect & | a_probLo, | ||
| const int | a_finestLevel, | ||
| const int | a_minBlockSize, | ||
| const int | a_ebGhost, | ||
| const int | a_numGhost, | ||
| const int | a_lsfGhost, | ||
| const int | a_redistRad, | ||
| const int | a_mgInterpOrder, | ||
| const int | a_mgInterpRadius, | ||
| const int | a_mgInterpWeight, | ||
| const CellCentroidInterpolation::Type | a_centroidInterpType, | ||
| const EBCentroidInterpolation::Type | a_ebInterpType, | ||
| const std::map< phase::which_phase, RefCountedPtr< BaseIF > > & | a_baseif, | ||
| const RefCountedPtr< MultiFluidIndexSpace > & | a_mfis | ||
| ) |
Full define function.
| [in] | a_grids | Grids on each level, i.e. boxes and processor distributions |
| [in] | a_domains | Problem domains |
| [in] | a_refRat | Refinement ratios |
| [in] | a_dx | Grid resolutions |
| [in] | a_probLo | Lower-left corner of physical domain |
| [in] | a_finestLevel | Finest grid level |
| [in] | a_minBlockSize | Grid blocking factor |
| [in] | a_ebGhost | Number of ghost cells used for geometric information when making operators |
| [in] | a_numGhost | Number of ghost cells in data holders |
| [in] | a_lsfGhost | Number of ghost cells used when computing the level set on the mesh |
| [in] | a_redistRad | Redistribution radius |
| [in] | a_mgInterpOrder | Multigrid ghost cell interpolation order |
| [in] | a_mgInterpRadius | Multigrid ghost cell interpolation radius |
| [in] | a_mgInterpWeight | Multigrid ghost cell interpolation weight (for least squares) |
| [in] | a_centroidInterpType | Stencil type for interpolation from cell centers to cell centroids |
| [in] | a_ebInterpType | Stencil type for interpolation from cell centers to eb centroids |
| [in] | a_baseif | Implicit/signed distance function |
| [in] | a_mfis | EBIndexSpace discrete information |
|
protected |
Define the coarse-fine interface.
This is a mask which is true on the immediate outside of a refinement boundary.
| [in] | a_lmin | Description |
|
protected |
Define a mask which is true on the inside (i.e., fine side) of the refinement boundary.
| [in] | a_lmin | Description |
|
protected |
Define inner particle halo mask.
This is a mask which is true on the INSIDE of a refinement boundary. The buffer size is always the number of COARSE grid cells. I.e., if one uses a refinement factor of 2, the first two strips of fine-grid cells are set to true and the others to false.
| [in] | a_lmin | Coarsest level that changed during regrid |
|
protected |
Define masks.
| [in] | a_lmin | Coarsest level that changed during regrid |
|
protected |
Define MFLevelGrid.
| [in] | a_lmin | Coarsest level that changed during regrid |
|
protected |
Define a mask which is true on the outside (i.e., coarse side) of the refinement boundary.
| [in] | a_lmin | Description |
|
protected |
Define the outer cf region mask. This is the level-version.
| [out] | a_coarMask | Mask |
| [in] | a_domainCoar | Coarse domain |
| [in] | a_domainFine | Fine domain |
| [in] | a_gridsCoar | Coarse grids |
| [in] | a_gridsFine | Fine grids |
| [in] | a_buffer | Buffer |
| [in] | a_refRat | Refinement ratio between the two levels |
|
protected |
Define outer particle halo mask.
This is a mask which is true on the OUTSIDE of a refinement boundary.
| [in] | a_lmin | Coarsest level that changed during regrid |
|
protected |
Define the outer particle halo masks. This is the level-version.
| [out] | a_coarMask | Mask |
| [in] | a_domainCoar | Coarse domain |
| [in] | a_domainFine | Fine domain |
| [in] | a_gridsCoar | Coarse grids |
| [in] | a_gridsFine | Fine grids |
| [in] | a_buffer | Buffer (i.e. width of "halo") |
| [in] | a_refRat | Refinement ratio between the two levels |
|
protectednoexcept |
Define the boundary-exposure mask on one level from that level's three particle ghost masks.
Sets a cell true iff it has at least one outgoing ghost-shipment target in any direction; see m_particleGhostExposure' own docs for what the mask is for. a_hasCoar/a_hasFine say whether the fine-to-coarse/coarse-to-fine masks are actually defined on this level – they are allocated but left undefined on level 0 and on the finest level respectively, and must not be queried there.
| [out] | a_exposure | Per-box boolean mask over a_dbl to fill (no ghost cells). |
| [in] | a_dbl | This level's grids. |
| [in] | a_same | This level's same-level ghost mask. |
| [in] | a_fineToCoar | This level's fine-to-coarse ghost mask. Only read if a_hasCoar. |
| [in] | a_coarToFine | This level's coarse-to-fine ghost mask. Only read if a_hasFine. |
| [in] | a_hasCoar | Whether a coarser level exists (i.e. a_fineToCoar is defined). |
| [in] | a_hasFine | Whether a finer level exists (i.e. a_coarToFine is defined). |
|
protectednoexcept |
Define the COARSE-to-FINE particle ghost mask on one level (targets on the next-finer level).
Per source (coarse) cell the mask holds every fine box whose ghosted region (grown by a_ghost FINE cells) contains any of the cell's fine children – found by walking a ghostDefine Copier motion plan (only overlapping box pairs are visited), and multi-valued since a cell may scatter to several fine boxes. The fine reach is coarsened to whole coarse source cells, and only VALID coarse cells (those not covered by the finer level) are kept – that is the coarse-side outer halo. The ghost width is measured in fine (destination) cells and is a MINIMUM: whole coarse source cells overlapping the halo are recorded (over-communication across the interface is accepted). Periodic boundaries are not handled.
| [out] | a_mask | Per-box CSR ghost mask over a_thisLayout (the coarse level) to fill. |
| [in] | a_thisLayout | This (coarse, source) level's grids. |
| [in] | a_fineLayout | The next-finer (target) level's grids. |
| [in] | a_validCells | This (coarse) level's valid-cell mask; source cells are kept only where valid. |
| [in] | a_fineDomain | Problem domain at the fine (target) resolution. |
| [in] | a_refRat | Refinement ratio between this level and the fine level. |
| [in] | a_ghost | Ghost width in fine (destination) cells. |
|
protectednoexcept |
Define the FINE-to-COARSE particle ghost mask on one level (targets on the next-coarser level).
Per source (fine) cell the mask holds every coarse box whose ghosted region (grown by a_ghost COARSE cells) contains the cell's coarse footprint – found by walking a ghostDefine Copier motion plan (only overlapping box pairs are visited), and multi-valued since a cell may scatter to several coarse boxes (e.g. diagonal coarse-fine cells). Sources are restricted to the INNER coarse-fine halo so the nested interior is not scattered: the halo is built geometrically from the coarsened-fine footprint (the ring outside each footprint box, minus the abutting footprint boxes = internal seams, grown back inward), independent of the coarse grid's box decomposition. The ghost width is measured in coarse (destination) cells and is a MINIMUM: each halo coarse cell refines to all its fine source children (over-communication across the interface is accepted). Periodic boundaries are not handled.
| [out] | a_mask | Per-box CSR ghost mask over a_thisLayout (the fine level) to fill. |
| [in] | a_thisLayout | This (fine, source) level's grids. |
| [in] | a_coarLayout | The next-coarser (target) level's grids. |
| [in] | a_coarDomain | Problem domain at the coarse (target) resolution. |
| [in] | a_refRat | Refinement ratio between the coarse level and this level. |
| [in] | a_ghost | Ghost width in coarse (destination) cells. |
|
protectednoexcept |
Define the same-level, fine-to-coarse, and coarse-to-fine particle ghost masks on every level.
Allocates and fills the three per-level masks (m_particleGhostMask, m_particleGhostMaskFineToCoar, m_particleGhostMaskCoarToFine) by delegating to defineParticleGhostMaskSameLevel and defineParticleGhostMaskCrossLevel. Each mask records, per source cell, the target boxes (grid index + receiving rank) that a particle in that cell must be scattered to in that direction. Called from regridBase after the valid-cell and level-tile structures exist. The ghost width is m_numGhost. Periodic boundaries are not handled.
|
protectednoexcept |
Define the SAME-level particle ghost mask on one level.
For each box, records (per cell) the abutting same-level boxes whose grown region (the box grown by a_ghost cells) covers the cell, together with the owning/receiving rank. Uses a NeighborIterator to enumerate the abutting boxes, so the build is fully box-local – no coarsen/refine and no Copier – and each box fills its own CSR in two passes (count, then packed fill). NeighborIterator returns grow-by-one (abutting) neighbours only; this loses nothing because every box is min_block_size-aligned and AmrMesh::sanityCheck enforces a_ghost < min_block_size, so two non-abutting same-level boxes are always at least min_block_size (> a_ghost) apart and can never reach into each other's ghost region. Periodic boundaries are not handled.
| [out] | a_mask | Per-box CSR ghost mask over a_dbl to fill. |
| [in] | a_dbl | This level's grids (both the source cells and the neighbour targets). |
| [in] | a_domain | Problem domain at this level's resolution. |
| [in] | a_ghost | Ghost width (cells) defining each neighbour's grown region. |
| const Vector< RefCountedPtr< CellCentroidInterpolation > > & Realm::getCellCentroidInterpolation | ( | const phase::which_phase | a_phase | ) | const |
Get objects for computing interpolation of cell-centered data to cell centroids.
| [in] | a_phase | Phase |
| Vector< RefCountedPtr< EBCoarAve > > & Realm::getCoarseAverage | ( | const phase::which_phase | a_phase | ) |
Get data coarsening utility.
| [in] | a_phase | Phase |
| const EBAMRCellData & Realm::getCoveredCells | ( | const phase::which_phase | a_phase | ) | const |
Get the covered-cell mask (value 1 in covered cells, 0 elsewhere) for a phase.
| [in] | a_phase | Phase |
| const Vector< ProblemDomain > & Realm::getDomains | ( | ) | const |
Get problem domains.
| const Vector< Real > & Realm::getDx | ( | ) | const |
Get grid resolutions.
| const Vector< RefCountedPtr< EBCentroidInterpolation > > & Realm::getEBCentroidInterpolation | ( | const phase::which_phase | a_phase | ) | const |
Get objects for computing interpolation of cell-centered data to EB centroids.
| [in] | a_phase | Phase |
| const RefCountedPtr< EBIndexSpace > & Realm::getEBIndexSpace | ( | const phase::which_phase | a_phase | ) | const |
Get EBIndexSpace for particular phase.
| [in] | a_phase | Phase |
| const Vector< EBISLayout > & Realm::getEBISLayout | ( | const phase::which_phase | a_phase | ) | const |
Get EBISLayout for particular phase.
| [in] | a_phase | Phase |
| const Vector< RefCountedPtr< EBLevelGrid > > & Realm::getEBLevelGrid | ( | const phase::which_phase | a_phase | ) | const |
Get EBLevelGrid for particular phase.
| [in] | a_phase | Phase |
| const Vector< RefCountedPtr< EBLevelGrid > > & Realm::getEBLevelGridCoFi | ( | const phase::which_phase | a_phase | ) | const |
Get coarsened fine EBLevelGrid for particular phase.
| [in] | a_phase | Phase |
| Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & Realm::getFaceIterator | ( | const phase::which_phase | a_phase | ) | const |
Get face iterators with FaceStop::SurroundingWithBoundary over cut-cell faces in each valid grid box for a particular phase.
Includes domain-boundary faces. For cell-to-face averaging that excludes domain boundary faces, use getFaceIteratorNoBoundary. For faces that extend into the tangential ghost layer, use getFaceIteratorWithTangentialGhosts.
| [in] | a_phase | Phase (gas or solid) |
| Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & Realm::getFaceIteratorNoBoundary | ( | const phase::which_phase | a_phase | ) | const |
Get face iterators with FaceStop::SurroundingNoBoundary over cut-cell faces in each valid grid box for a particular phase.
Domain boundary faces are excluded. Intended for cell-to-face averaging where boundary faces are fixed up separately. For iterators that include domain boundary faces, use getFaceIterator.
| [in] | a_phase | Phase (gas or solid) |
| Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & Realm::getFaceIteratorWithTangentialGhosts | ( | const phase::which_phase | a_phase | ) | const |
Get per-direction face iterators covering cut-cell faces that reach into the tangential ghost layer.
For the iterator in direction dir, the underlying IVS covers irregular cells in a box grown by 1 in the two directions tangential to dir; the dir extent stays at the valid box. Domain boundary faces are excluded (FaceStop::SurroundingNoBoundary). Callers require at least 1 ghost layer in cell data.
| [in] | a_phase | Phase |
| Vector< RefCountedPtr< EBCoarseToFineInterp > > & Realm::getFineInterp | ( | const phase::which_phase | a_phase | ) |
Get piecewise linear ghost cell interpolation utility.
| [in] | a_phase | Phase |
| Vector< RefCountedPtr< EBReflux > > & Realm::getFluxRegister | ( | const phase::which_phase | a_phase | ) |
Get flux register utility.
| [in] | a_phase | Phase |
| Vector< RefCountedPtr< EBGhostCellInterpolator > > & Realm::getGhostCellInterpolator | ( | const phase::which_phase | a_phase | ) |
Get ghost cell interpolator.
| [in] | a_phase | Phase |
| const Vector< RefCountedPtr< EBGradient > > & Realm::getGradientOp | ( | const phase::which_phase | a_phase | ) | const |
Get gradient operator.
| [in] | a_phase | Phase |
| const Vector< DisjointBoxLayout > & Realm::getGrids | ( | ) | const |
Get AMR grids.
| const EBAMRCellData & Realm::getIrregularCells | ( | const phase::which_phase | a_phase | ) | const |
Get the irregular-cell mask (value 1 in irregular cells, 0 elsewhere) for a phase.
| [in] | a_phase | Phase |
|
noexcept |
Find the (finest) grid box covering a physical position.
O(1) point->block query delegating to the shared LevelTiles::findDestination core over this Realm's LevelTiles: the position is mapped to a min_block_size tile by integer division, then looked up in the per-level tile->box hash, finest level first. Works for variable-sized/anisotropic boxes because every box is registered under all the min tiles it covers. This is the same mapping ParticleContainer uses to bin particles, exposed for any user that needs to know which box owns a point.
| [in] | a_pos | Physical position. |
| const EBAMRFAB & Realm::getLevelset | ( | const phase::which_phase | a_phase | ) | const |
Get level-set function.
| [in] | a_phase | Phase |
|
noexcept |
Get the tiled space.
| const AMRMask & Realm::getMask | ( | const std::string & | a_mask, |
| const int | a_buffer | ||
| ) | const |
Get AMR mask.
| [in] | a_mask | Mask |
| [in] | a_buffer | Buffer |
| Vector< RefCountedPtr< MFLevelGrid > > & Realm::getMFLevelGrid | ( | ) |
Get MFLevelGrids.
| Vector< RefCountedPtr< MFLevelGrid > > & Realm::getMFLevelGridCoFi | ( | ) |
Get the coarsened grids.
The returned vector contains the coarsened grids. Entry on level lvl=0 contains the coarsening of level lvl=1 and so on. The top level is undefined because there was no finer grid from which we can coarsen.
| Vector< RefCountedPtr< MFLevelGrid > > & Realm::getMFLevelGridFiCo | ( | ) |
Get the refined grids.
The returned vector contains the refined grids. Entry on level lvl=1 contains the refinement of level lvl=0 and so on. The bottom level is undefined because there was no coarser grid from which we can refine.
| Vector< RefCountedPtr< LayoutData< std::array< FaceIterator, SpaceDim > > > > & Realm::getMultiCutFaceIterator | ( | const phase::which_phase | a_phase | ) | const |
Get face iterators restricted to multiply-cut faces in each valid grid box.
Only faces abutting multiply-cut cells (cells with more than one VoF) are visited. Faces are enumerated with FaceStop::SurroundingNoBoundary.
| [in] | a_phase | Phase |
| Vector< RefCountedPtr< LayoutData< VoFIterator > > > & Realm::getMultiCutVofIterator | ( | const phase::which_phase | a_phase | ) | const |
Get VoFIterators restricted to multiply-cut cells for a particular phase.
| [in] | a_phase | Phase |
| Vector< RefCountedPtr< EBMultigridInterpolator > > & Realm::getMultigridInterpolator | ( | const phase::which_phase | a_phase | ) |
Get the multigrid interpolator.
| [in] | a_phase | Phase |
| const Vector< RefCountedPtr< EBNonConservativeDivergence > > & Realm::getNonConservativeDivergence | ( | const phase::which_phase | a_phase | ) | const |
Get objects for computing "non-conservative divergences".
| [in] | a_phase | Phase |
| const EBAMRCellData & Realm::getNotCoveredCells | ( | const phase::which_phase | a_phase | ) | const |
Get the non-covered-cell mask (1 in regular/irregular cells, 0 in covered cells) for a phase.
| [in] | a_phase | Phase |
|
noexcept |
Get the boundary-exposure mask for a registered particle ghost width.
See m_particleGhostExposure' own docs for what "exposed" means and why the mask carries no ghost cells.
| [in] | a_width | Registered ghost width. |
|
noexcept |
Get the same-level particle ghost mask for a registered width.
| [in] | a_width | Registered ghost width. |
|
noexcept |
Get the coarse-to-fine particle ghost mask for a registered width.
| [in] | a_width | Registered ghost width. |
|
noexcept |
Get the fine-to-coarse particle ghost mask for a registered width.
| [in] | a_width | Registered ghost width. |
| EBAMRParticleMesh & Realm::getParticleMesh | ( | const phase::which_phase | a_phase | ) |
Get the particle mesh operator.
| [in] | a_phase | Which phase |
|
protected |
| Vector< RefCountedPtr< EBFluxRedistribution > > & Realm::getRedistributionOp | ( | const phase::which_phase | a_phase | ) |
Get the redistribution operators.
| [in] | a_phase | Phase (gas or solid) |
| const Vector< int > & Realm::getRefinementRatios | ( | ) | const |
Get refinement ratios.
| const EBAMRCellData & Realm::getRegularCells | ( | const phase::which_phase | a_phase | ) | const |
Get the regular-cell mask (value 1 in regular cells, 0 elsewhere) for a phase.
| [in] | a_phase | Phase |
| EBAMRSurfaceDeposition & Realm::getSurfaceDeposition | ( | const phase::which_phase | a_phase | ) |
Get the particle mesh operator.
| [in] | a_phase | Which phase |
|
noexcept |
Get a trivial (empty) particle ghost mask that scatters no particles.
Pass this to ParticleContainer::fillGhost for a direction that should not scatter. It holds no levels, so a fill over it is a no-op.
| const AMRMask & Realm::getValidCells | ( | ) | const |
Get all valid cells.
| Vector< RefCountedPtr< LayoutData< VoFIterator > > > & Realm::getVofIterator | ( | const phase::which_phase | a_phase | ) | const |
Get VoFIterators covering all cut-cells (singly- and multiply-cut) for a particular phase.
For a pass covering only multiply-cut cells, use getMultiCutVofIterator instead.
| [in] | a_phase | Phase (gas or solid) |
Disallowed move assignment operator.
| [in] | a_other | Other realm |
Disallowed copy assignment operator.
| [in] | a_other | Other realm |
| bool Realm::queryMask | ( | const std::string & | a_mask, |
| const int | a_buffer | ||
| ) | const |
Query if a mask has been registered.
| [in] | a_mask | Mask name |
| [in] | a_buffer | Buffer |
| bool Realm::queryOperator | ( | const std::string & | a_operator, |
| const phase::which_phase | a_phase | ||
| ) | const |
Query if an AMR operator has been registered.
| [in] | a_operator | operator name |
| [in] | a_phase | Phase where operator is registered |
| void Realm::registerMask | ( | const std::string & | a_mask, |
| const int | a_buffer | ||
| ) |
Register a mask.
| [in] | a_mask | Mask name |
| [in] | a_buffer | Buffer |
| void Realm::registerOperator | ( | const std::string & | a_operator, |
| const phase::which_phase | a_phase | ||
| ) |
Register an AMR operator.
| [in] | a_operator | Operator name |
| [in] | a_phase | Phase where operator is registered |
Issues run-time error if a_operator can't be recognized
|
noexcept |
Register a particle ghost-mask width so it is (re)built at every regrid.
Downstream code must register a width before it can fetch the corresponding masks. Widths are deduplicated, so several consumers may safely request the same width. No masks are built at all unless at least one width has been registered.
| [in] | a_width | Ghost width (cells). Must be > 0; a run-time error is thrown otherwise. |
| void Realm::regridBase | ( | const int | a_lmin | ) |
Regrid method for EBAMR base.
| [in] | a_lmin | Coarsest grid level that changed. |
This regrids EBLevelGrid and iterators
| void Realm::regridOperators | ( | const int | a_lmin | ) |
Regrid method for EBAMR operators.
| [in] | a_lmin | Coarsest grid level that changed. |
This regrids all operators.
| void Realm::setGrids | ( | const Vector< DisjointBoxLayout > & | a_grids, |
| const int | a_finestLevel | ||
| ) |
Set grid method.
| [in] | a_grids | New grids |
| [in] | a_finestLevel | New finest grid level |
This sets m_grids to be a_grids, but does not perform a regrid of remaining members.
|
protected |
Particle boundary-exposure masks, keyed by ghost width. Per width: indexed by level, true in every cell that has at least one outgoing ghost-shipment target in ANY direction – i.e. the OR over the same-level, fine-to-coarse and coarse-to-fine masks of numTargets(cell) > 0.
A cell is "exposed" when a particle sitting in it is visible to some other box, so a consumer that wants to act on such a particle unilaterally cannot: some other box may be acting on the same particle in the same round. The mergers ask this question per particle, every timestep, for data that changes only when the masks it is derived from do – hence caching it here, beside those masks and rebuilt by the same function.
Carries NO ghost cells, deliberately: only cells holding a RESIDENT particle are ever queried, and resident means the cell lies in the patch's own box. A ghost particle's cell lies outside the box and would in any case violate ParticleGhostMask::numTargets()' own precondition.
|
mutableprotected |
Phase realms.
Mutable because some of the operators are mutable.