Chombo + EB  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() [1/3]

EBFastFR::EBFastFR ( )

Default constructor. Leaves object undefined.

◆ EBFastFR() [2/3]

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

◆ ~EBFastFR()

virtual EBFastFR::~EBFastFR ( )
virtual

◆ EBFastFR() [3/3]

EBFastFR::EBFastFR ( const EBFastFR out)
inlineprivate

References MayDay::Error().

Member Function Documentation

◆ define()

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.

◆ setToZero()

virtual void EBFastFR::setToZero ( )
virtual

Initialize values of registers to zero.

◆ incrementCoarseBoth()

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().

◆ incrementFineBoth()

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

◆ compareFineSparse()

void EBFastFR::compareFineSparse ( const EBFaceFAB a_fluxOld,
const EBFaceFAB a_fluxNew,
const DataIndex a_fineDatInd,
const int &  a_dir,
const Side::LoHiSide a_sd 
)

◆ incrementFineSparse()

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

◆ reflux() [1/2]

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

Referenced by reflux().

◆ reflux() [2/2]

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

◆ incrementDensityArray()

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.

Referenced by reflux().

◆ isDefined()

bool EBFastFR::isDefined ( ) const

Referenced by reflux().

◆ index()

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

Referenced by getVoFItCoar(), getVoFItCoFi(), and reflux().

◆ incrementFineIrreg()

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 
)

◆ incrementCoarIrreg()

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(), and reflux().

◆ incrementFineRegul()

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 
)

◆ incrementCoarRegul()

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 
)

◆ hasEBCF()

bool EBFastFR::hasEBCF ( ) const
inline

References clear(), and m_hasEBCF.

◆ clear()

void EBFastFR::clear ( )

undefines object

Referenced by hasEBCF().

◆ getVoFItCoar()

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.

◆ getVoFItCoFi()

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.

◆ getEBLGCoFi()

const EBLevelGrid& EBFastFR::getEBLGCoFi ( ) const
inline

◆ irregSetToZero()

void EBFastFR::irregSetToZero ( )
protected

Referenced by getEBLGCoFi().

◆ defineSetsAndIterators()

void EBFastFR::defineSetsAndIterators ( )
protected

Referenced by getEBLGCoFi().

◆ defineBuffers()

void EBFastFR::defineBuffers ( )
protected

Referenced by getEBLGCoFi().

◆ cacheOldSolution()

void EBFastFR::cacheOldSolution ( const LevelData< EBCellFAB > &  a_uCoar,
const Interval a_variables 
)
protected

Referenced by getEBLGCoFi().

◆ restoreOldSolution()

void EBFastFR::restoreOldSolution ( LevelData< EBCellFAB > &  a_uCoar,
const Interval a_variables 
)
protected

Referenced by getEBLGCoFi().

◆ irregReflux()

void EBFastFR::irregReflux ( LevelData< EBCellFAB > &  a_uCoar,
const Interval a_variables,
const Real a_scale,
bool  a_multByKappaOneMinusKappa = false 
)
protected

Referenced by getEBLGCoFi().

◆ incrementByRefluxDivergence()

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

Referenced by getEBLGCoFi().

◆ setDefaultValues()

void EBFastFR::setDefaultValues ( )
protected

◆ computeHasEBCF()

bool EBFastFR::computeHasEBCF ( )
protected

◆ operator=()

void EBFastFR::operator= ( const EBFastFR out)
inlineprivate

References MayDay::Error().

Member Data Documentation

◆ s_verbose

bool EBFastFR::s_verbose
static

◆ m_levelFluxReg

LevelFluxRegister* EBFastFR::m_levelFluxReg
protected

◆ m_isDefined

bool EBFastFR::m_isDefined
protected

◆ m_eblgFine

EBLevelGrid EBFastFR::m_eblgFine
protected

◆ m_eblgCoar

EBLevelGrid EBFastFR::m_eblgCoar
protected

Referenced by reflux().

◆ m_eblgCoFi

EBLevelGrid EBFastFR::m_eblgCoFi
protected

Referenced by getEBLGCoFi().

◆ m_refRat

int EBFastFR::m_refRat
protected

◆ m_nComp

int EBFastFR::m_nComp
protected

Referenced by reflux().

◆ m_nrefdmo

Real EBFastFR::m_nrefdmo
protected

◆ m_hasEBCF

bool EBFastFR::m_hasEBCF
protected

Referenced by hasEBCF().

◆ m_vofiCoFi

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

Referenced by getVoFItCoFi().

◆ m_setsCoFi

LayoutData< IntVectSet > EBFastFR::m_setsCoFi[2 *SpaceDim]
protected

◆ m_setsCoar

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

◆ m_vofiCoar

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

Referenced by getVoFItCoar().

◆ m_reverseCopier

Copier EBFastFR::m_reverseCopier
protected

◆ m_saveCoar

LevelData<EBCellFAB> EBFastFR::m_saveCoar
protected

◆ m_delUCoFi

LevelData<EBCellFAB> EBFastFR::m_delUCoFi
protected

◆ m_delUCoar

LevelData<EBCellFAB> EBFastFR::m_delUCoar
protected

◆ m_delUDiff

LevelData<EBCellFAB> EBFastFR::m_delUDiff
protected

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