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

#include <NewMultiBlockFluxRegister.H>

Inheritance diagram for NewMultiBlockFluxRegister:
Inheritance graph
[legend]

Public Member Functions

 NewMultiBlockFluxRegister (RefCountedPtr< MultiBlockCoordSys > a_domCoar, const DisjointBoxLayout &a_dblFine, const DisjointBoxLayout &a_dblCoar, int a_nRefine, int a_nComp, bool a_scaleFineFluxes=false, int a_unrefinedDirection=-1)
 
 NewMultiBlockFluxRegister (const NewMultiBlockFluxRegister &)
 
 NewMultiBlockFluxRegister ()
 
 ~NewMultiBlockFluxRegister ()
 
virtual void define (RefCountedPtr< MultiBlockCoordSys > a_domainCoar, const DisjointBoxLayout &a_dbl, const DisjointBoxLayout &a_dblCoarse, int a_nRefine, int a_nComp, bool a_scaleFineFluxes=false, int a_unrefinedDirection=-1)
 
virtual void reflux (LevelData< FArrayBox > &a_uCoarse, Real a_scale)
 
virtual void reflux (LevelData< FArrayBox > &a_uCoarse, const Interval &a_coarseVectorIntv, Real a_scale)
 
virtual void reflux (LevelData< FArrayBox > &a_uCoarse, const Interval &a_coarseVectorIntv, const Interval &a_fluxInterval, Real a_scale)
 
virtual void reflux (LevelData< FArrayBox > &a_uCoarse, const Interval &a_coarse_interval, const Interval &a_coarseVectorIntv, const Interval &a_flux_interval, Real a_scale)
 
virtual void setToZero ()
 
virtual void incrementFine (const FArrayBox &a_fineFlux, Real a_scale, const DataIndex &a_fineDataIndex, const Interval &a_srcInterval, const Interval &a_dstInterval, int a_dir, Side::LoHiSide a_sd)
 
virtual void incrementCoarse (const FArrayBox &a_coarseFlux, Real a_scale, const DataIndex &a_coarseDataIndex, const Interval &a_srcInterval, const Interval &a_dstInterval, int a_dir, Side::LoHiSide a_sd)
 
- Public Member Functions inherited from LevelFluxRegister
 LevelFluxRegister ()
 
 LevelFluxRegister (const DisjointBoxLayout &a_dbl, const DisjointBoxLayout &a_dblCoarse, const ProblemDomain &a_dProblem, int a_nRefine, int a_nComp, bool a_scaleFineFluxes=true, int a_unrefinedDirection=-1)
 
 LevelFluxRegister (const DisjointBoxLayout &a_dbl, const DisjointBoxLayout &a_dblCoarse, const Box &a_dProblem, int a_nRefine, int a_nComp, bool a_scaleFineFluxes=true, int a_unrefinedDirection=-1)
 This is an old style constructor - do not use if at all possible. More...
 
virtual ~LevelFluxRegister ()
 
virtual void define (const DisjointBoxLayout &a_dbl, const DisjointBoxLayout &a_dblCoarse, const ProblemDomain &a_dProblem, int a_nRefine, int a_nComp, bool a_scaleFineFluxes, int a_unrefinedDirection=-1)
 
virtual void define (const DisjointBoxLayout &a_dbl, const DisjointBoxLayout &a_dblCoarse, const ProblemDomain &a_dProblem, int a_nRefine, int a_nComp)
 
virtual void define (const DisjointBoxLayout &a_dbl, const DisjointBoxLayout &a_dblCoarse, const Box &a_dProblem, int a_nRefine, int a_nComp, bool a_scaleFineFluxes=true)
 This is an old style define - do not use if at all possible. More...
 
virtual void undefine ()
 
virtual void incrementCoarse (const FArrayBox &a_coarseFlux, Real a_scale, const DataIndex &a_coarseDataIndex, const Interval &a_srcInterval, const Interval &a_dstInterval, int a_dir)
 
virtual void incrementFine (const FArrayBox &a_fineFlux, Real a_scale, const DataIndex &a_fineDataIndex, const Interval &a_srcInterval, const Interval &a_dstInterval, int a_dir)
 
virtual void reflux (LevelData< FArrayBox > &a_uCoarse, Real a_scale, const Interval &a_coarseInterv, const Interval &a_fluxInterval, const LevelData< FArrayBox > &a_beta)
 same as above with a variable scale multiplied in More...
 
bool hasCF (const DataIndex &a_fineDataIndex, Side::LoHiSide) const
 
bool hasCF (const DataIndex &a_coarseIndex) const
 
bool isDefined () const
 
bool isAllDefined () const
 
void poutCoarseRegisters () const
 
void poutFineRegisters () const
 
LayoutData< Vector< Box > > & getCoarseLocations (int a_idir, Side::LoHiSide a_sd)
 
CopiergetReverseCopier ()
 

Static Public Member Functions

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

Private Member Functions

void defineBlockCFLocations (RefCountedPtr< MultiBlockCoordSys > a_domain, const DisjointBoxLayout &a_dblFine, const DisjointBoxLayout &a_dblCoar)
 
void getCoFiBoxBlockList (std::list< Box > &a_blockBoxesCoFi, RefCountedPtr< MultiBlockCoordSys > &a_domCoar, const DisjointBoxLayout &a_dblFine)
 
void defineBlockBoundaries (RefCountedPtr< MultiBlockCoordSys > a_domain, const DisjointBoxLayout &a_dblFine)
 

Private Attributes

Vector< RefCountedPtr< BlockRegister > > m_coarRegisters
 
Vector< RefCountedPtr< BlockRegister > > m_cofiRegisters
 
LevelData< FluxBoxm_fluxCoFi
 
Vector< RefCountedPtr< BlockRegister > > m_blockCFLocations
 
LayoutData< Vector< Box > > m_fineBlockBoundaries
 
int m_nComp
 

Additional Inherited Members

- Static Public Attributes inherited from LevelFluxRegister
static bool s_verbose
 
- Protected Types inherited from LevelFluxRegister
enum  FluxRegDefineStatus {
  FluxRegUndefined = 0, FluxRegDefined = (1 << 0), FluxRegFineDefined = (1 << 1), FluxRegCoarseDefined = (1 << 2),
  FluxRegAllDefined = (1 << 3) - 1
}
 Define status. More...
 
- Protected Attributes inherited from LevelFluxRegister
LevelData< FArrayBoxm_coarFlux
 
LevelData< FArrayBoxm_fineFlux
 
LayoutData< Vector< Box > > m_coarseLocations [CH_SPACEDIM *2]
 
ProblemDomain m_domain
 
int m_isDefined
 
IntVect m_nRefine
 
bool m_scaleFineFluxes
 
int m_unrefinedDirection
 
Copier m_reverseCopier
 
bool m_noRealCoarseFineInterface
 

Detailed Description

A LevelFluxRegister handles all the data choreography necessary to create a levels worth of flux registers. Full constructor. Calls the define function which creates a levels worth of flux registers. a_domain is is coarse-level domain.

If a_scaleFineFluxes is true (default then all fine fluxes are scaled by 1/a_nRefine^(SpaceDim-1). Otherwise, no scaling is done.

Constructor & Destructor Documentation

◆ NewMultiBlockFluxRegister() [1/3]

NewMultiBlockFluxRegister::NewMultiBlockFluxRegister ( RefCountedPtr< MultiBlockCoordSys a_domCoar,
const DisjointBoxLayout a_dblFine,
const DisjointBoxLayout a_dblCoar,
int  a_nRefine,
int  a_nComp,
bool  a_scaleFineFluxes = false,
int  a_unrefinedDirection = -1 
)
inline

domainCoar –coordinate system at coarser level

References define(), index(), and NewMultiBlockFluxRegister().

◆ NewMultiBlockFluxRegister() [2/3]

NewMultiBlockFluxRegister::NewMultiBlockFluxRegister ( const NewMultiBlockFluxRegister )

◆ NewMultiBlockFluxRegister() [3/3]

NewMultiBlockFluxRegister::NewMultiBlockFluxRegister ( )
inline

◆ ~NewMultiBlockFluxRegister()

NewMultiBlockFluxRegister::~NewMultiBlockFluxRegister ( )

Member Function Documentation

◆ index()

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

◆ define()

virtual void NewMultiBlockFluxRegister::define ( RefCountedPtr< MultiBlockCoordSys a_domainCoar,
const DisjointBoxLayout a_dbl,
const DisjointBoxLayout a_dblCoarse,
int  a_nRefine,
int  a_nComp,
bool  a_scaleFineFluxes = false,
int  a_unrefinedDirection = -1 
)
virtual

domainCoar –coordinate system at coarser level

Referenced by NewMultiBlockFluxRegister().

◆ reflux() [1/4]

virtual void NewMultiBlockFluxRegister::reflux ( LevelData< FArrayBox > &  a_uCoarse,
Real  a_scale 
)
virtual

increments uCoarse with the reflux divergence of the contents of the flux register. Note that there is no srccomp etc here. this is done for all components so uCoarse has to have the same number of components as input nComp. This operation is global and blocking.

Reflux does cellValue -= refluxScale*registerContents

Reimplemented from LevelFluxRegister.

Referenced by NewMultiBlockFluxRegister().

◆ reflux() [2/4]

virtual void NewMultiBlockFluxRegister::reflux ( LevelData< FArrayBox > &  a_uCoarse,
const Interval a_coarseVectorIntv,
Real  a_scale 
)
virtual

Interface for multiblock algorithms where, if an interval of the components represents a vector, it must be specially handled. If called from a singleblock code, the vector interval is just ignored.

Reimplemented from LevelFluxRegister.

◆ reflux() [3/4]

virtual void NewMultiBlockFluxRegister::reflux ( LevelData< FArrayBox > &  a_uCoarse,
const Interval a_coarse_interval,
const Interval a_flux_interval,
Real  a_scale 
)
virtual

increments uCoarse with the reflux divergence of the contents of the flux register. This can be overridden by a subclass. This operation is global and blocking. Reflux does cellValue -= refluxScale*registerContents

Reimplemented from LevelFluxRegister.

◆ reflux() [4/4]

virtual void NewMultiBlockFluxRegister::reflux ( LevelData< FArrayBox > &  a_uCoarse,
const Interval a_coarse_interval,
const Interval a_coarseVectorIntv,
const Interval a_flux_interval,
Real  a_scale 
)
virtual

◆ setToZero()

virtual void NewMultiBlockFluxRegister::setToZero ( )
virtual

Initialize values of registers to zero.

Reimplemented from LevelFluxRegister.

Referenced by NewMultiBlockFluxRegister().

◆ incrementFine()

virtual void NewMultiBlockFluxRegister::incrementFine ( const FArrayBox a_fineFlux,
Real  a_scale,
const DataIndex a_fineDataIndex,
const Interval a_srcInterval,
const Interval a_dstInterval,
int  a_dir,
Side::LoHiSide  a_sd 
)
virtual

This method implements the register's fine increment on one side. It may be overridden by a subclass.

Reimplemented from LevelFluxRegister.

Referenced by NewMultiBlockFluxRegister().

◆ incrementCoarse()

virtual void NewMultiBlockFluxRegister::incrementCoarse ( const FArrayBox a_coarseFlux,
Real  a_scale,
const DataIndex a_coarseDataIndex,
const Interval a_srcInterval,
const Interval a_dstInterval,
int  a_dir,
Side::LoHiSide  a_sd 
)
virtual

This method implements the register's coarse increment on a single side. It may be overridden by a subclass.

Reimplemented from LevelFluxRegister.

Referenced by NewMultiBlockFluxRegister().

◆ defineBlockCFLocations()

void NewMultiBlockFluxRegister::defineBlockCFLocations ( RefCountedPtr< MultiBlockCoordSys a_domain,
const DisjointBoxLayout a_dblFine,
const DisjointBoxLayout a_dblCoar 
)
private

◆ getCoFiBoxBlockList()

void NewMultiBlockFluxRegister::getCoFiBoxBlockList ( std::list< Box > &  a_blockBoxesCoFi,
RefCountedPtr< MultiBlockCoordSys > &  a_domCoar,
const DisjointBoxLayout a_dblFine 
)
private

◆ defineBlockBoundaries()

void NewMultiBlockFluxRegister::defineBlockBoundaries ( RefCountedPtr< MultiBlockCoordSys a_domain,
const DisjointBoxLayout a_dblFine 
)
private

Member Data Documentation

◆ m_coarRegisters

Vector<RefCountedPtr<BlockRegister > > NewMultiBlockFluxRegister::m_coarRegisters
private

◆ m_cofiRegisters

Vector<RefCountedPtr<BlockRegister > > NewMultiBlockFluxRegister::m_cofiRegisters
private

◆ m_fluxCoFi

LevelData<FluxBox > NewMultiBlockFluxRegister::m_fluxCoFi
private

◆ m_blockCFLocations

Vector<RefCountedPtr<BlockRegister > > NewMultiBlockFluxRegister::m_blockCFLocations
private

◆ m_fineBlockBoundaries

LayoutData<Vector<Box> > NewMultiBlockFluxRegister::m_fineBlockBoundaries
private

◆ m_nComp

int NewMultiBlockFluxRegister::m_nComp
private

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