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

NodeMaskAverage2 Class Reference

Replaces coarse-level data with an average of fine-level data, where refinement ratio is 2. More...

#include <NodeMaskAverage2.H>

List of all members.

Public Methods

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

 NodeMaskAverage2 (const DisjointBoxLayout &a_gridsFine, const DisjointBoxLayout &a_gridsCoarse, int a_numcomps, const ProblemDomain &a_domainFine, Real a_dx)
 NodeMaskAverage2 (const DisjointBoxLayout &a_gridsCoarse, int a_numcomps, const ProblemDomain &a_domainFine, Real a_dx)
 ~NodeMaskAverage2 ()
void define (const DisjointBoxLayout &a_gridsFine, const DisjointBoxLayout &a_gridsCoarse, int a_numcomps, const ProblemDomain &a_domainFine, Real a_dx)
void define (const DisjointBoxLayout &a_gridsCoarse, int a_numcomps, const ProblemDomain &a_domainFine, Real a_dx)
bool isDefined () const
 {\bf access functions}

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


Protected Methods

void getWeights (const DisjointBoxLayout &a_gridsFine)
void clearMemory ()

Protected Attributes

bool is_defined
Box m_refbox
Real m_dx
bool m_sameGrids
DisjointBoxLayout m_coarsenedFineGrids
LevelData< NodeFArrayBoxm_coarsenedFine
LayoutData< Vector< IntVectSet > > m_IVSV
LayoutData< Vector< IntVectSet > > m_IVSVsame
LevelData< NodeFArrayBoxm_weights
BoxLayoutData< BaseFab< int > > m_mask


Detailed Description

Replaces coarse-level data with an average of fine-level data, where refinement ratio is 2.

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. The refinement ratio is assumed to be 2. For higher refinement ratio, use NodeMaskAverage.


Constructor & Destructor Documentation

NodeMaskAverage2::NodeMaskAverage2  
 

{\bf constructors, destructor and defines}

Default constructor. User must subsequently call define().

NodeMaskAverage2::NodeMaskAverage2 const DisjointBoxLayout &    a_gridsFine,
const DisjointBoxLayout &    a_gridsCoarse,
int    a_numcomps,
const ProblemDomain &    a_domainFine,
Real    a_dx
 

Defining constructor for different fine and coarse grids. Calls {\bf define} function with identical arguments.

NodeMaskAverage2::NodeMaskAverage2 const DisjointBoxLayout &    a_gridsCoarse,
int    a_numcomps,
const ProblemDomain &    a_domainFine,
Real    a_dx
 

Defining constructor for fine grids being refined coarse grids. Calls {\bf define} function with identical arguments.

NodeMaskAverage2::~NodeMaskAverage2  
 

Destructor.


Member Function Documentation

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

{\bf data modification functions}

Replaces a_coarse_data with the average of nearby cells' a_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_data should be the same as the fine domain specified in the most recent call to define().\ It is expected that the coarse and fine levels' domains are properly nested. Both a_coarse_data and a_fine_data 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 NodeMaskAverage2::clearMemory   [protected]
 

void NodeMaskAverage2::define const DisjointBoxLayout &    a_gridsCoarse,
int    a_numcomps,
const ProblemDomain &    a_domainFine,
Real    a_dx
 

Defines this object. Existing information is overriden. Fine grids are just the coarse grids refined by 2.

{\bf Arguments:}\ a_gridsCoarse: the grids at the coarse level.\ a_numcomps: the number of components.\ a_domainFine: the physical domain at the fine level.\ a_dx: the grid spacing at the fine level.\

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

void NodeMaskAverage2::define const DisjointBoxLayout &    a_gridsFine,
const DisjointBoxLayout &    a_gridsCoarse,
int    a_numcomps,
const ProblemDomain &    a_domainFine,
Real    a_dx
 

Defines this object. Existing information is overriden. Fine grids and coarse grids are different.

{\bf Arguments:}\ a_gridsFine: the grids at the fine level.\ a_girdsCoarse: the grids at the coarse level.\ a_numcomps: the number of components.\ a_domainFine: the physical domain at the fine level.\ a_dx: the grid spacing at the fine level.\

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

void NodeMaskAverage2::getWeights const DisjointBoxLayout &    a_gridsFine [protected]
 

bool NodeMaskAverage2::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 NodeMaskAverage2::is_defined [protected]
 

LevelData<NodeFArrayBox> NodeMaskAverage2::m_coarsenedFine [protected]
 

DisjointBoxLayout NodeMaskAverage2::m_coarsenedFineGrids [protected]
 

Real NodeMaskAverage2::m_dx [protected]
 

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

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

BoxLayoutData< BaseFab<int> > NodeMaskAverage2::m_mask [protected]
 

Box NodeMaskAverage2::m_refbox [protected]
 

bool NodeMaskAverage2::m_sameGrids [protected]
 

LevelData<NodeFArrayBox> NodeMaskAverage2::m_weights [protected]
 


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