13 #ifndef CD_EBMultigridInterpolator_H
14 #define CD_EBMultigridInterpolator_H
20 #include <EBLevelGrid.H>
21 #include <QuadCFInterp.H>
22 #include <AggStencil.H>
26 #include <CD_NamespaceHeader.H>
77 const EBLevelGrid& a_eblgCoar,
79 const IntVect& a_ghostVector,
83 const int a_weighting = 0);
103 coarseFineInterp(LevelData<EBCellFAB>& a_phiFine,
const LevelData<EBCellFAB>& a_phiCoar,
const Interval a_variables);
116 const LevelData<EBCellFAB>& a_phiCoar,
117 const Interval a_variables);
148 coarseFineInterpH(EBCellFAB& a_phiFine,
const Interval a_variables,
const DataIndex& a_dit)
const;
286 LayoutData<std::map<std::pair<int, Side::LoHiSide>, Box>>
m_cfivs;
300 defineGrids(
const EBLevelGrid& a_eblgFine,
const EBLevelGrid& a_eblgCoar);
339 VoFStencil& a_stencilCoar,
341 const VolIndex& a_ghostVofFine,
342 const VolIndex& a_ghostVofCoar,
343 const EBISBox& a_ebisboxFine,
344 const EBISBox& a_ebisboxCoar,
345 const DenseIntVectSet& a_validFineCells,
346 const DenseIntVectSet& a_validCoarCells,
347 const Real& a_dxFine,
348 const Real& a_dxCoar,
350 const int& a_weight);
353 #include <CD_NamespaceFooter.H>
Declaration of cell positions.
Multigrid interpolator class.
Definition: CD_EBMGLeastSquaresInterpolator.H:48
void slowCoarseFineInterpH(EBCellFAB &a_phiFine, const Interval a_variables, const DataIndex &a_dit) const
Do homogeneous coarse-fine interpolation on a grid patch.
RefCountedPtr< QuadCFInterp > m_scalarInterpolator
For regular interpolation of scalar quantities.
Definition: CD_EBMGLeastSquaresInterpolator.H:182
void defineStencilsEBCF()
Define stencils for interpolation across the EBCF refinement boundary.
void coarseFineInterpH(LevelData< EBCellFAB > &a_phiFine, const Interval a_variables) const
Do homogeneous interpolation.
BoxLayoutData< EBCellFAB > m_grownCoarData
Coarsened data.
Definition: CD_EBMGLeastSquaresInterpolator.H:217
void makeAggStencils()
Build the AggStencil objects for faster stencil aggregation.
void coarseFineInterpH(EBCellFAB &a_phiFine, const Interval a_variables, const DataIndex &a_dit) const
Do homogeneous coarse-fine interpolation on a grid patch.
EBLevelGrid m_eblgFine
Fine grids.
Definition: CD_EBMGLeastSquaresInterpolator.H:197
static constexpr int m_comp
Component number. Used for setting interval when data is copied into EBMultigridInterpolator's buffer...
Definition: CD_EBMGLeastSquaresInterpolator.H:177
EBMultigridInterpolator(const EBMultigridInterpolator &a_other)=delete
Disallowed copy constructor.
void defineGhostRegions()
Define ghost cells to be filled in range m_ghostCF from each cut-cell.
static constexpr int m_stenComp
Component that interpolation stencil is stored at.
Definition: CD_EBMGLeastSquaresInterpolator.H:167
EBLevelGrid m_eblgCoFi
Refined coarse grids.
Definition: CD_EBMGLeastSquaresInterpolator.H:207
void slowCoarseFineInterp(LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phiCoar, const Interval a_variables)
Do inhomogeneous interpolation.
void slowCoarseFineInterpH(LevelData< EBCellFAB > &a_phiFine, const Interval a_variables) const
Do homogeneous interpolation.
int getGhostCF() const
Return number of ghost cells across CF interface.
void defineGrids(const EBLevelGrid &a_eblgFine, const EBLevelGrid &a_eblgCoar)
Define grids.
LayoutData< RefCountedPtr< AggStencil< EBCellFAB, EBCellFAB > > > m_aggFineStencils
Fine grid interpolation stencils.
Definition: CD_EBMGLeastSquaresInterpolator.H:272
static constexpr int m_numStenComp
Number of variables in stencil data layouts.
Definition: CD_EBMGLeastSquaresInterpolator.H:172
~EBMultigridInterpolator()
Destructor (does nothing)
Definition: CD_EBMultigridInterpolator.cpp:24
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.
void defineBuffers()
Define data holders.
CellLocation m_dataLocation
How to interpret data locations.
Definition: CD_EBMGLeastSquaresInterpolator.H:192
IntVect m_ghostVector
Minimum number of ghost cells in input data.
Definition: CD_EBMGLeastSquaresInterpolator.H:227
BoxLayout m_grownCoarBoxesLayout
Grown box layout on the coarse level.
Definition: CD_EBMGLeastSquaresInterpolator.H:212
LayoutData< BaseIVFAB< VoFStencil > > m_fineStencils
Fine-grid interpolation stencils.
Definition: CD_EBMGLeastSquaresInterpolator.H:259
int m_ghostCF
Number of ghost cells to fill across coarse-fine interface.
Definition: CD_EBMGLeastSquaresInterpolator.H:238
LayoutData< BaseIVFAB< VoFStencil > > m_coarStencils
Coarse-grid interpolation stencils.
Definition: CD_EBMGLeastSquaresInterpolator.H:264
LayoutData< VoFIterator > m_vofIterFine
Iterator over ghost cells.
Definition: CD_EBMGLeastSquaresInterpolator.H:222
int m_weight
Least squares weighting factor.
Definition: CD_EBMGLeastSquaresInterpolator.H:248
LayoutData< RefCountedPtr< AggStencil< EBCellFAB, EBCellFAB > > > m_aggCoarStencils
Coarse-grid interpolation stencils.
Definition: CD_EBMGLeastSquaresInterpolator.H:279
RefCountedPtr< QuadCFInterp > m_vectorInterpolator
For regular interpolation of vector quantities.
Definition: CD_EBMGLeastSquaresInterpolator.H:187
EBLevelGrid m_eblgCoar
Coarse grids.
Definition: CD_EBMGLeastSquaresInterpolator.H:202
int m_refRat
Refinement factor between fine and coarse level.
Definition: CD_EBMGLeastSquaresInterpolator.H:232
LayoutData< std::map< std::pair< int, Side::LoHiSide >, Box > > m_cfivs
Regular coarse-fine interface boxes.
Definition: CD_EBMGLeastSquaresInterpolator.H:286
EBMultigridInterpolator()=delete
Disallowed constructor.
Definition: CD_EBMultigridInterpolator.cpp:19
int m_order
Interpolation order.
Definition: CD_EBMGLeastSquaresInterpolator.H:243
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.
LayoutData< IntVectSet > m_ghostCells
Ghost cells that will be interpolated near the cut-cells.
Definition: CD_EBMGLeastSquaresInterpolator.H:254
void coarseFineInterp(LevelData< EBCellFAB > &a_phiFine, const LevelData< EBCellFAB > &a_phiCoar, const Interval a_variables)
Do inhomogeneous interpolation.
Cell
Enum for distinguishing between cell locations.
Definition: CD_Location.H:30