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 Member Functions

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

Protected Attributes

LevelData< FArrayBoxm_coarFlux
LevelData< FArrayBoxm_fineFlux
LayoutData< Vector< Box > > m_coarseLocations [CH_SPACEDIM *2]
ProblemDomain m_domain
bool m_isDefined
int m_nRefine
Copier m_reverseCopier

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::incrementCoarse 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
 

Same as above, except you only increment the a_sd side.

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.

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

LevelData<FArrayBox> LevelFluxRegister::m_coarFlux [protected]
 

LayoutData< Vector<Box> > LevelFluxRegister::m_coarseLocations[CH_SPACEDIM*2] [protected]
 

ProblemDomain LevelFluxRegister::m_domain [protected]
 

LevelData<FArrayBox> LevelFluxRegister::m_fineFlux [protected]
 

bool LevelFluxRegister::m_isDefined [protected]
 

int LevelFluxRegister::m_nRefine [protected]
 

Copier LevelFluxRegister::m_reverseCopier [protected]
 


The documentation for this class was generated from the following file:
Generated on Wed Jun 2 13:58:43 2004 for Chombo&INSwithParticles by doxygen 1.3.2