EBCoarsen Class Reference

#include <EBCoarsen.H>

Collaboration diagram for EBCoarsen:

Collaboration graph
[legend]

List of all members.


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.

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)


Constructor & Destructor Documentation

EBCoarsen::EBCoarsen (  ) 

Default constructor. User must subsequently call define().

EBCoarsen::~EBCoarsen (  ) 

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::EBCoarsen ( const EBCoarsen ebcin  )  [inline, private]

References MayDay::Error().


Member Function Documentation

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.

bool EBCoarsen::isDefined (  )  const

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

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.

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

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

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

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]

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

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]

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

void EBCoarsen::setDefaultValues (  )  [protected]

void EBCoarsen::operator= ( const EBCoarsen fabin  )  [inline, private]

References MayDay::Error().


Member Data Documentation

bool EBCoarsen::m_isDefined [protected]

int EBCoarsen::m_refRat [protected]

int EBCoarsen::m_nComp [protected]


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

Generated on Tue Apr 14 14:23:09 2009 for Chombo + EB by  doxygen 1.5.5