class CoarseAverage

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

Inheritance:

CoarseAverage


public members:

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)

Documentation

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.

CoarseAverage ()
Default constructor. User must subsequently call define().

~CoarseAverage ()
Destructor.

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

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.

void define (const DisjointBoxLayout & a_fine_domain, int a_numcomps, int a_ref_ratio)
Defines this object. Existing information is overriden.

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.

This:
---This object is modified.---

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

This:
This object is not modified.

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

Arguments:
a_coarse_data (modified): coarse data.
a_fine_data (not modified): fine data.

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.


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.