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

CoarseAverage Class Reference

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

#include <CoarseAverage.H>

Collaboration diagram for CoarseAverage:

Collaboration graph
[legend]
List of all members.

Public Methods

 CoarseAverage ()
 ~CoarseAverage ()
 CoarseAverage (const DisjointBoxLayout &a_fine_domain, int a_numcomps, int a_ref_ratio)
void define (const DisjointBoxLayout &a_fine_domain, int a_numcomps, int a_ref_ratio)
bool isDefined () const
void averageToCoarse (LevelData< FArrayBox > &a_coarse_data, const LevelData< FArrayBox > &a_fine_data)

Protected Methods

void averageGridData (BaseFab< Real > &a_coarse, const BaseFab< Real > &a_fine, int a_ref_ratio) const

Protected Attributes

bool is_defined
int m_ref_ratio
LevelData< FArrayBoxm_coarsened_fine_data

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

CoarseAverage::CoarseAverage  
 

Default constructor. User must subsequently call define().

CoarseAverage::~CoarseAverage  
 

Destructor.

CoarseAverage::CoarseAverage const DisjointBoxLayout   a_fine_domain,
int    a_numcomps,
int    a_ref_ratio
 

Defining constructor. Constructs a valid object. Equivalent to default construction followed by define().

{\bf Arguments:}\ a_fine_domain (not modified): the fine level domain.\ a_numcomps (not modified): the number of components.\ a_ref_ratio (not modified): the refinement ratio.\


Member Function Documentation

void CoarseAverage::averageGridData BaseFab< Real > &    a_coarse,
const BaseFab< Real > &    a_fine,
int    a_ref_ratio
const [protected]
 

void CoarseAverage::averageToCoarse LevelData< FArrayBox > &    a_coarse_data,
const LevelData< FArrayBox > &    a_fine_data
 

Replaces a_coarse_data with the average of a_fine_data within the coarsening of the domain of the fine level. 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 level's 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_data (modified): coarse data. \ a_fine_data (not modified): fine data. \

{\bf This:}\ Well, it's complicated. As far as the user is concerned, this object is not modified. See the design document if you care for details.

void CoarseAverage::define const DisjointBoxLayout   a_fine_domain,
int    a_numcomps,
int    a_ref_ratio
 

Defines this object. Existing information is overriden.

{\bf Arguments:}\ a_fine_domain (not modified): the fine level domain.\ a_numcomps (not modified): the number of components.\ a_ref_ratio (not modified): the refinement ratio.\

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

bool CoarseAverage::isDefined   const
 

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

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


Member Data Documentation

bool CoarseAverage::is_defined [protected]
 

LevelData<FArrayBox> CoarseAverage::m_coarsened_fine_data [protected]
 

int CoarseAverage::m_ref_ratio [protected]
 


The documentation for this class was generated from the following file:
Generated on Thu Aug 29 11:07:39 2002 for Chombo&INS by doxygen1.2.16