Chombo + EB + MF  3.2
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
EBCoarsen Class Reference

replaces coarse level data with a coarsening of fine level data. More...

#include <EBCoarsen.H>

Public Member Functions

 EBCoarsen ()
 
 ~EBCoarsen ()
 
 EBCoarsen (const EBLevelGrid &eblgFine, const EBLevelGrid &eblgCoar, const int &nref, const int &nvar)
 
void define (const EBLevelGrid &eblgFine, const EBLevelGrid &eblgCoar, const int &nref, const int &nvar)
 
bool isDefined () const
 
void coarsenFine (LevelData< EBCellFAB > &a_coarData, const LevelData< EBCellFAB > &a_fineData, const Interval &a_variables)
 

Protected Member Functions

void defineStencil (const LayoutData< IntVectSet > &a_cfivs)
 
void coarsenIrreg (EBCellFAB &a_coar, const EBCellFAB &a_fine, const DataIndex &a_dit, const Interval &a_variables)
 
void checkStencil (VoFStencil &a_stencil, const Real &a_sum) const
 
bool getVofsSideDir (Vector< VolIndex > &a_vofList, const VolIndex &a_vof, const IntVectSet &a_cfivs, const EBISBox &a_ebisBox, const int &a_dir, const Side::LoHiSide &a_side, const int &a_stepSize) const
 
void addWeight (VoFStencil &a_stencil, const Vector< VolIndex > &a_vofList, const Real &a_weight, const bool &a_hasVof) const
 
void getCoarsenVoFStencil (VoFStencil &a_stencil, const EBISBox &a_ebisBoxCoar, const EBISBox &a_ebisBoxFine, const VolIndex &a_vofCoar, const DataIndex &a_datInd, const IntVectSet &a_cfivs)
 
void coarsenFAB (EBCellFAB &a_coar, const EBCellFAB &a_fine, const DataIndex &a_datInd, const Interval &a_variables)
 
void setDefaultValues ()
 

Protected Attributes

bool m_isDefined
 
DisjointBoxLayout m_gridsCoar
 
DisjointBoxLayout m_gridsFine
 
DisjointBoxLayout m_coarsenedFineGrids
 
ProblemDomain m_domainCoar
 
ProblemDomain m_domainFine
 
EBISLayout m_ebislCoar
 
EBISLayout m_ebislFine
 
EBISLayout m_coarsenedFineEBISL
 
RefCountedPtr< LayoutData< IntVectSet > > m_cfivsPtr
 
int m_refRat
 
int m_nComp
 
LevelData< EBCellFABm_coarsenedFineData
 
LayoutData< BaseIVFAB< VoFStencil > > m_coarsenStencil
 
LayoutData< VoFIteratorm_vofIt
 

Private Member Functions

 EBCoarsen (const EBCoarsen &ebcin)
 
void operator= (const EBCoarsen &fabin)
 

Detailed Description

replaces coarse level data with a coarsening of fine level data.

This class replaces data at a coarse level of refinement with a coarsening of data at a finer level of refinement, in areas where fine data is present. Coarse level data is not modified where fine level data is not present.

Constructor & Destructor Documentation

◆ EBCoarsen() [1/3]

EBCoarsen::EBCoarsen ( )

Default constructor. User must subsequently call define().

◆ ~EBCoarsen()

EBCoarsen::~EBCoarsen ( )

◆ EBCoarsen() [2/3]

EBCoarsen::EBCoarsen ( const EBLevelGrid eblgFine,
const EBLevelGrid eblgCoar,
const int &  nref,
const int &  nvar 
)

Defining constructor. Constructs a valid object. Equivalent to default construction followed by define().

{ Arguments:}\ eblgFine, eblgCoar: The fine and coarse layouts of the data.\ nref: The refinement ratio between the two levels. \ nvar: The number of variables contained in the data at each VoF.

◆ EBCoarsen() [3/3]

EBCoarsen::EBCoarsen ( const EBCoarsen ebcin)
inlineprivate

References MayDay::Error().

Member Function Documentation

◆ define()

void EBCoarsen::define ( const EBLevelGrid eblgFine,
const EBLevelGrid eblgCoar,
const int &  nref,
const int &  nvar 
)

Defines this object. Existing information is overriden.

{ Arguments:}\ eblgFine, eblgCoar: The fine and coarse layouts of the data.\ nref: The refinement ratio between the two levels. \ nvar: The number of variables contained in the data at each VoF.

◆ isDefined()

bool EBCoarsen::isDefined ( ) const

Returns true if this object was created with the defining constructor or if define() has been called.

◆ coarsenFine()

void EBCoarsen::coarsenFine ( LevelData< EBCellFAB > &  a_coarData,
const LevelData< EBCellFAB > &  a_fineData,
const Interval a_variables 
)

Replaces a_coarse_data with the coarsening of a_fine_data within the coarsening of the domain of the fine level. This is different from averaging in that we are trying to approximate the coarse value at the cell center. (averaging approximates the average over the cell) Elsewhere, the coarse data is unchanged. It is an error to call if not this->isDefined(). The domain of a_fine_data should be the same as the fine domain specified in the most recent call to define(). It is expected that the coarse and fine level's domains are properly nested. Both a_coarse_data and a_fine_data should have the same number of components specified in the most recent call to define(). a_fine_data needs pre-filled ghost cells of size 1 ONLY IF refRat<4

{ Arguments:}\ coarData: The data over the coarse layout.\ fineData: The data over the fine layout. \ Fine and coarse data must have the same number of variables.\ variables: The variables to coarsen. Those not in this range will be left alone. This range of variables must be in both the coarse and fine data.

◆ defineStencil()

void EBCoarsen::defineStencil ( const LayoutData< IntVectSet > &  a_cfivs)
protected

◆ coarsenIrreg()

void EBCoarsen::coarsenIrreg ( EBCellFAB a_coar,
const EBCellFAB a_fine,
const DataIndex a_dit,
const Interval a_variables 
)
protected

◆ checkStencil()

void EBCoarsen::checkStencil ( VoFStencil a_stencil,
const Real a_sum 
) const
protected

◆ getVofsSideDir()

bool EBCoarsen::getVofsSideDir ( Vector< VolIndex > &  a_vofList,
const VolIndex a_vof,
const IntVectSet a_cfivs,
const EBISBox a_ebisBox,
const int &  a_dir,
const Side::LoHiSide a_side,
const int &  a_stepSize 
) const
protected

◆ addWeight()

void EBCoarsen::addWeight ( VoFStencil a_stencil,
const Vector< VolIndex > &  a_vofList,
const Real a_weight,
const bool &  a_hasVof 
) const
protected

◆ getCoarsenVoFStencil()

void EBCoarsen::getCoarsenVoFStencil ( VoFStencil a_stencil,
const EBISBox a_ebisBoxCoar,
const EBISBox a_ebisBoxFine,
const VolIndex a_vofCoar,
const DataIndex a_datInd,
const IntVectSet a_cfivs 
)
protected

◆ coarsenFAB()

void EBCoarsen::coarsenFAB ( EBCellFAB a_coar,
const EBCellFAB a_fine,
const DataIndex a_datInd,
const Interval a_variables 
)
protected

◆ setDefaultValues()

void EBCoarsen::setDefaultValues ( )
protected

◆ operator=()

void EBCoarsen::operator= ( const EBCoarsen fabin)
inlineprivate

References MayDay::Error().

Member Data Documentation

◆ m_isDefined

bool EBCoarsen::m_isDefined
protected

◆ m_gridsCoar

DisjointBoxLayout EBCoarsen::m_gridsCoar
protected

◆ m_gridsFine

DisjointBoxLayout EBCoarsen::m_gridsFine
protected

◆ m_coarsenedFineGrids

DisjointBoxLayout EBCoarsen::m_coarsenedFineGrids
protected

◆ m_domainCoar

ProblemDomain EBCoarsen::m_domainCoar
protected

◆ m_domainFine

ProblemDomain EBCoarsen::m_domainFine
protected

◆ m_ebislCoar

EBISLayout EBCoarsen::m_ebislCoar
protected

◆ m_ebislFine

EBISLayout EBCoarsen::m_ebislFine
protected

◆ m_coarsenedFineEBISL

EBISLayout EBCoarsen::m_coarsenedFineEBISL
protected

◆ m_cfivsPtr

RefCountedPtr<LayoutData<IntVectSet> > EBCoarsen::m_cfivsPtr
protected

◆ m_refRat

int EBCoarsen::m_refRat
protected

◆ m_nComp

int EBCoarsen::m_nComp
protected

◆ m_coarsenedFineData

LevelData<EBCellFAB> EBCoarsen::m_coarsenedFineData
protected

◆ m_coarsenStencil

LayoutData<BaseIVFAB<VoFStencil> > EBCoarsen::m_coarsenStencil
protected

◆ m_vofIt

LayoutData<VoFIterator> EBCoarsen::m_vofIt
protected

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