|
|
| EBMultigridInterpolator ()=delete |
| | Disallowed constructor.
|
| |
|
| EBMultigridInterpolator (const EBMultigridInterpolator &a_other)=delete |
| | Disallowed copy constructor.
|
| |
| | EBMultigridInterpolator (const EBLevelGrid &a_eblgFine, const EBLevelGrid &a_eblgCoar, const CellLocation a_dataLocation, const IntVect &a_ghostVector, const int a_refRat, const int a_ghostCF, const int a_order, const int a_weighting=0) |
| | Full constructor.
|
| |
|
| ~EBMultigridInterpolator () |
| | Destructor (does nothing)
|
| |
| int | getGhostCF () const |
| | Return number of ghost cells across CF interface.
|
| |
| void | coarseFineInterp (LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phiCoar, const Interval a_variables) |
| | Do inhomogeneous interpolation.
|
| |
| void | slowCoarseFineInterp (LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phiCoar, const Interval a_variables) |
| | Do inhomogeneous interpolation.
|
| |
| void | coarseFineInterpH (LevelData< EBCellFAB > &a_phiFine, const Interval a_variables) const |
| | Do homogeneous interpolation.
|
| |
| void | slowCoarseFineInterpH (LevelData< EBCellFAB > &a_phiFine, const Interval a_variables) const |
| | Do homogeneous interpolation.
|
| |
| void | coarseFineInterpH (EBCellFAB &a_phiFine, const Interval a_variables, const DataIndex &a_dit) const |
| | Do homogeneous coarse-fine interpolation on a grid patch.
|
| |
| void | slowCoarseFineInterpH (EBCellFAB &a_phiFine, const Interval a_variables, const DataIndex &a_dit) const |
| | Do homogeneous coarse-fine interpolation on a grid patch.
|
| |
|
| EBMultigridInterpolator () |
| | Basic constructor.
|
| |
|
| EBMultigridInterpolator (const EBMultigridInterpolator &a_other)=delete |
| | Disallowed copy constructor.
|
| |
|
virtual | ~EBMultigridInterpolator () |
| | Destructor (does nothing)
|
| |
| virtual int | getGhostCF () const =0 |
| | Return number of ghost cells across CF interface.
|
| |
| virtual std::pair< VoFStencil, VoFStencil > | getInterpolationStencilEB (const VolIndex &a_fineGhost, const DataIndex &a_din) const noexcept=0 |
| | Get an explicit stencil for a ghost cell near the EB.
|
| |
| virtual std::pair< DerivStencil, DerivStencil > | getInterpolationStencilRegular (const IntVect &a_fineGhost, const DataIndex &a_din, const int a_dir, const Side::LoHiSide a_side) const noexcept=0 |
| | Get the interpolation stencil near the refinement boundary.
|
| |
| virtual void | coarseFineInterp (LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phiCoar, const Interval a_variables) const =0 |
| | Do inhomogeneous interpolation.
|
| |
| virtual void | coarseFineInterpH (LevelData< EBCellFAB > &a_phiFine, const Interval a_variables) const =0 |
| | Do homogeneous interpolation.
|
| |
| virtual void | coarseFineInterpH (EBCellFAB &a_phiFine, const Interval a_variables, const DataIndex &a_din) const =0 |
| | Do homogeneous coarse-fine interpolation on a grid patch.
|
| |
|
|
void | defineGhostRegions () |
| | Define ghost cells to be filled in range m_ghostCF from each cut-cell.
|
| |
| void | defineGrids (const EBLevelGrid &a_eblgFine, const EBLevelGrid &a_eblgCoar) |
| | Define grids.
|
| |
|
void | defineBuffers () |
| | Define data holders.
|
| |
|
void | defineStencilsEBCF () |
| | Define stencils for interpolation across the EBCF refinement boundary.
|
| |
|
void | makeAggStencils () |
| | Build the AggStencil objects for faster stencil aggregation.
|
| |
| bool | getStencil (VoFStencil &a_stencilFine, VoFStencil &a_stencilCoar, const CellLocation &a_dataLocation, const VolIndex &a_ghostVofFine, const VolIndex &a_ghostVofCoar, const EBISBox &a_ebisboxFine, const EBISBox &a_ebisboxCoar, const DenseIntVectSet &a_validFineCells, const DenseIntVectSet &a_validCoarCells, const Real &a_dxFine, const Real &a_dxCoar, const int &a_order, const int &a_weight) |
| | Build an interpolation stencil.
|
| |
|
|
RefCountedPtr< QuadCFInterp > | m_scalarInterpolator |
| | For regular interpolation of scalar quantities.
|
| |
|
RefCountedPtr< QuadCFInterp > | m_vectorInterpolator |
| | For regular interpolation of vector quantities.
|
| |
|
CellLocation | m_dataLocation |
| | How to interpret data locations.
|
| |
|
EBLevelGrid | m_eblgFine |
| | Fine grids.
|
| |
|
EBLevelGrid | m_eblgCoar |
| | Coarse grids.
|
| |
|
EBLevelGrid | m_eblgCoFi |
| | Refined coarse grids.
|
| |
|
BoxLayout | m_grownCoarBoxesLayout |
| | Grown box layout on the coarse level.
|
| |
|
BoxLayoutData< EBCellFAB > | m_grownCoarData |
| | Coarsened data.
|
| |
|
LayoutData< VoFIterator > | m_vofIterFine |
| | Iterator over ghost cells.
|
| |
|
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.
|
| |
|
int | m_order |
| | Interpolation order.
|
| |
|
int | m_weight |
| | Least squares weighting factor.
|
| |
| LayoutData< IntVectSet > | m_ghostCells |
| | Ghost cells that will be interpolated near the cut-cells.
|
| |
|
LayoutData< BaseIVFAB< VoFStencil > > | m_fineStencils |
| | Fine-grid interpolation stencils.
|
| |
|
LayoutData< BaseIVFAB< VoFStencil > > | m_coarStencils |
| | Coarse-grid interpolation stencils.
|
| |
| LayoutData< RefCountedPtr< AggStencil< EBCellFAB, EBCellFAB > > > | m_aggFineStencils |
| | Fine grid interpolation stencils.
|
| |
| LayoutData< RefCountedPtr< AggStencil< EBCellFAB, EBCellFAB > > > | m_aggCoarStencils |
| | Coarse-grid interpolation stencils.
|
| |
| LayoutData< std::map< std::pair< int, Side::LoHiSide >, Box > > | m_cfivs |
| | Regular coarse-fine interface boxes.
|
| |
Multigrid interpolator class.
Multigrid interpolator parent class. Virtual because I want different implementations to do different things.
This interpolator class interpolates with classical multigrid-type interpolation where the interpolation stencils only reach into valid cells, ignoring the region underneath the fine level. Near regular refinement boundaries we use the conventional approach where we interpolate coarse data onto the line of cells that runs between the fine-grid cells and the ghost cell. This value is used together with the valid data on the fine-grid cells to interpolate the ghost cell to O(h^2). Near EBs this is much more complex since both the fine and coarse regions may be missing cells that make that interpolation possible. Worse, EB stencils may be much bigger than the 5/7-point Laplacian, requiring us to fill more ghost cells across the coarse-fine interface near the EB. We achieve this by switching to least-squares based interpolation here, again using only the valid fine and coarse-level cells. The way of achieving this consists of building dual-level stencils for each ghost cell; these stencils represent the part of the interpolation stencil that reach into the fine and coarse grids. For efficiency reasons, we copy the coarse grid data onto data layouts that may have more ghost cells than your regular data. Since the least squares stencils require a specified number of cells to reach specified order, this permits us to use fine-grid stencils that only reach into valid data without dropping order. This optimization is useful for pruning extra communications due homogeneous multigrid interpolation. This means that our interpolation, which is in the form
phiGhost = sum(vofCoar) w(vofCoar)*phi(vofCoar) + sum(vofFine)[w(vofFine)*phi(vofFine)]
will have a coarse and and a fine grid stencil, but the fine stencil does not reach out of the ghosted fine-grid patch. The fine-grid part of the stencil is thus allowed to use the ghost cells in the patch that are filled from neighboring patches.
- Note
- This class should work with data holders have exactly one component or SpaceDim components.