Class which can interpolate ghost cells across the coarse-fine interface. To select an interpolation method, use the type argument.
More...
#include <CD_EBGhostCellInterpolator.H>
|
| enum | Type { PWC
, MinMod
, MonotonizedCentral
, Superbee
} |
| | Type of interpolation slopes supported.
|
| |
|
|
| EBGhostCellInterpolator () noexcept |
| | Weak constructor. Need to call define afterwards.
|
| |
|
| EBGhostCellInterpolator (const EBGhostCellInterpolator &a_other)=delete |
| | Disallowed copy constructor.
|
| |
| | EBGhostCellInterpolator (const EBLevelGrid &a_eblgFine, const EBLevelGrid &a_eblgCoFi, const EBLevelGrid &a_eblgCoar, const IntVect &a_ghostVector, const int a_refRat, const int a_ghostCF) noexcept |
| | Full constructor. Calls the define function.
|
| |
|
virtual | ~EBGhostCellInterpolator () noexcept |
| | Destructor (does nothing)
|
| |
| virtual void | define (const EBLevelGrid &a_eblgFine, const EBLevelGrid &a_eblgCoFi, const EBLevelGrid &a_eblgCoar, const IntVect &a_ghostVector, const int a_refRat, const int a_ghostCF) noexcept |
| | Define method. Puts object in usable state.
|
| |
| virtual void | interpolate (LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phiCoar, const Interval a_variables, const Type a_interpType) const noexcept |
| | Do inhomogeneous interpolation.
|
| |
|
|
virtual void | defineGhostRegions () noexcept |
| | Define ghost regions to be interpolated.
|
| |
|
virtual void | defineBuffers () noexcept |
| | Define buffers.
|
| |
| virtual void | interpolateRegular (FArrayBox &a_phiFine, const FArrayBox &a_phiCoar, const DataIndex &a_dit, const int a_fineVar, const int a_coarVar, const Type a_interpType) const noexcept |
| | Regular interpolation, as if the EB was not there.
|
| |
| virtual void | interpolateIrregular (EBCellFAB &a_phiFine, const EBCellFAB &a_phiCoar, const DataIndex &a_dit, const int a_fineVar, const int a_coarVar, const Type a_interpType) const noexcept |
| | Ghost cell interpolation near the EB, correcting slopes that broke in interpolateRegular.
|
| |
|
| static Real | minmod (const Real &dwl, const Real &dwr) noexcept |
| | minmod slope function.
|
| |
| static Real | superbee (const Real &dwl, const Real &dwr) noexcept |
| | Superbee slope limiter.
|
| |
| static Real | monotonizedCentral (const Real &dwl, const Real &dwr) noexcept |
| | Monotonized central difference slope limiter.
|
| |
|
|
bool | m_isDefined |
| | Is defined or not.
|
| |
|
EBLevelGrid | m_eblgFine |
| | Fine grids.
|
| |
|
EBLevelGrid | m_eblgCoar |
| | Coarse grids.
|
| |
|
EBLevelGrid | m_eblgCoFi |
| | Coarsened fine grids.
|
| |
|
IntVect | m_ghostVector |
| | Minimum number of ghost cells in input data.
|
| |
|
int | m_refRat |
| | Refinement factor between fine and coarse level.
|
| |
| int | m_ghostCF |
| | Number of ghost cells to fill across coarse-fine interface.
|
| |
|
LayoutData< std::map< std::pair< int, Side::LoHiSide >, Box > > | m_regularGhostRegions |
| | Regular ghost regions to be interpolated.
|
| |
|
Copier | m_copier |
| | Copier for making copying from m_eblgCoar to m_grownCoarData go faster.
|
| |
| LevelData< EBCellFAB > | m_coarsenedFineData |
| | Buffer holding the coarse-grid data on the coarsened fine grids.
|
| |
| LayoutData< BaseIVFAB< VolIndex > > | m_coarsenedFineGhosts |
| | List of coarse-grid cells that appear through coarsening a fine-grid ghost cell.
|
| |
|
LayoutData< VoFIterator > | m_fineIrregCells |
| | Fine-grid ghost cells on the coarse-fine interface that overlap an irregular coarse cell.
|
| |
|
LayoutData< VoFIterator > | m_coarIrregCells |
| | Coarse-grid cells on the caorse-side of the interface that are irregular cells.
|
| |
|
LayoutData< BaseIVFAB< Real > > | m_coarIrregSlopes |
| | Buffer data defined on the coarsened fine grids (over m_coarIrregCells). Used for holding slopes in the coarse-grid cut-cells.
|
| |
Class which can interpolate ghost cells across the coarse-fine interface. To select an interpolation method, use the type argument.
This class works by computing slopes on the coarse grid. We then interpolate within the coarse-grid cell to the fine-grid ghost cell, using the computed slopes. Note that all fine-grid ghost cells are interpolated from the coarse grid. Thus, this interpolator is useless for multigrid.
◆ EBGhostCellInterpolator()
| EBGhostCellInterpolator::EBGhostCellInterpolator |
( |
const EBLevelGrid & |
a_eblgFine, |
|
|
const EBLevelGrid & |
a_eblgCoFi, |
|
|
const EBLevelGrid & |
a_eblgCoar, |
|
|
const IntVect & |
a_ghostVector, |
|
|
const int |
a_refRat, |
|
|
const int |
a_ghostCF |
|
) |
| |
|
noexcept |
Full constructor. Calls the define function.
- Parameters
-
| [in] | a_eblgFine | Fine grids |
| [in] | a_eblgCoFi | Coarsened fine grids |
| [in] | a_eblgCoar | Coarse grids |
| [in] | a_ghostVector | (Minimum) number of ghost cells in input/output data. |
| [in] | a_refRat | Refinement ratio between coarse and fine grids. |
| [in] | a_ghostCF | Width of the ghost region to be filled. Only relevant near the EBCF. |
◆ define()
| void EBGhostCellInterpolator::define |
( |
const EBLevelGrid & |
a_eblgFine, |
|
|
const EBLevelGrid & |
a_eblgCoFi, |
|
|
const EBLevelGrid & |
a_eblgCoar, |
|
|
const IntVect & |
a_ghostVector, |
|
|
const int |
a_refRat, |
|
|
const int |
a_ghostCF |
|
) |
| |
|
virtualnoexcept |
Define method. Puts object in usable state.
- Parameters
-
| [in] | a_eblgFine | Fine grids |
| [in] | a_eblgCoFi | Coarsened fine grids |
| [in] | a_eblgCoar | Coarse grids |
| [in] | a_ghostVector | (Minimum) number of ghost cells in input/output data. |
| [in] | a_refRat | Refinement ratio between coarse and fine grids. |
| [in] | a_ghostCF | Width of the ghost region to be filled. Only relevant near the EBCF. |
◆ interpolate()
| void EBGhostCellInterpolator::interpolate |
( |
LevelData< EBCellFAB > & |
a_phiFine, |
|
|
const LevelData< EBCellFAB > & |
a_phiCoar, |
|
|
const Interval |
a_variables, |
|
|
const Type |
a_interpType |
|
) |
| const |
|
virtualnoexcept |
Do inhomogeneous interpolation.
This fills the fine-grid ghost cells that lie across the coarse-fine interface, interpolating them from the coarse grid. The coarse data is fetched into an internal buffer on the coarsened fine grids, so a_phiCoar's own ghost cells are not read and need not be valid.
- Note
- This routine does not exchange, and on return a_phiFine's ghost cells are not consistent. Two separate things are left to the caller. First, the ghost cells that are covered by a neighbouring patch on the fine level are not part of the coarse-fine region and are never filled here. Second, some of those cells are actively overwritten with interpolated values, because the interpolated region is stored as the bounding box of the coarse-fine ghost cells rather than as the cell set itself, and that box spans neighbour-owned cells whenever the set is not rectangular. The caller must therefore exchange a_phiFine before anything reads its ghost cells.
- Parameters
-
| [in,out] | a_phiFine | Fine phi |
| [in] | a_phiCoar | Coarse phi |
| [in] | a_variables | Variables to interpolate |
| [in] | a_interpType | Interp type |
◆ interpolateIrregular()
| void EBGhostCellInterpolator::interpolateIrregular |
( |
EBCellFAB & |
a_phiFine, |
|
|
const EBCellFAB & |
a_phiCoar, |
|
|
const DataIndex & |
a_dit, |
|
|
const int |
a_fineVar, |
|
|
const int |
a_coarVar, |
|
|
const Type |
a_interpType |
|
) |
| const |
|
protectedvirtualnoexcept |
Ghost cell interpolation near the EB, correcting slopes that broke in interpolateRegular.
- Parameters
-
| [in] | a_phiFine | Fine-grid data |
| [in] | a_phiCoar | Coarse-grid data |
| [in] | a_dit | Grid index on the fine grid |
| [in] | a_fineVar | Fine-grid variable |
| [in] | a_coarVar | Coarse-grid variable |
| [in] | a_interpType | Interp type |
◆ interpolateRegular()
| void EBGhostCellInterpolator::interpolateRegular |
( |
FArrayBox & |
a_phiFine, |
|
|
const FArrayBox & |
a_phiCoar, |
|
|
const DataIndex & |
a_dit, |
|
|
const int |
a_fineVar, |
|
|
const int |
a_coarVar, |
|
|
const Type |
a_interpType |
|
) |
| const |
|
protectedvirtualnoexcept |
Regular interpolation, as if the EB was not there.
- Parameters
-
| [in] | a_phiFine | Fine-grid data |
| [in] | a_phiCoar | Coarse-grid data |
| [in] | a_dit | Grid index on the fine grid |
| [in] | a_fineVar | Fine-grid variable |
| [in] | a_coarVar | Coarse-grid variable |
| [in] | a_interpType | Interp type |
◆ minmod()
| Real EBGhostCellInterpolator::minmod |
( |
const Real & |
dwl, |
|
|
const Real & |
dwr |
|
) |
| |
|
inlinestaticprotectednoexcept |
minmod slope function.
- Parameters
-
| [in] | dwl | Left slope |
| [in] | dwr | Right slope |
- Returns
- Return value
◆ monotonizedCentral()
| Real EBGhostCellInterpolator::monotonizedCentral |
( |
const Real & |
dwl, |
|
|
const Real & |
dwr |
|
) |
| |
|
inlinestaticprotectednoexcept |
Monotonized central difference slope limiter.
- Parameters
-
| [in] | dwl | Left slope |
| [in] | dwr | Right slope |
- Returns
- Return value
◆ superbee()
| Real EBGhostCellInterpolator::superbee |
( |
const Real & |
dwl, |
|
|
const Real & |
dwr |
|
) |
| |
|
staticprotectednoexcept |
Superbee slope limiter.
- Parameters
-
| [in] | dwl | Left slope |
| [in] | dwr | Right slope |
- Returns
- Return value
◆ m_coarsenedFineData
| LevelData<EBCellFAB> EBGhostCellInterpolator::m_coarsenedFineData |
|
mutableprotected |
Buffer holding the coarse-grid data on the coarsened fine grids.
This is filled by a single copyTo from the coarse level, for all the interpolated variables at once. Keeping it as a member avoids rebuilding an EBCellFactory and reallocating the entire coarsened-fine layout on every call. It is sized in defineBuffers, i.e. once per regrid, and holds SpaceDim components: that covers the scalar and vector fields which make up every call on the hot path. The rare wider call – physics plot variables, whose count is set by the user's model – uses a local buffer instead, so the resident footprint stays bounded regardless of how many plot variables a model declares.
◆ m_coarsenedFineGhosts
| LayoutData<BaseIVFAB<VolIndex> > EBGhostCellInterpolator::m_coarsenedFineGhosts |
|
protected |
List of coarse-grid cells that appear through coarsening a fine-grid ghost cell.
This is used to accelerate interpolation fine-grid cut-cells that are also ghost cells. Doing this to avoid in-place coarsening of the fine grid ghost cell.
◆ m_ghostCF
| int EBGhostCellInterpolator::m_ghostCF |
|
protected |
Number of ghost cells to fill across coarse-fine interface.
- Note
- Only applies the the cut-cells.
The documentation for this class was generated from the following files: