Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

LevelFluxRegister Class Reference

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

#include <LevelFluxRegister.H>

Collaboration diagram for LevelFluxRegister:

Collaboration graph
[legend]
List of all members.

Public Methods

 LevelFluxRegister ()
 LevelFluxRegister (const DisjointBoxLayout &a_dbl, const DisjointBoxLayout &a_dblCoarse, const Box &a_dProblem, int a_nRefine, int a_nComp)
 LevelFluxRegister (const DisjointBoxLayout &a_dbl, const DisjointBoxLayout &a_dblCoarse, const ProblemDomain &a_dProblem, int a_nRefine, int a_nComp)
 ~LevelFluxRegister ()
void define (const DisjointBoxLayout &a_dbl, const DisjointBoxLayout &a_dblCoarse, const Box &a_dProblem, int a_nRefine, int a_nComp)
void define (const DisjointBoxLayout &a_dbl, const DisjointBoxLayout &a_dblCoarse, const ProblemDomain &a_dProblem, int a_nRefine, int a_nComp)
void undefine ()
void setToZero ()
void incrementCoarse (FArrayBox &a_coarseFlux, Real a_scale, const DataIndex &a_coarseDataIndex, const Interval &a_srcInterval, const Interval &a_dstInterval, int a_dir)
void incrementFine (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)
void reflux (LevelData< FArrayBox > &a_uCoarse, Real a_scale)
void reflux (LevelData< FArrayBox > &a_uCoarse, const Interval &a_coarse_interval, const Interval &a_flux_interval, Real a_scale)
bool isDefined () const
void dump ()
void dumpLoCoar (int idir)
void dumpHiCoar (int idir)
void dumpLoFine (int idir)
void dumpHiFine (int idir)

Protected Methods

void setDefaultValues ()

Static Protected Methods

int index (int dir, Side::LoHiSide side)

Protected Attributes

LevelData< FArrayBoxfabCoarse [SpaceDim *2]
LevelData< FArrayBoxfabFine [SpaceDim *2]
Vector< CopiercrseCopiers
LayoutData< Vector< IntVectSet > > refluxLocations [SpaceDim *2]
LayoutData< Vector< DataIndex > > coarToCoarMap [SpaceDim *2]
bool m_isDefined
int m_nComp
 number of components in register

int m_nRefine
 refinement ratio between levels

ProblemDomain m_domainCoarse
 domain at the coarse grid resolution

DisjointBoxLayout m_gridsFine
DisjointBoxLayout m_gridsCoar

Detailed Description

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

A LevelFluxRegister handles all the data choreography necessary to create a levels worth of flux registers. You send a pointer to a valid LevelCFStencil to its constructor or define function and it parsels out all the necessary information to the grid flux registers which hands it to the flux registers. The actual functions to manipulate data in the flux registers live in the class FluxRegister.


Constructor & Destructor Documentation

LevelFluxRegister::LevelFluxRegister  
 

Default constructor. Creates an uninitialized levelfluxregister.

LevelFluxRegister::LevelFluxRegister const DisjointBoxLayout   a_dbl,
const DisjointBoxLayout   a_dblCoarse,
const Box   a_dProblem,
int    a_nRefine,
int    a_nComp
 

Full constructor. Calls the define function which creates a levels worth of flux registers. a_dProblem is fine-level domain

LevelFluxRegister::LevelFluxRegister const DisjointBoxLayout   a_dbl,
const DisjointBoxLayout   a_dblCoarse,
const ProblemDomain   a_dProblem,
int    a_nRefine,
int    a_nComp
 

Full constructor. Calls the define function which creates a levels worth of flux registers. a_dProblem is fine-level domain

LevelFluxRegister::~LevelFluxRegister  
 


Member Function Documentation

void LevelFluxRegister::define const DisjointBoxLayout   a_dbl,
const DisjointBoxLayout   a_dblCoarse,
const ProblemDomain   a_dProblem,
int    a_nRefine,
int    a_nComp
 

Full define function. Creates a levels worth of flux registers. The values in the flux registers are still undefined, however. To zero the fluxregisters, you must call setToZero().

void LevelFluxRegister::define const DisjointBoxLayout   a_dbl,
const DisjointBoxLayout   a_dblCoarse,
const Box   a_dProblem,
int    a_nRefine,
int    a_nComp
 

Full define function. Creates a levels worth of flux registers. The values in the flux registers are still undefined, however. To zero the fluxregisters, you must call setToZero().

void LevelFluxRegister::dump  
 

void LevelFluxRegister::dumpHiCoar int    idir
 

void LevelFluxRegister::dumpHiFine int    idir
 

void LevelFluxRegister::dumpLoCoar int    idir
 

void LevelFluxRegister::dumpLoFine int    idir
 

void LevelFluxRegister::incrementCoarse FArrayBox   a_coarseFlux,
Real    a_scale,
const DataIndex   a_coarseDataIndex,
const Interval   a_srcInterval,
const Interval   a_dstInterval,
int    a_dir
 

increments the register with data from coarseFlux, multiplied by scale. coarseFlux must contain the coarse fluxes in the dir direction for the grid m_coarseLayout[coarseDataIndex]. By convention, only the low side flux is used to avoid double-counting at coarse-fine interfaces. This operation is local.

void LevelFluxRegister::incrementFine 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
 

increments the register with data from fineFlux, multiplied by scale. fineFlux must contain the coarse fluxes in the dir direction for the grid m_fineLayout[fineDataIndex]. This operation is local.

int LevelFluxRegister::index int    dir,
Side::LoHiSide    side
[static, protected]
 

bool LevelFluxRegister::isDefined   const
 

has full define function been called? return true if so.

void LevelFluxRegister::reflux LevelData< FArrayBox > &    a_uCoarse,
const Interval   a_coarse_interval,
const Interval   a_flux_interval,
Real    a_scale
 

increments uCoarse with the reflux divergence of the contents of the flux register. This operation is global and blocking.

void LevelFluxRegister::reflux LevelData< FArrayBox > &    a_uCoarse,
Real    a_scale
 

increments uCoarse with the reflux divergence of the contents of the flux register. Note that there is no srccomp etc crap 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.

void LevelFluxRegister::setDefaultValues   [protected]
 

void LevelFluxRegister::setToZero  
 

Initialize values of registers to zero.

void LevelFluxRegister::undefine  
 

Modifies this LevelFluxRegister so that it is returned to the uninitialized state. User must now call the full define() before using it.


Member Data Documentation

LayoutData<Vector<DataIndex> > LevelFluxRegister::coarToCoarMap[SpaceDim*2] [protected]
 

Vector<Copier> LevelFluxRegister::crseCopiers [protected]
 

LevelData<FArrayBox> LevelFluxRegister::fabCoarse[SpaceDim*2] [protected]
 

LevelData<FArrayBox> LevelFluxRegister::fabFine[SpaceDim*2] [protected]
 

ProblemDomain LevelFluxRegister::m_domainCoarse [protected]
 

domain at the coarse grid resolution

DisjointBoxLayout LevelFluxRegister::m_gridsCoar [protected]
 

DisjointBoxLayout LevelFluxRegister::m_gridsFine [protected]
 

bool LevelFluxRegister::m_isDefined [protected]
 

int LevelFluxRegister::m_nComp [protected]
 

number of components in register

int LevelFluxRegister::m_nRefine [protected]
 

refinement ratio between levels

LayoutData<Vector<IntVectSet> > LevelFluxRegister::refluxLocations[SpaceDim*2] [protected]
 


The documentation for this class was generated from the following file:
Generated on Wed Apr 16 14:27:42 2003 for Chombo by doxygen1.2.16