|
| EBGradient ()=delete |
| Disallowed constructor.
|
|
| EBGradient (const EBGradient &a_other)=delete |
| Disallowed copy constructor.
|
|
| EBGradient (const EBLevelGrid &a_eblg, const EBLevelGrid &a_eblgFine, const EBLevelGrid &a_eblgFiCo, const bool a_hasFine, const Real a_dx, const int a_refRat, const int a_order, const int a_weighting, const IntVect a_ghostVector) noexcept |
| Full constructor. Calsl the define function. More...
|
|
virtual | ~EBGradient () noexcept |
| Destructor (does nothing)
|
|
virtual void | define (const EBLevelGrid &a_eblg, const EBLevelGrid &a_eblgFine, const EBLevelGrid &a_eblgFiCo, const bool a_hasFine, const Real a_dx, const int a_refRat, const int a_order, const int a_weighting, const IntVect a_ghostVector) noexcept |
| Define function. More...
|
|
virtual void | computeLevelGradient (LevelData< EBCellFAB > &a_gradient, const LevelData< EBCellFAB > &a_phi) const noexcept |
| Compute gradient using data on the input level only. More...
|
|
virtual void | computeNormalDerivative (LevelData< EBFluxFAB > &a_gradient, const LevelData< EBCellFAB > &a_phi) const noexcept |
| Compute the gradient component which is normal to the face, using centered differencing. More...
|
|
virtual void | computeAMRGradient (LevelData< EBCellFAB > &a_gradient, const LevelData< EBCellFAB > &a_phi, const LevelData< EBCellFAB > &a_phiFine) const noexcept |
| Compute gradient using two-level stencils (matching at EBCF). More...
|
|
|
virtual void | defineLevelStencils () noexcept |
| Define level stencils.
|
|
virtual void | defineMasks (LevelData< FArrayBox > &a_coarMaskCF, LevelData< FArrayBox > &a_coarMaskInvalid) noexcept |
| Make masks. More...
|
|
virtual void | defineIteratorsEBCF (const LevelData< FArrayBox > &a_coarMaskCF, const LevelData< FArrayBox > &a_coarMaskInvalid) noexcept |
| Define iterators and cells that need modified stencils. More...
|
|
virtual void | defineStencilsEBCF (const LevelData< FArrayBox > &a_coarMaskInvalid) noexcept |
| Define stencils for interpolation across the EBCF refinement boundary. More...
|
|
virtual void | defineBuffers () noexcept |
| Define buffer data.
|
|
virtual bool | getFiniteDifferenceStencil (VoFStencil &a_stencil, const VolIndex &a_vof, const EBISBox &a_ebisBox, const DenseIntVectSet &a_invalidRegion, const Real a_dx) const noexcept |
| Get a finite difference stencil, assuming that the data is cell-centered. More...
|
|
virtual bool | getLeastSquaresStencil (VoFStencil &a_stencilCoar, VoFStencil &a_stencilFine, const VolIndex &a_vofCoar, const CellLocation &a_dataLocation, const EBISLayout &a_ebislCoar, const EBISLayout &a_ebislFine, const DataIndex &a_dit, const DenseIntVectSet &a_validCellsCoar, const DenseIntVectSet &a_validCellsFine, const Real &a_dxCoar, const Real &a_dxFine, const int &a_order, const int &a_weight) const noexcept |
| Build a gradient stencil using least squares. More...
|
|
virtual bool | isFiniteDifferenceStencilValid (const IntVect &a_ivCoar, const EBISBox &a_ebisBox, const FArrayBox &a_invalidRegion) const noexcept |
| Check if a cell can produce valid finite difference stencils. More...
|
|
virtual void | makeAggStencils () noexcept |
| Turn raw stencils into optimized AggStencils.
|
|
|
CellLocation | m_dataLocation |
| How to interpret data locations.
|
|
EBLevelGrid | m_eblg |
| Grids.
|
|
EBLevelGrid | m_eblgFine |
| Fine grids.
|
|
EBLevelGrid | m_eblgFiCo |
| Refined coarse grids.
|
|
bool | m_isDefined |
| Is defined or not.
|
|
bool | m_hasFine |
| True if we have a finer level (m_eblgFine is defined)
|
|
bool | m_hasEBCF |
| True if we have EBCF crossings that require special stencils.
|
|
Real | m_dx |
| Resolution on this level.
|
|
Real | m_dxFine |
| Resolution on finer level.
|
|
int | m_order |
| Desired order for least squares stencils.
|
|
int | m_weighting |
| Weight (for least squares)
|
|
int | m_refRat |
| Refinement factor between fine and coarse level.
|
|
IntVect | m_ghostVector |
| Number of ghost cells in incoming data holders.
|
|
Copier | m_copier |
| Pre-built copier for making copying from m_eblg to m_eblgFiCo go faster.
|
|
LayoutData< BaseIVFAB< VoFStencil > > | m_levelStencils |
| Stencils for boundaries and cut-cells. More...
|
|
LayoutData< BaseIVFAB< VoFStencil > > | m_ebcfStencilsCoar |
| Part of EBCF gradient stencil which reaches into the coarse level.
|
|
LayoutData< BaseIVFAB< VoFStencil > > | m_ebcfStencilsFine |
| Part of EBCF gradient stencil which reaches into the coarse level.
|
|
LayoutData< RefCountedPtr< AggStencil< EBCellFAB, EBCellFAB > > > | m_aggLevelStencils [SpaceDim] |
| AggStencils for boundaries and cut-cells. Provides faster application of m_levelStencils. More...
|
|
LayoutData< VoFIterator > | m_levelIterator |
| Iterator for boundary cells (either domain or EB) More...
|
|
LayoutData< VoFIterator > | m_ebcfIterator |
| Iterator for EBCF cells. More...
|
|
Class for computing gradients in an EBAMR context.
Although computing the gradient might seem like an easy thing to do, the presence of a coarse-fine boundary together with an EB complicates both the stencil availability and the consistent handling of the gradient on the coarse level. This class introduces a two-level view of such stencil computations. This class uses regular second order finite differencing in regular regions, including those covered by a finer level. Near the EB, however, the stencil might reach into cut-cells that are covered by the finer level. The invalid data might be filled with bogus data, or at the very best coarsened from the fine level. Since there is no consistent way of doing that coarsening (both conserative and averaging make sense), this class switches to a least squares based approach for such cases. In those particular corner cases we only reach into valid regions in the domain. Because of that, the directional derivatives in those cells are in the form
d(phi)/dx = sum(vofCoar) w(vofCoar)*phi(vofCoar) + sum(vofFine)[w(vofFine)*phi(vofFine)]
i.e., the gradient is a two-level stencil.
Near the domain boundaries this routine switches to first order stencils.
- Note
- If there is no finer level, this class will compute regular second-order stencils away from the EB and switch to compact width-one stencils if there are not enough cells available near the EB.
-
This class requires at least one ghost cell.