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

#include <MultiBlockFluxRegister.H>

Inheritance diagram for MultiBlockFluxRegister:
Inheritance graph
[legend]

Public Member Functions

 MultiBlockFluxRegister (MultiBlockCoordSys *a_coordSysCoarse, MultiBlockCoordSys *a_coordSysFine)
 
 ~MultiBlockFluxRegister ()
 Destructor. More...
 
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)
 
void reflux (LevelData< FArrayBox > &a_uCoarse, const Interval &a_coarseVectorIntv, Real a_scale)
 
void reflux (LevelData< FArrayBox > &a_uCoarse, const Interval &a_coarse_interval, const Interval &a_coarseVectorIntv, const Interval &a_flux_interval, Real a_scale)
 
void incrementFineCentered (const FArrayBox &a_fineFlux, Real a_scale, const DataIndex &a_fineDataIndex, const Interval &a_vectorFluxIntv, const Interval &a_srcInterval, const Interval &a_dstInterval, int a_dir, Side::LoHiSide a_sd)
 
void incrementFineCentered (const FArrayBox &a_fineFlux, Real a_scale, const DataIndex &a_fineDataIndex, const Interval &a_vectorFluxIntv, const Interval &a_srcInterval, const Interval &a_dstInterval, int a_dir)
 Call with a_sd == Side::Lo and a_sd == Side::Hi. More...
 
void incrementFineAveraged (const FArrayBox &a_fineFlux, const FArrayBox &a_fineFlux2, Real a_scale, const DataIndex &a_fineDataIndex, const Interval &a_vectorFluxIntv, const Interval &a_srcInterval, const Interval &a_dstInterval, int a_dir, Side::LoHiSide a_sd)
 
void incrementFineAveraged (const FArrayBox &a_fineFlux, const FArrayBox &a_fineFlux2, Real a_scale, const DataIndex &a_fineDataIndex, const Interval &a_vectorFluxIntv, const Interval &a_srcInterval, const Interval &a_dstInterval, int a_dir)
 Call with a_sd == Side::Lo and a_sd == Side::Hi. More...
 
- 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)
 
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 setToZero ()
 
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 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 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 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 reflux (LevelData< FArrayBox > &a_uCoarse, Real a_scale)
 
virtual void reflux (LevelData< FArrayBox > &a_uCoarse, const Interval &a_coarse_interval, const Interval &a_flux_interval, Real a_scale)
 
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 ()
 

Private Member Functions

 MultiBlockFluxRegister ()
 No default constructor. More...
 

Private Attributes

MultiBlockCoordSysm_coordSysCoarse
 Multi-block coordinate system at coarser level. More...
 
MultiBlockCoordSysm_coordSysFine
 Multi-block coordinate system at finer level. More...
 
RemoteCopier m_remoteCopiers [SpaceDim]
 
LevelData< FArrayBoxm_multiblockFineFluxes [SpaceDim]
 
LevelData< FArrayBoxm_neighborFineFluxes [SpaceDim]
 
LayoutData< int > m_blockNum
 

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

This subclass of LevelFluxRegister handles multi-block AMR refluxing.

Constructor & Destructor Documentation

◆ MultiBlockFluxRegister() [1/2]

MultiBlockFluxRegister::MultiBlockFluxRegister ( MultiBlockCoordSys a_coordSysCoarse,
MultiBlockCoordSys a_coordSysFine 
)
explicit

Creates a flux register that handles multi-block refluxing. This capability requires a multi-block coordinate system, which handles block connectivity as well as coordinate mappings.

◆ ~MultiBlockFluxRegister()

MultiBlockFluxRegister::~MultiBlockFluxRegister ( )

Destructor.

◆ MultiBlockFluxRegister() [2/2]

MultiBlockFluxRegister::MultiBlockFluxRegister ( )
inlineprivate

No default constructor.

Member Function Documentation

◆ define()

void MultiBlockFluxRegister::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

dProblem is at the fine resolution. scaleFluxes means the same thing as in levelfluxregister

Reimplemented from LevelFluxRegister.

◆ reflux() [1/2]

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

the vector interval is the interval over which the fancy vector transformations are done.

Reimplemented from LevelFluxRegister.

◆ reflux() [2/2]

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

the coarse interval is the interval over which refluxing is done. the vector interval is the interval over which the fancy vector transformations are done.

◆ incrementFineCentered() [1/2]

void MultiBlockFluxRegister::incrementFineCentered ( const FArrayBox a_fineFlux,
Real  a_scale,
const DataIndex a_fineDataIndex,
const Interval a_vectorFluxIntv,
const Interval a_srcInterval,
const Interval a_dstInterval,
int  a_dir,
Side::LoHiSide  a_sd 
)

Increment fine flux. For scalars, no change from LevelFluxRegister. For vector fluxes, convert to frame of opposite block. This is for face-CENTERED fluxes.

◆ incrementFineCentered() [2/2]

void MultiBlockFluxRegister::incrementFineCentered ( const FArrayBox a_fineFlux,
Real  a_scale,
const DataIndex a_fineDataIndex,
const Interval a_vectorFluxIntv,
const Interval a_srcInterval,
const Interval a_dstInterval,
int  a_dir 
)

Call with a_sd == Side::Lo and a_sd == Side::Hi.

◆ incrementFineAveraged() [1/2]

void MultiBlockFluxRegister::incrementFineAveraged ( const FArrayBox a_fineFlux,
const FArrayBox a_fineFlux2,
Real  a_scale,
const DataIndex a_fineDataIndex,
const Interval a_vectorFluxIntv,
const Interval a_srcInterval,
const Interval a_dstInterval,
int  a_dir,
Side::LoHiSide  a_sd 
)

Increment fine flux. For scalars, no change from LevelFluxRegister. For vector fluxes, convert to frame of opposite block. This is for face-AVERAGED fluxes. The argument a_fineFlux2 is a 2nd-order approximation that includes a ghost layer.

◆ incrementFineAveraged() [2/2]

void MultiBlockFluxRegister::incrementFineAveraged ( const FArrayBox a_fineFlux,
const FArrayBox a_fineFlux2,
Real  a_scale,
const DataIndex a_fineDataIndex,
const Interval a_vectorFluxIntv,
const Interval a_srcInterval,
const Interval a_dstInterval,
int  a_dir 
)

Call with a_sd == Side::Lo and a_sd == Side::Hi.

Member Data Documentation

◆ m_coordSysCoarse

MultiBlockCoordSys* MultiBlockFluxRegister::m_coordSysCoarse
private

Multi-block coordinate system at coarser level.

◆ m_coordSysFine

MultiBlockCoordSys* MultiBlockFluxRegister::m_coordSysFine
private

Multi-block coordinate system at finer level.

◆ m_remoteCopiers

RemoteCopier MultiBlockFluxRegister::m_remoteCopiers[SpaceDim]
private

Copier for moving values from fine fluxes on other blocks to blocks where the corresponding coarse fluxes are defined. One copier per dimension.

◆ m_multiblockFineFluxes

LevelData<FArrayBox> MultiBlockFluxRegister::m_multiblockFineFluxes[SpaceDim]
private

This stores (coarsened) fine fluxes on neighboring blocks. We can ensure that the "destination" box layout is disjoint by storing the different flux components separately.

◆ m_neighborFineFluxes

LevelData<FArrayBox> MultiBlockFluxRegister::m_neighborFineFluxes[SpaceDim]
private

This stores (coarsened) fine fluxes that have been copied to the blocks containing the coarse fluxes they will replace. Once again, components of fluxes in each direction are stored separately so that the boxes can be disjoint.

◆ m_blockNum

LayoutData<int> MultiBlockFluxRegister::m_blockNum
private

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