chombo-discharge
Loading...
Searching...
No Matches
PetscGrid Class Reference

Class which maps a multifluid cut-cell AMR hierarchy to PETSc. More...

#include <CD_PetscGrid.H>

Public Member Functions

 PetscGrid () noexcept
 Default constructor. Must subsequently call define.
virtual ~PetscGrid () noexcept
 Destructor. Does nothing.
virtual void define (const Vector< RefCountedPtr< MFLevelGrid > > &a_levelGrids, const Vector< RefCountedPtr< MFLevelGrid > > &a_levelGridsCoFi, const Vector< RefCountedPtr< MFLevelGrid > > &a_levelGridsFiCo, const Vector< RefCountedPtr< LevelData< BaseFab< bool > > > > &a_validCells, const Vector< RefCountedPtr< LevelData< BaseFab< bool > > > > &a_coarHaloCF, const Vector< RefCountedPtr< LevelData< BaseFab< bool > > > > &a_fineHaloCF, const Vector< int > &a_refinementRatios, const Vector< Real > &a_dx, const int a_finestLevel, const int a_numGhost) noexcept
 Main define function. Puts object in usable state.
virtual void clear () noexcept
 Clear the object.
virtual bool isDefined () const noexcept
 Is defined or not.
virtual int getNumPhases () const noexcept
 Get the number of phases.
virtual PetscInt getNumLocalRows () const noexcept
 Get the number of PETSc rows owned by this rank.
virtual PetscInt getNumGlobalRows () const noexcept
 Get the total number of PETSc rows over all ranks.
virtual const Vector< RefCountedPtr< MFLevelGrid > > & getMFLevelGrids () const noexcept
 Get the grids on each level.
virtual const Vector< RefCountedPtr< MFLevelGrid > > & getMFLevelGridsCoFi () const noexcept
 Get the coarsened fine grids.
virtual const Vector< RefCountedPtr< MFLevelGrid > > & getMFLevelGridsFiCo () const noexcept
 Get the refined coarse grids.
virtual const Vector< int > & getRefinementRatios () const noexcept
 Get the refinement ratios.
virtual const Vector< RefCountedPtr< LevelData< BaseFab< PetscAMRCell > > > > & getAMRToPetsc () const noexcept
 Get the map from AMR cells to PETSc rows, on the grids of each level.
virtual const Vector< RefCountedPtr< LevelData< BaseFab< PetscAMRCell > > > > & getAMRToPetscCoFi () const noexcept
 Get the map from AMR cells to PETSc rows, on the coarsened fine grids.
virtual const Vector< RefCountedPtr< LevelData< BaseFab< PetscAMRCell > > > > & getAMRToPetscFiCo () const noexcept
 Get the map from AMR cells to PETSc rows, on the refined coarse grids.
virtual Vector< RefCountedPtr< LayoutData< VoFIterator > > > & getVoFIterator (const int a_iphase) const noexcept
 Get iterators over the cut cells that are PETSc rows on a phase.
virtual Vector< PetscInt > getLocalRows (const int a_iphase) const noexcept
 Get the global PETSc rows of a phase that this rank owns.
virtual PetscStencil getPetscStencil (const VoFStencil &a_stencil, const int a_level, const DataIndex &a_din, const int a_phase) const noexcept
 Rewrite a stencil over cells on one level as a stencil over global PETSc rows.
virtual PetscStencil getPetscStencilWithFinerLevel (const VoFStencil &a_stencil, const VoFStencil &a_fineStencil, const int a_level, const DataIndex &a_din, const int a_phase) const noexcept
 Rewrite a two-level stencil, over cells on a level and the next finer level, as a stencil over global PETSc rows.
virtual PetscStencil getPetscStencilWithCoarserLevel (const VoFStencil &a_stencil, const VoFStencil &a_coarStencil, const int a_level, const DataIndex &a_din, const int a_phase) const noexcept
 Rewrite a two-level stencil, over cells on a level and the next coarser level, as a stencil over global PETSc rows.
virtual void replaceGhostCells (VoFStencil &a_stencil, VoFStencil &a_stencilCoar, const RefCountedPtr< EBMultigridInterpolator > &a_interpolator, const int a_level, const DataIndex &a_din) const noexcept
 Replace the coarse-fine ghost cells in a stencil over level a_level cells by their interpolation stencils.
virtual PetscStencil getPetscStencilWithGhostCells (const VoFStencil &a_stencilCoar, const VoFStencil &a_stencil, const VoFStencil &a_stencilFine, const RefCountedPtr< EBMultigridInterpolator > &a_interpolator, const int a_level, const DataIndex &a_din, const int a_phase) const noexcept
 Rewrite a stencil over three levels, whose part on the middle level may contain coarse-fine ghost cells, as a stencil over global PETSc rows.
virtual void create (Vec &a_x) noexcept
 Create a PETSc vector.
virtual void destroy (Vec &a_x) noexcept
 Destroy a PETSc vector.
virtual void setValue (Vec &a_x, const PetscScalar a_value) const noexcept
 Set values in a PETSc vector.
virtual void putChomboInPetsc (Vec &a_x, const MFAMRCellData &a_y) const noexcept
 Push data form a chombo-discharge data holder into PETSc.
virtual void putPetscInChombo (MFAMRCellData &a_y, const Vec &a_x) const noexcept
 Pull data from a PETSc vector into a chombo-discharge data holder.
virtual void dumpPetscGrid (const std::string &a_filename) const noexcept
 Write the PETSc grid to an output HDF5 file.

Protected Member Functions

virtual void defineAMRCells () noexcept
 Define basic cell information for PetscGrid.
virtual void definePetscRows () noexcept
 Build the Chombo <--> Petsc index mapping for the valid cells.
virtual void addRows (PetscStencil &a_petscStencil, const VoFStencil &a_stencil, const BaseFab< PetscAMRCell > &a_map, const int a_phase, const std::string &a_what) const noexcept
 Add the rows of a stencil's cells to a PETSc stencil.
virtual void abortInvalidEntry (const IntVect &a_iv, const BaseFab< PetscAMRCell > &a_map, const int a_phase, const std::string &a_what) const noexcept
 Abort because a stencil entry lies outside the map or is not a PETSc row, naming the cell and the reason.
virtual void defineCoFiBuffers () noexcept
 Define the coarsened/refined views of m_amrToPetsc.

Protected Attributes

bool m_isDefined
 Is defined or not.
bool m_verbose
 Verbose or not.
bool m_debug
 Run-time debug or not.
bool m_profile
 Run-time profile or not.
int m_finestLevel
 Finest grid level.
int m_numGhost
 Number of ghost cells.
int m_numPhases
 Number of phases.
PetscInt m_numLocalRows
 Number of rows owned locally.
PetscInt m_numGlobalRows
 Number of global rows.
PetscInt m_localRowBegin
 Global row corresponding to the first local row.
ISLocalToGlobalMapping m_localToGlobalIS
 Local index to global index mapping for PETSc.
Vector< PetscInt > m_numRowsPerRank
 Number of rows per MPI rank. Visible to all ranks.
Vector< RefCountedPtr< MFLevelGrid > > m_levelGrids
 Grids on each level.
Vector< RefCountedPtr< MFLevelGrid > > m_levelGridsCoFi
 Coarsened grids.
Vector< RefCountedPtr< MFLevelGrid > > m_levelGridsFiCo
 Refined grids.
Vector< RefCountedPtr< LevelData< BaseFab< bool > > > > m_validCells
 Data holder which is true for cells not covered by a finer grid.
Vector< RefCountedPtr< LevelData< BaseFab< bool > > > > m_coarHaloCF
 Coarse-side cells on refinement interface.
Vector< RefCountedPtr< LevelData< BaseFab< bool > > > > m_fineHaloCF
 Fine-side cells on refinement interface.
Vector< int > m_refRat
 Refinement ratios between levels.
Vector< Real > m_dx
 Grid resolutions.
Vector< RefCountedPtr< LevelData< BaseFab< PetscAMRCell > > > > m_amrToPetsc
 Mapping structure for moving between AMR cells and PETSc rows.
Vector< RefCountedPtr< LevelData< BaseFab< PetscAMRCell > > > > m_amrToPetscCoFi
 Mapping structure for moving between AMR cells and PETSc rows.
Vector< RefCountedPtr< LevelData< BaseFab< PetscAMRCell > > > > m_amrToPetscFiCo
 Mapping structure for moving between AMR cells and PETSc rows.
Vector< RefCountedPtr< LayoutData< Vector< PetscDOF > > > > m_petscToAMR [2]
 Mapping of PETSc local row index back to AMR.
Vector< RefCountedPtr< LayoutData< VoFIterator > > > m_vofIterators [2]
 Iterators over the cut cells that are PETSc rows, per phase and level.

Detailed Description

Class which maps a multifluid cut-cell AMR hierarchy to PETSc.

This class includes functions for putting chombo-discharge in PETSc and vice versa.

Note
This class assumes that PETSc will only care about a single component per grid cell (two components in a multifluid cell).

Member Function Documentation

◆ abortInvalidEntry()

void PetscGrid::abortInvalidEntry ( const IntVect & a_iv,
const BaseFab< PetscAMRCell > & a_map,
const int a_phase,
const std::string & a_what ) const
protectedvirtualnoexcept

Abort because a stencil entry lies outside the map or is not a PETSc row, naming the cell and the reason.

Parameters
[in]a_ivCell.
[in]a_mapMap from cells to PETSc rows, for one grid patch.
[in]a_phasePhase.
[in]a_whatWhich stencil the entry belongs to.

◆ addRows()

void PetscGrid::addRows ( PetscStencil & a_petscStencil,
const VoFStencil & a_stencil,
const BaseFab< PetscAMRCell > & a_map,
const int a_phase,
const std::string & a_what ) const
protectedvirtualnoexcept

Add the rows of a stencil's cells to a PETSc stencil.

Looks up each entry of a_stencil in a_map. Every entry must lie in a_map's box and be a PETSc row on a_phase. Either failure aborts in every build, through abortInvalidEntry: an entry outside the map would read out of bounds, and PETSc silently ignores negative indices.

Parameters
[in,out]a_petscStencilPETSc stencil to add to.
[in]a_stencilStencil over the cells of a_map.
[in]a_mapMap from cells to PETSc rows, for one grid patch.
[in]a_phasePhase.
[in]a_whatWhich stencil this is, for the abort message.

◆ clear()

void PetscGrid::clear ( )
virtualnoexcept

Clear the object.

This deallocates all PETSc-relevant allocations and marks the grid as undefined, so calling it twice is safe.

◆ create()

void PetscGrid::create ( Vec & a_x)
virtualnoexcept

Create a PETSc vector.

This will allocate the PETSc vector. It is up to the user to destroy it when it is no longer needed.

Parameters
[in,out]a_xPETSc vector

◆ define()

void PetscGrid::define ( const Vector< RefCountedPtr< MFLevelGrid > > & a_levelGrids,
const Vector< RefCountedPtr< MFLevelGrid > > & a_levelGridsCoFi,
const Vector< RefCountedPtr< MFLevelGrid > > & a_levelGridsFiCo,
const Vector< RefCountedPtr< LevelData< BaseFab< bool > > > > & a_validCells,
const Vector< RefCountedPtr< LevelData< BaseFab< bool > > > > & a_coarHaloCF,
const Vector< RefCountedPtr< LevelData< BaseFab< bool > > > > & a_fineHaloCF,
const Vector< int > & a_refinementRatios,
const Vector< Real > & a_dx,
const int a_finestLevel,
const int a_numGhost )
virtualnoexcept

Main define function. Puts object in usable state.

Note that a_levelGridsCoFi must be coarsened from finer grids. That is, entry lvl in levelGridsCoFi must be a coarsened version of a_levelGrids[lvl+1]. Similarly, a_levelGridsFiCo must be refined from coarser grids, i.e., a_levelGridsFiCo[lvl] must be a refinement of a_levelGrids[lvl-1].

Parameters
[in]a_levelGridschombo-discharge AMR grids
[in]a_levelGridsCoFiCoarsened grids.
[in]a_levelGridsFiCoRefined grids.
[in]a_validCellsData holder which is true for cells not covered by a finer grid and false otherwise.
[in]a_coarHaloCFData holder which is true on cells that lie on the coarse side of a CF interface
[in]a_fineHaloCFData holder which is true on cells that lie on the fine side of a CF interface
[in]a_refinementRatiosRefinement ratios between grid level.
[in]a_dxGrid resolutions on each level.
[in]a_finestLevelFinest defined grid level.
[in]a_numGhostNumber of ghost cells described in the grid.

◆ defineAMRCells()

void PetscGrid::defineAMRCells ( )
protectedvirtualnoexcept

Define basic cell information for PetscGrid.

This defines basic cell properties, indicating whether or not a cell is covered by a finer grid, if it abuts the coarse-fine interface, etc.

◆ definePetscRows()

void PetscGrid::definePetscRows ( )
protectedvirtualnoexcept

Build the Chombo <--> Petsc index mapping for the valid cells.

This defines m_localRows and m_globalRows, m_numRowsPerRank, m_localToGlobalIS, and figures out the number of degrees of freedom on each MPI rank. After this is called, it will be possible to index local grid cells into a PETSc vector row.

◆ destroy()

void PetscGrid::destroy ( Vec & a_x)
virtualnoexcept

Destroy a PETSc vector.

This will deallocate the PETSc vector.

Parameters
[in,out]a_xPETSc vector

◆ dumpPetscGrid()

void PetscGrid::dumpPetscGrid ( const std::string & a_filename) const
virtualnoexcept

Write the PETSc grid to an output HDF5 file.

Parameters
[in]a_filenameOutput file name

◆ getAMRToPetsc()

const Vector< RefCountedPtr< LevelData< BaseFab< PetscAMRCell > > > > & PetscGrid::getAMRToPetsc ( ) const
virtualnoexcept

Get the map from AMR cells to PETSc rows, on the grids of each level.

Valid cells and ghost cells both hold global PETSc rows.

Returns
m_amrToPetsc

◆ getAMRToPetscCoFi()

const Vector< RefCountedPtr< LevelData< BaseFab< PetscAMRCell > > > > & PetscGrid::getAMRToPetscCoFi ( ) const
virtualnoexcept

Get the map from AMR cells to PETSc rows, on the coarsened fine grids.

Entry lvl holds the rows of level lvl on the grids of getMFLevelGridsCoFi()[lvl].

Returns
m_amrToPetscCoFi

◆ getAMRToPetscFiCo()

const Vector< RefCountedPtr< LevelData< BaseFab< PetscAMRCell > > > > & PetscGrid::getAMRToPetscFiCo ( ) const
virtualnoexcept

Get the map from AMR cells to PETSc rows, on the refined coarse grids.

Entry lvl holds the rows of level lvl on the grids of getMFLevelGridsFiCo()[lvl].

Returns
m_amrToPetscFiCo

◆ getLocalRows()

Vector< PetscInt > PetscGrid::getLocalRows ( const int a_iphase) const
virtualnoexcept

Get the global PETSc rows of a phase that this rank owns.

These are the rows of the cells of the phase on all levels, e.g. for an index set that splits the matrix by phase.

Parameters
[in]a_iphasePhase index
Returns
The rows, in ascending order.

◆ getMFLevelGrids()

const Vector< RefCountedPtr< MFLevelGrid > > & PetscGrid::getMFLevelGrids ( ) const
virtualnoexcept

Get the grids on each level.

Returns
m_levelGrids

◆ getMFLevelGridsCoFi()

const Vector< RefCountedPtr< MFLevelGrid > > & PetscGrid::getMFLevelGridsCoFi ( ) const
virtualnoexcept

Get the coarsened fine grids.

Entry lvl is level lvl+1 coarsened to the resolution of level lvl, and shares DataIndex with level lvl+1. The finest level has no entry.

Returns
m_levelGridsCoFi

◆ getMFLevelGridsFiCo()

const Vector< RefCountedPtr< MFLevelGrid > > & PetscGrid::getMFLevelGridsFiCo ( ) const
virtualnoexcept

Get the refined coarse grids.

Entry lvl is level lvl-1 refined to the resolution of level lvl, and shares DataIndex with level lvl-1. Level 0 has no entry.

Returns
m_levelGridsFiCo

◆ getNumGlobalRows()

PetscInt PetscGrid::getNumGlobalRows ( ) const
virtualnoexcept

Get the total number of PETSc rows over all ranks.

Returns
m_numGlobalRows

◆ getNumLocalRows()

PetscInt PetscGrid::getNumLocalRows ( ) const
virtualnoexcept

Get the number of PETSc rows owned by this rank.

Returns
m_numLocalRows

◆ getNumPhases()

int PetscGrid::getNumPhases ( ) const
virtualnoexcept

Get the number of phases.

Returns
Number of phases (1 or 2).

◆ getPetscStencil()

PetscStencil PetscGrid::getPetscStencil ( const VoFStencil & a_stencil,
const int a_level,
const DataIndex & a_din,
const int a_phase ) const
virtualnoexcept

Rewrite a stencil over cells on one level as a stencil over global PETSc rows.

Each entry of a_stencil is a cell on level a_level, in the index space of grid a_din, possibly in its ghost region. Every entry must be a PETSc row on a_phase, i.e. a valid cell of a_din or of a neighbouring box. Anything else aborts with the reason: a cell covered by a finer level, a coarse-fine ghost cell, a cell covered by the EB, or a cell outside the domain. Ghost cells and boundary conditions are the caller's to resolve first.

Parameters
[in]a_stencilStencil over cells on level a_level.
[in]a_levelGrid level.
[in]a_dinGrid index on level a_level.
[in]a_phasePhase.
Returns
The same stencil, over global PETSc rows, compressed (unique, ascending rows).

◆ getPetscStencilWithCoarserLevel()

PetscStencil PetscGrid::getPetscStencilWithCoarserLevel ( const VoFStencil & a_stencil,
const VoFStencil & a_coarStencil,
const int a_level,
const DataIndex & a_din,
const int a_phase ) const
virtualnoexcept

Rewrite a two-level stencil, over cells on a level and the next coarser level, as a stencil over global PETSc rows.

This is the form of the coarse-fine ghost cell stencils of EBMultigridInterpolator::getGhostStencil. a_stencil resolves as in the single-level version. a_coarStencil is over cells on level a_level-1, in the index space of the level a_level grid a_din coarsened to level a_level-1 (getMFLevelGridsCoFi), and each of its entries must be a PETSc row on level a_level-1.

Parameters
[in]a_stencilStencil over cells on level a_level.
[in]a_coarStencilStencil over cells on level a_level-1.
[in]a_levelGrid level of a_stencil. Must be above level 0.
[in]a_dinGrid index on level a_level.
[in]a_phasePhase.
Returns
The sum of both stencils, over global PETSc rows, compressed (unique, ascending rows).

◆ getPetscStencilWithFinerLevel()

PetscStencil PetscGrid::getPetscStencilWithFinerLevel ( const VoFStencil & a_stencil,
const VoFStencil & a_fineStencil,
const int a_level,
const DataIndex & a_din,
const int a_phase ) const
virtualnoexcept

Rewrite a two-level stencil, over cells on a level and the next finer level, as a stencil over global PETSc rows.

This is the form produced by LeastSquares::computeDualLevelStencils for a stencil on level a_level that uses level a_level+1 cells. a_stencil resolves as in the single-level version. a_fineStencil is over cells on level a_level+1, in the index space of grid a_din refined to level a_level+1 (getMFLevelGridsFiCo), and each of its entries must be a PETSc row on level a_level+1.

Parameters
[in]a_stencilStencil over cells on level a_level.
[in]a_fineStencilStencil over cells on level a_level+1.
[in]a_levelGrid level of a_stencil. Must be below the finest level.
[in]a_dinGrid index on level a_level.
[in]a_phasePhase.
Returns
The sum of both stencils, over global PETSc rows, compressed (unique, ascending rows).

◆ getPetscStencilWithGhostCells()

PetscStencil PetscGrid::getPetscStencilWithGhostCells ( const VoFStencil & a_stencilCoar,
const VoFStencil & a_stencil,
const VoFStencil & a_stencilFine,
const RefCountedPtr< EBMultigridInterpolator > & a_interpolator,
const int a_level,
const DataIndex & a_din,
const int a_phase ) const
virtualnoexcept

Rewrite a stencil over three levels, whose part on the middle level may contain coarse-fine ghost cells, as a stencil over global PETSc rows.

The ghost cells in a_stencil are replaced as in replaceGhostCells. The parts then resolve as in getPetscStencilWithCoarserLevel and getPetscStencilWithFinerLevel: a_stencilCoar is in the index space of grid a_din coarsened, and a_stencilFine in the index space of grid a_din refined. Aborts if the coarse part is not empty on level 0, or the fine part on the finest level.

Parameters
[in]a_stencilCoarStencil over cells on level a_level - 1
[in]a_stencilStencil over cells on level a_level, possibly with coarse-fine ghost cells
[in]a_stencilFineStencil over cells on level a_level + 1
[in]a_interpolatorCoarse-fine interpolator of level a_level, for phase a_phase. Null on level 0.
[in]a_levelGrid level of a_stencil
[in]a_dinGrid index on level a_level
[in]a_phasePhase
Returns
The sum of the three stencils, over global PETSc rows, compressed (unique, ascending rows).

◆ getRefinementRatios()

const Vector< int > & PetscGrid::getRefinementRatios ( ) const
virtualnoexcept

Get the refinement ratios.

Entry lvl is the refinement ratio between level lvl and level lvl+1.

Returns
m_refRat

◆ getVoFIterator()

Vector< RefCountedPtr< LayoutData< VoFIterator > > > & PetscGrid::getVoFIterator ( const int a_iphase) const
virtualnoexcept

Get iterators over the cut cells that are PETSc rows on a phase.

Non-const because a VoFIterator must be reset to be iterated over.

Parameters
[in]a_iphasePhase index
Returns
m_vofIterators[a_iphase], one LayoutData per level.

◆ isDefined()

bool PetscGrid::isDefined ( ) const
virtualnoexcept

Is defined or not.

Returns
True if the grid has been defined.

◆ putChomboInPetsc()

void PetscGrid::putChomboInPetsc ( Vec & a_x,
const MFAMRCellData & a_y ) const
virtualnoexcept

Push data form a chombo-discharge data holder into PETSc.

Parameters
[out]a_xPETSc vector
[in]a_ychombo-discharge data holder

◆ putPetscInChombo()

void PetscGrid::putPetscInChombo ( MFAMRCellData & a_y,
const Vec & a_x ) const
virtualnoexcept

Pull data from a PETSc vector into a chombo-discharge data holder.

Parameters
[in,out]a_ychombo-discharge data holder
[in]a_xPETSc vector

◆ replaceGhostCells()

void PetscGrid::replaceGhostCells ( VoFStencil & a_stencil,
VoFStencil & a_stencilCoar,
const RefCountedPtr< EBMultigridInterpolator > & a_interpolator,
const int a_level,
const DataIndex & a_din ) const
virtualnoexcept

Replace the coarse-fine ghost cells in a stencil over level a_level cells by their interpolation stencils.

Each ghost cell entry is removed from a_stencil, and its stencil from EBMultigridInterpolator::getGhostStencil, times the entry's weight, is added to a_stencil (the part on level a_level) and a_stencilCoar (the part on level a_level - 1, in the index space of grid a_din coarsened). Entries that are not ghost cells are kept. Aborts if a_stencil has a ghost cell and a_interpolator is null.

Parameters
[in,out]a_stencilStencil over cells on level a_level
[in,out]a_stencilCoarStencil over cells on level a_level - 1
[in]a_interpolatorCoarse-fine interpolator of level a_level, for the phase of the stencil. Null on level 0.
[in]a_levelGrid level
[in]a_dinGrid index on the level

◆ setValue()

void PetscGrid::setValue ( Vec & a_x,
const PetscScalar a_value ) const
virtualnoexcept

Set values in a PETSc vector.

a_value Does not need to be the same across all ranks.

Parameters
[in,out]a_xGlobal PETSc vector
[in]a_valueValue to set

Member Data Documentation

◆ m_amrToPetsc

Vector<RefCountedPtr<LevelData<BaseFab<PetscAMRCell> > > > PetscGrid::m_amrToPetsc
protected

Mapping structure for moving between AMR cells and PETSc rows.

PetscAMRCell contains extra information, such as whether or not a cell is a ghost cell, covered by another cell, etc.

Note
This holds global PETSc rows, also in ghost cells. Subtract m_localRowBegin to get the local row.

◆ m_amrToPetscCoFi

Vector<RefCountedPtr<LevelData<BaseFab<PetscAMRCell> > > > PetscGrid::m_amrToPetscCoFi
protected

Mapping structure for moving between AMR cells and PETSc rows.

This is like m_amrToPetsc, except that it is defined on the coarsened grids. Index i thus contains the coarsening of level i+1.

Note
This holds global PETSc rows.

◆ m_amrToPetscFiCo

Vector<RefCountedPtr<LevelData<BaseFab<PetscAMRCell> > > > PetscGrid::m_amrToPetscFiCo
protected

Mapping structure for moving between AMR cells and PETSc rows.

This is like m_amrToPetsc, except that it is defined on the refined. Index i+1 thus contains the refinement of level i.

Note
This holds global PETSc rows.

◆ m_petscToAMR

Vector<RefCountedPtr<LayoutData<Vector<PetscDOF> > > > PetscGrid::m_petscToAMR[2]
protected

Mapping of PETSc local row index back to AMR.

Locally owned. Maps a local row index to a level/grid/cell.

◆ m_vofIterators

Vector<RefCountedPtr<LayoutData<VoFIterator> > > PetscGrid::m_vofIterators[2]
mutableprotected

Iterators over the cut cells that are PETSc rows, per phase and level.

Mutable because iterating over a VoFIterator resets it.


The documentation for this class was generated from the following files: