class LevelFluxRegister

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

Inheritance:

LevelFluxRegister


public members:

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

protected members:

int m_nComp
number of components in register
int m_nRefine
refinement ratio between levels
ProblemDomain m_domainCoarse
domain at the coarse grid resolution

Documentation

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.
LevelFluxRegister ()
Default constructor. Creates an uninitialized 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 ( 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

void 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 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 undefine ()
Modifies this LevelFluxRegister so that it is returned to the uninitialized state. User must now call the full define() before using it.

void setToZero ()
Initialize values of registers to zero.

void 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 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.

void 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 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.

bool isDefined () const
has full define function been called? return true if so.


this class has no child classes.

alphabetic index hierarchy of classes


Chombo

Copyright Notice

This software is copyright (C) by the Lawrence Berkeley National Laboratory. Permission is granted to reproduce this software for non-commercial purposes provided that this notice is left intact.

It is acknowledged that the U.S. Government has rights to this software under Contract DE-AC03-765F00098 between the U.S. Department of Energy and the University of California.

This software is provided as a professional and academic contribution for joint exchange. Thus it is experimental, is provided ``as is'', with no warranties of any kind whatsoever, no support, no promise of updates, or printed documentation. By using this software, you acknowledge that the Lawrence Berkeley National Laboratory and Regents of the University of California shall have no liability with respect to the infringement of other copyrights by any part of this software.