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

Class for restricting multigrid residual onto a coarser grid. More...

#include <CD_EBMGRestrict.H>

Public Member Functions

 EBMGRestrict () noexcept
 Default constructor. User must subsequently call the define function.
 EBMGRestrict (const EBLevelGrid &a_eblgFine, const EBLevelGrid &a_eblgCoFi, const EBLevelGrid &a_eblgCoar, const int &a_refRat) noexcept
 Full constructor. Calls the define function.
virtual ~EBMGRestrict () noexcept
 Destructor.
virtual void define (const EBLevelGrid &a_eblgFine, const EBLevelGrid &a_eblgCoFi, const EBLevelGrid &a_eblgCoar, const int &a_refRat) noexcept
 Define function.
virtual void restrictResidual (LevelData< EBCellFAB > &a_coarData, const LevelData< EBCellFAB > &a_fineData, const Interval a_variables) const noexcept
 Restrict residual onto the coarse grid.

Protected Attributes

bool m_isDefined
 Defined or not.
int m_refRat
 Refinement ratio.
IntVect m_ghostPhi
 Number of ghost cells in data holders.
EBLevelGrid m_eblgFine
 Fine grid.
EBLevelGrid m_eblgCoar
 Coarse grid.
EBLevelGrid m_eblgCoFi
 Coarsened fine grids.
Copier m_copier
 Copier for making copying from the coarsened fine grids to the coarse grid go faster.
LayoutData< VoFIterator > m_vofitCoar
 Iterator for iterating over cut-cells on the coarse level.
LayoutData< BaseIVFAB< VoFStencil > > m_restrictStencils
 Restriction stencils near the EB.

Detailed Description

Class for restricting multigrid residual onto a coarser grid.

This class defines an operator for setting phiC = 1/Nref^D * sum(phiFine). This assumes that the input data has already been scaled by the volume fraction (which is what the EB multigrid operators do anyways).

Constructor & Destructor Documentation

◆ EBMGRestrict()

EBMGRestrict::EBMGRestrict ( const EBLevelGrid & a_eblgFine,
const EBLevelGrid & a_eblgCoFi,
const EBLevelGrid & a_eblgCoar,
const int & a_refRat )
noexcept

Full constructor. Calls the define function.

Parameters
[in]a_eblgFineFine level
[in]a_eblgCoFiFine level coarsened by a_refRat. Its EBISLayout must allow refinement by a_refRat.
[in]a_eblgCoarCoarse level
[in]a_refRatRefinement factor between levels.

Member Function Documentation

◆ define()

void EBMGRestrict::define ( const EBLevelGrid & a_eblgFine,
const EBLevelGrid & a_eblgCoFi,
const EBLevelGrid & a_eblgCoar,
const int & a_refRat )
virtualnoexcept

Define function.

Parameters
[in]a_eblgFineFine level
[in]a_eblgCoFiFine level coarsened by a_refRat. Its EBISLayout must allow refinement by a_refRat.
[in]a_eblgCoarCoarse level
[in]a_refRatRefinement factor between levels.

◆ restrictResidual()

void EBMGRestrict::restrictResidual ( LevelData< EBCellFAB > & a_coarData,
const LevelData< EBCellFAB > & a_fineData,
const Interval a_variables ) const
virtualnoexcept

Restrict residual onto the coarse grid.

This replaces the coarse-grid residual by an average of the fine-grid residual. Only affects the invalid region of the coarse grid.

Parameters
[in,out]a_coarDataCoarse-grid residual.
[in]a_fineDataFine-grid residual
[in]a_variablesVariables to restrict

Member Data Documentation

◆ m_restrictStencils

LayoutData<BaseIVFAB<VoFStencil> > EBMGRestrict::m_restrictStencils
protected

Restriction stencils near the EB.

The stencils are defined on the coarse-grid, but reach into the fine grid.


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