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

EBFastFR-A class to encapsulate a levels worth of flux registers. More...

#include <EBFastFR.H>

Inheritance diagram for EBFastFR:
Inheritance graph
[legend]

Public Member Functions

 EBFastFR ()
 
 EBFastFR (const EBLevelGrid &a_eblgFine, const EBLevelGrid &a_eblgCoar, const int &a_nref, const int &a_nvar, bool a_forceNoEBCF=false)
 
virtual ~EBFastFR ()
 
virtual void define (const EBLevelGrid &a_eblgFine, const EBLevelGrid &a_eblgCoar, const int &a_nref, const int &a_nvar, bool a_forceNoEBCF=false)
 
virtual void setToZero ()
 
virtual void incrementCoarseBoth (const EBFaceFAB &a_coarseFlux, const Real &a_scale, const DataIndex &a_coarseDataIndex, const Interval &a_variables, const int &a_dir, const Side::LoHiSide &a_sd)
 
virtual void incrementFineBoth (const EBFaceFAB &a_fineFlux, const Real &a_scale, const DataIndex &a_fineDataIndex, const Interval &a_variables, const int &a_dir, const Side::LoHiSide &a_sd)
 
void compareFineSparse (const EBFaceFAB &a_fluxOld, const EBFaceFAB &a_fluxNew, const DataIndex &a_fineDatInd, const int &a_dir, const Side::LoHiSide &a_sd)
 
virtual void incrementFineSparse (const EBFaceFAB &a_fineFlux, const Real &a_scale, const DataIndex &a_fineDatInd, const Interval &a_variables, const int &a_dir, const Side::LoHiSide &a_sd, bool a_doingFineRegular)
 to support baseiffab approach More...
 
virtual void reflux (LevelData< EBCellFAB > &a_uCoarse, const Interval &a_variables, const Real &a_scale, bool a_multByKappaOneMinusKappa=false)
 
virtual void reflux (LevelData< EBCellFAB > &a_uCoarse, const Interval &a_solutionvariables, const Interval &a_fluxvariables, const Real &a_scale, bool a_multByKappaOneMinusKappa=false)
 
void incrementDensityArray (LevelData< EBCellFAB > &a_coarMass, const Interval &a_variables, const Real &a_scale)
 
bool isDefined () const
 
void incrementFineIrreg (const EBFaceFAB &a_fineFlux, const Real &a_newScale, const DataIndex &a_fineDatInd, const Interval &a_variables, const int &a_dir, const Side::LoHiSide &a_sd)
 
void incrementCoarIrreg (const EBFaceFAB &a_coarFlux, const Real &a_scale, const DataIndex &a_coarDatInd, const Interval &a_variables, const int &a_dir, const Side::LoHiSide &a_sd)
 
void incrementFineRegul (const EBFaceFAB &a_fineFlux, const Real &a_newScale, const DataIndex &a_fineDatInd, const Interval &a_variables, const int &a_dir, const Side::LoHiSide &a_sd)
 
void incrementCoarRegul (const EBFaceFAB &a_coarFlux, const Real &a_scale, const DataIndex &a_coarDatInd, const Interval &a_variables, const int &a_dir, const Side::LoHiSide &a_sd)
 
bool hasEBCF () const
 
void clear ()
 undefines object More...
 
Vector< VoFIterator > & getVoFItCoar (const DataIndex &a_dit, const int &a_idir, const Side::LoHiSide &a_sd)
 
VoFIteratorgetVoFItCoFi (const DataIndex &a_dit, const int &a_idir, const Side::LoHiSide &a_sd)
 
const EBLevelGridgetEBLGCoFi () const
 

Static Public Member Functions

static int index (int a_dir, Side::LoHiSide a_side)
 

Static Public Attributes

static bool s_verbose
 

Protected Member Functions

void irregSetToZero ()
 
void defineSetsAndIterators ()
 
void defineBuffers ()
 
void cacheOldSolution (const LevelData< EBCellFAB > &a_uCoar, const Interval &a_variables)
 
void restoreOldSolution (LevelData< EBCellFAB > &a_uCoar, const Interval &a_variables)
 
void irregReflux (LevelData< EBCellFAB > &a_uCoar, const Interval &a_variables, const Real &a_scale, bool a_multByKappaOneMinusKappa=false)
 
void incrementByRefluxDivergence (LevelData< EBCellFAB > &a_uCoar, LevelData< EBCellFAB > &a_fluxDiff, const Interval &a_variables, const Real &a_newScale, bool a_multByOneMinusKappa, bool a_multByKappaOneMinusKappa)
 
void setDefaultValues ()
 
bool computeHasEBCF ()
 

Protected Attributes

LevelFluxRegisterm_levelFluxReg
 
bool m_isDefined
 
EBLevelGrid m_eblgFine
 
EBLevelGrid m_eblgCoar
 
EBLevelGrid m_eblgCoFi
 
int m_refRat
 
int m_nComp
 
Real m_nrefdmo
 
bool m_hasEBCF
 
LayoutData< VoFIteratorm_vofiCoFi [2 *SpaceDim]
 
LayoutData< IntVectSetm_setsCoFi [2 *SpaceDim]
 
LayoutData< Vector< IntVectSet > > m_setsCoar [2 *SpaceDim]
 
LayoutData< Vector< VoFIterator > > m_vofiCoar [2 *SpaceDim]
 
Copier m_reverseCopier
 
LevelData< EBCellFABm_saveCoar
 
LevelData< EBCellFABm_delUCoFi
 
LevelData< EBCellFABm_delUCoar
 
LevelData< EBCellFABm_delUDiff
 

Private Member Functions

void operator= (const EBFastFR &out)
 
 EBFastFR (const EBFastFR &out)
 

Detailed Description

EBFastFR-A class to encapsulate a levels worth of flux registers.

A EBFastFR handles all the data choreography necessary to create a levels worth of flux registers. This only does the elliptic flux register stuff for now (no interacting with redistribution, no RZ, no regular and regular separate).

Constructor & Destructor Documentation

EBFastFR::EBFastFR ( )

Default constructor. Leaves object undefined.

EBFastFR::EBFastFR ( const EBLevelGrid a_eblgFine,
const EBLevelGrid a_eblgCoar,
const int &  a_nref,
const int &  a_nvar,
bool  a_forceNoEBCF = false 
)

Full constructor. Calls the define function which creates a levels worth of flux registers. noebcf forces no coarse-fine intersection with EB

virtual EBFastFR::~EBFastFR ( )
virtual
EBFastFR::EBFastFR ( const EBFastFR out)
inlineprivate

References MayDay::Error().

Member Function Documentation

virtual void EBFastFR::define ( const EBLevelGrid a_eblgFine,
const EBLevelGrid a_eblgCoar,
const int &  a_nref,
const int &  a_nvar,
bool  a_forceNoEBCF = false 
)
virtual

Full define function. Creates a levels worth of flux registers.

virtual void EBFastFR::setToZero ( )
virtual

Initialize values of registers to zero.

virtual void EBFastFR::incrementCoarseBoth ( const EBFaceFAB a_coarseFlux,
const Real a_scale,
const DataIndex a_coarseDataIndex,
const Interval a_variables,
const int &  a_dir,
const Side::LoHiSide a_sd 
)
virtual

The irregular part of this is just register = input flux (instead of increment) To avoid double-counting.

Referenced by EBFluxRegister::incrementCoarse().

virtual void EBFastFR::incrementFineBoth ( const EBFaceFAB a_fineFlux,
const Real a_scale,
const DataIndex a_fineDataIndex,
const Interval a_variables,
const int &  a_dir,
const Side::LoHiSide a_sd 
)
virtual
void EBFastFR::compareFineSparse ( const EBFaceFAB a_fluxOld,
const EBFaceFAB a_fluxNew,
const DataIndex a_fineDatInd,
const int &  a_dir,
const Side::LoHiSide a_sd 
)
virtual void EBFastFR::incrementFineSparse ( const EBFaceFAB a_fineFlux,
const Real a_scale,
const DataIndex a_fineDatInd,
const Interval a_variables,
const int &  a_dir,
const Side::LoHiSide a_sd,
bool  a_doingFineRegular 
)
virtual

to support baseiffab approach

virtual void EBFastFR::reflux ( LevelData< EBCellFAB > &  a_uCoarse,
const Interval a_variables,
const Real a_scale,
bool  a_multByKappaOneMinusKappa = false 
)
virtual

Referenced by reflux().

virtual void EBFastFR::reflux ( LevelData< EBCellFAB > &  a_uCoarse,
const Interval a_solutionvariables,
const Interval a_fluxvariables,
const Real a_scale,
bool  a_multByKappaOneMinusKappa = false 
)
inlinevirtual
void EBFastFR::incrementDensityArray ( LevelData< EBCellFAB > &  a_coarMass,
const Interval a_variables,
const Real a_scale 
)

Increments mass array with left-over mass from reflux divergence. this is to test this pig. Ordinarily this mass would go into redistribution. this is used in the test suite to check whether a constant flux refluxed and then unrefluxed (this function) ends up with a constant solution. Correction at each cell = (1-kappa)refluxCorrection.

bool EBFastFR::isDefined ( ) const
static int EBFastFR::index ( int  a_dir,
Side::LoHiSide  a_side 
)
static

Referenced by getVoFItCoar(), and getVoFItCoFi().

void EBFastFR::incrementFineIrreg ( const EBFaceFAB a_fineFlux,
const Real a_newScale,
const DataIndex a_fineDatInd,
const Interval a_variables,
const int &  a_dir,
const Side::LoHiSide a_sd 
)
void EBFastFR::incrementCoarIrreg ( const EBFaceFAB a_coarFlux,
const Real a_scale,
const DataIndex a_coarDatInd,
const Interval a_variables,
const int &  a_dir,
const Side::LoHiSide a_sd 
)

The irregular part of this is just register = input flux (instead of increment) To avoid double-counting. The side argument is ignored.

Referenced by EBFluxRegister::incrementCoarseIrregular().

void EBFastFR::incrementFineRegul ( const EBFaceFAB a_fineFlux,
const Real a_newScale,
const DataIndex a_fineDatInd,
const Interval a_variables,
const int &  a_dir,
const Side::LoHiSide a_sd 
)
void EBFastFR::incrementCoarRegul ( const EBFaceFAB a_coarFlux,
const Real a_scale,
const DataIndex a_coarDatInd,
const Interval a_variables,
const int &  a_dir,
const Side::LoHiSide a_sd 
)
bool EBFastFR::hasEBCF ( ) const
inline

References m_hasEBCF.

void EBFastFR::clear ( )

undefines object

Vector<VoFIterator>& EBFastFR::getVoFItCoar ( const DataIndex a_dit,
const int &  a_idir,
const Side::LoHiSide a_sd 
)
inline

Gets the set of vofs to fill a flux for on a particular side and direction that correspond to an EB/CF interface. You still need to fill all the other fluxes at the interface but you do not have to do all the fancy interpolation to face centroids that is needed at these key points since all the other C/F points are treated as regular anyway. Do not use this unless you really know what you are doing. Really. Yes this breaks encapsulation but we do some pretty ugly things for performance reasons, do we not?

References index(), and m_vofiCoar.

VoFIterator& EBFastFR::getVoFItCoFi ( const DataIndex a_dit,
const int &  a_idir,
const Side::LoHiSide a_sd 
)
inline

Gets the set of vofs to fill a flux for on a particular side and direction that correspond to an EB/CF interface. You still need to fill all the other fluxes at the interface but you do not have to do all the fancy interpolation to face centroids that is needed at these key points since all the other C/F points are treated as regular anyway. Do not use this unless you really know what you are doing. Really. Yes this breaks encapsulation but we do some pretty ugly things for performance reasons, do we not?

References index(), and m_vofiCoFi.

const EBLevelGrid& EBFastFR::getEBLGCoFi ( ) const
inline

References m_eblgCoFi.

void EBFastFR::irregSetToZero ( )
protected
void EBFastFR::defineSetsAndIterators ( )
protected
void EBFastFR::defineBuffers ( )
protected
void EBFastFR::cacheOldSolution ( const LevelData< EBCellFAB > &  a_uCoar,
const Interval a_variables 
)
protected
void EBFastFR::restoreOldSolution ( LevelData< EBCellFAB > &  a_uCoar,
const Interval a_variables 
)
protected
void EBFastFR::irregReflux ( LevelData< EBCellFAB > &  a_uCoar,
const Interval a_variables,
const Real a_scale,
bool  a_multByKappaOneMinusKappa = false 
)
protected
void EBFastFR::incrementByRefluxDivergence ( LevelData< EBCellFAB > &  a_uCoar,
LevelData< EBCellFAB > &  a_fluxDiff,
const Interval a_variables,
const Real a_newScale,
bool  a_multByOneMinusKappa,
bool  a_multByKappaOneMinusKappa 
)
protected
void EBFastFR::setDefaultValues ( )
protected
bool EBFastFR::computeHasEBCF ( )
protected
void EBFastFR::operator= ( const EBFastFR out)
inlineprivate

References MayDay::Error().

Member Data Documentation

bool EBFastFR::s_verbose
static
LevelFluxRegister* EBFastFR::m_levelFluxReg
protected
bool EBFastFR::m_isDefined
protected
EBLevelGrid EBFastFR::m_eblgFine
protected
EBLevelGrid EBFastFR::m_eblgCoar
protected

Referenced by reflux().

EBLevelGrid EBFastFR::m_eblgCoFi
protected

Referenced by getEBLGCoFi().

int EBFastFR::m_refRat
protected
int EBFastFR::m_nComp
protected

Referenced by reflux().

Real EBFastFR::m_nrefdmo
protected
bool EBFastFR::m_hasEBCF
protected

Referenced by hasEBCF().

LayoutData< VoFIterator > EBFastFR::m_vofiCoFi[2 *SpaceDim]
protected

Referenced by getVoFItCoFi().

LayoutData< IntVectSet > EBFastFR::m_setsCoFi[2 *SpaceDim]
protected
LayoutData< Vector<IntVectSet > > EBFastFR::m_setsCoar[2 *SpaceDim]
protected
LayoutData< Vector<VoFIterator> > EBFastFR::m_vofiCoar[2 *SpaceDim]
protected

Referenced by getVoFItCoar().

Copier EBFastFR::m_reverseCopier
protected
LevelData<EBCellFAB> EBFastFR::m_saveCoar
protected
LevelData<EBCellFAB> EBFastFR::m_delUCoFi
protected
LevelData<EBCellFAB> EBFastFR::m_delUCoar
protected
LevelData<EBCellFAB> EBFastFR::m_delUDiff
protected

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