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

NodeCoarseAverage Class Reference

Replaces coarse level data with an average of fine level data. More...

#include <NodeCoarseAverage.H>

List of all members.

Public Methods

 NodeCoarseAverage ()
 {\bf constructors, destructor and defines}

 NodeCoarseAverage (const DisjointBoxLayout &a_gridsFine, const DisjointBoxLayout &a_gridsCoarse, int a_numcomps, int a_refRatio, const ProblemDomain &a_domainFine)
 NodeCoarseAverage (const DisjointBoxLayout &a_gridsFine, const DisjointBoxLayout &a_gridsCoarse, int a_numcomps, int a_refRatio, const Box &a_domainFine)
 NodeCoarseAverage (const DisjointBoxLayout &a_gridsCoarse, int a_numcomps, int a_refRatio, const ProblemDomain &a_domainFine)
 NodeCoarseAverage (const DisjointBoxLayout &a_gridsCoarse, int a_numcomps, int a_refRatio, const Box &a_domainFine)
 ~NodeCoarseAverage ()
void define (const DisjointBoxLayout &a_gridsFine, const DisjointBoxLayout &a_gridsCoarse, int a_numcomps, int a_refRatio, const ProblemDomain &a_domainFine)
void define (const DisjointBoxLayout &a_gridsFine, const DisjointBoxLayout &a_gridsCoarse, int a_numcomps, int a_refRatio, const Box &a_domainFine)
void define (const DisjointBoxLayout &a_gridsCoarse, int a_numcomps, int a_refRatio, const ProblemDomain &a_domainFine)
void define (const DisjointBoxLayout &a_gridsCoarse, int a_numcomps, int a_refRatio, const Box &a_domainFine)
bool isDefined () const
 {\bf access functions}

void averageToCoarse (LevelData< NodeFArrayBox > &a_coarse, LevelData< NodeFArrayBox > &a_fine)
 {\bf data modification functions}


Protected Attributes

bool is_defined
int m_refRatio
int m_numcomps
ProblemDomain m_domainCoarse
FArrayBox m_weights
bool m_sameGrids
DisjointBoxLayout m_coarsenedGrids
LevelData< NodeFArrayBoxm_coarsenedFine
LayoutData< Vector< IntVectSet > > m_IVSV
LayoutData< Vector< IntVectSet > > m_IVSVsame


Detailed Description

Replaces coarse level data with an average of fine level data.

This class replaces data at a coarse level of refinement with an average of data at a finer level of refinement, in areas where fine data is present. Coarse level data is not modified where fine level data is not present.


Constructor & Destructor Documentation

NodeCoarseAverage::NodeCoarseAverage  
 

{\bf constructors, destructor and defines}

Default constructor. User must subsequently call define().

NodeCoarseAverage::NodeCoarseAverage const DisjointBoxLayout &    a_gridsFine,
const DisjointBoxLayout &    a_gridsCoarse,
int    a_numcomps,
int    a_refRatio,
const ProblemDomain &    a_domainFine
 

Defining constructor. Calls {\bf define} function with identical arguments.

NodeCoarseAverage::NodeCoarseAverage const DisjointBoxLayout &    a_gridsFine,
const DisjointBoxLayout &    a_gridsCoarse,
int    a_numcomps,
int    a_refRatio,
const Box &    a_domainFine
 

NodeCoarseAverage::NodeCoarseAverage const DisjointBoxLayout &    a_gridsCoarse,
int    a_numcomps,
int    a_refRatio,
const ProblemDomain &    a_domainFine
 

Defining constructor. Calls {\bf define} function with identical arguments.

NodeCoarseAverage::NodeCoarseAverage const DisjointBoxLayout &    a_gridsCoarse,
int    a_numcomps,
int    a_refRatio,
const Box &    a_domainFine
 

NodeCoarseAverage::~NodeCoarseAverage  
 

Destructor.


Member Function Documentation

void NodeCoarseAverage::averageToCoarse LevelData< NodeFArrayBox > &    a_coarse,
LevelData< NodeFArrayBox > &    a_fine
 

{\bf data modification functions}

Replaces coarse data with the average of nearby cells' fine data on the interior nodes of the coarsened fine-level domain. Elsewhere, the coarse data is unchanged.

It is an error to call if not this->isDefined().\ The domain of a_fine should be the same as a_gridsFine specified in the most recent call to define().\ It is expected that the coarse and fine levels' domains are properly nested. Both a_coarse and a_fine should have the same number of components specified in the most recent call to define().

{\bf Arguments:}\ a_coarse (modified): coarse data. \ a_fine (modified): fine data. Modified in exchange(). \

{\bf This:}\ As far as the user is concerned, this object is not modified, but a work array is modified.

void NodeCoarseAverage::define const DisjointBoxLayout &    a_gridsCoarse,
int    a_numcomps,
int    a_refRatio,
const Box &    a_domainFine
 

void NodeCoarseAverage::define const DisjointBoxLayout &    a_gridsCoarse,
int    a_numcomps,
int    a_refRatio,
const ProblemDomain &    a_domainFine
 

Defines this object. Existing information is overriden. Fine grids are refinements of coarse grids.

{\bf Arguments:}\ a_gridsCoarse: the grids at the coarse level.\ a_numcomps: the number of components.\ a_refRatio: the refinement ratio.\ a_domainFine: the physical domain at the fine level.\

{\bf This:}\ ---This object is modified.---

void NodeCoarseAverage::define const DisjointBoxLayout &    a_gridsFine,
const DisjointBoxLayout &    a_gridsCoarse,
int    a_numcomps,
int    a_refRatio,
const Box &    a_domainFine
 

void NodeCoarseAverage::define const DisjointBoxLayout &    a_gridsFine,
const DisjointBoxLayout &    a_gridsCoarse,
int    a_numcomps,
int    a_refRatio,
const ProblemDomain &    a_domainFine
 

Defines this object. Existing information is overriden.

{\bf Arguments:}\ a_gridsFine: the grids at the fine level.\ a_gridsCoarse: the grids at the coarse level.\ a_numcomps: the number of components.\ a_refRatio: the refinement ratio.\ a_domainFine: the physical domain at the fine level.\

{\bf This:}\ ---This object is modified.---

bool NodeCoarseAverage::isDefined   const
 

{\bf access functions}

Returns true if this object was created with the defining constructor or if define() has been called.


Member Data Documentation

bool NodeCoarseAverage::is_defined [protected]
 

LevelData<NodeFArrayBox> NodeCoarseAverage::m_coarsenedFine [protected]
 

DisjointBoxLayout NodeCoarseAverage::m_coarsenedGrids [protected]
 

ProblemDomain NodeCoarseAverage::m_domainCoarse [protected]
 

LayoutData< Vector<IntVectSet> > NodeCoarseAverage::m_IVSV [protected]
 

LayoutData< Vector<IntVectSet> > NodeCoarseAverage::m_IVSVsame [protected]
 

int NodeCoarseAverage::m_numcomps [protected]
 

int NodeCoarseAverage::m_refRatio [protected]
 

bool NodeCoarseAverage::m_sameGrids [protected]
 

FArrayBox NodeCoarseAverage::m_weights [protected]
 


The documentation for this class was generated from the following file:
Generated on Tue Apr 15 18:34:54 2003 for AMRNodeElliptic by doxygen1.2.16