#include <NodeCoarseAverage.H>

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.
Public Member Functions | |
Constructors, destructor and defines | |
| NodeCoarseAverage () | |
| 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) |
Access functions | |
| bool | isDefined () const |
| void | setVerbose (bool a_verbose) |
Data modification functions | |
| void | averageToCoarse (LevelData< NodeFArrayBox > &a_coarse, LevelData< NodeFArrayBox > &a_fine) |
Protected Attributes | |
| bool | is_defined |
| bool | m_verbose |
| int | m_refRatio |
| int | m_numcomps |
| ProblemDomain | m_domainCoarse |
| Box | m_refbox |
| FArrayBox | m_weights |
| bool | m_sameGrids |
| DisjointBoxLayout | m_coarsenedGrids |
| LevelData< NodeFArrayBox > | m_coarsenedFine |
| LayoutData< Vector< IntVectSet > > | m_IVSV |
| LayoutData< BitSet > | m_IVSVfull |
| LayoutData< Vector< IntVectSet > > | m_IVSVsame |
| NodeCoarseAverage::NodeCoarseAverage | ( | ) |
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 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 | |||
| ) |
Defining constructor. Calls define() function with identical arguments.
| NodeCoarseAverage::NodeCoarseAverage | ( | const DisjointBoxLayout & | a_gridsCoarse, | |
| int | a_numcomps, | |||
| int | a_refRatio, | |||
| const ProblemDomain & | a_domainFine | |||
| ) |
Defining constructor. Calls define() function with identical arguments.
| NodeCoarseAverage::NodeCoarseAverage | ( | const DisjointBoxLayout & | a_gridsCoarse, | |
| int | a_numcomps, | |||
| int | a_refRatio, | |||
| const Box & | a_domainFine | |||
| ) |
Defining constructor. Calls define() function with identical arguments.
| NodeCoarseAverage::~NodeCoarseAverage | ( | ) |
Destructor.
| 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.
| a_gridsFine | CELL-centered grids at the fine level |
| a_gridsCoarse | CELL-centered grids at the coarse level |
| a_numcomps | number of components of data |
| a_refRatio | refinement ratio between the two levels |
| a_domainFine | CELL-centered physical domain at the fine level |
| void NodeCoarseAverage::define | ( | const DisjointBoxLayout & | a_gridsFine, | |
| const DisjointBoxLayout & | a_gridsCoarse, | |||
| int | a_numcomps, | |||
| int | a_refRatio, | |||
| const Box & | a_domainFine | |||
| ) |
Defines this object. Existing information is overriden.
| a_gridsFine | CELL-centered grids at the fine level |
| a_gridsCoarse | CELL-centered grids at the coarse level |
| a_numcomps | number of components of data |
| a_refRatio | refinement ratio between the two levels |
| a_domainFine | CELL-centered physical domain at the fine level |
| 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.
| a_gridsCoarse | CELL-centered grids at the coarse level |
| a_numcomps | number of components of data |
| a_refRatio | refinement ratio between the two levels |
| a_domainFine | CELL-centered physical domain at the fine level |
| void NodeCoarseAverage::define | ( | const DisjointBoxLayout & | a_gridsCoarse, | |
| int | a_numcomps, | |||
| int | a_refRatio, | |||
| const Box & | a_domainFine | |||
| ) |
Defines this object. Existing information is overriden. Fine grids are refinements of coarse grids.
| a_gridsCoarse | CELL-centered grids at the coarse level |
| a_numcomps | number of components of data |
| a_refRatio | refinement ratio between the two levels |
| a_domainFine | CELL-centered physical domain at the fine level |
| bool NodeCoarseAverage::isDefined | ( | ) | const |
Returns true if this object was created with the defining constructor or if define() has been called.
| void NodeCoarseAverage::setVerbose | ( | bool | a_verbose | ) |
Set whether the solver gives output while solving. Default is true.
| void NodeCoarseAverage::averageToCoarse | ( | LevelData< NodeFArrayBox > & | a_coarse, | |
| LevelData< NodeFArrayBox > & | a_fine | |||
| ) |
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().
The fine data is modified only in exchange(). A work array is also modified.
| a_coarse | coarse data |
| a_fine | fine data, modified in exchange() |
bool NodeCoarseAverage::is_defined [protected] |
has this NodeCoarseAverage object been defined yet?
bool NodeCoarseAverage::m_verbose [protected] |
flag for verbose output
int NodeCoarseAverage::m_refRatio [protected] |
the refinement ratio between the two levels
int NodeCoarseAverage::m_numcomps [protected] |
the number of components of data, used in work array
ProblemDomain NodeCoarseAverage::m_domainCoarse [protected] |
CELL-centered physical domain at the coarser level
Box NodeCoarseAverage::m_refbox [protected] |
box with indices from -m_refRatio/2 to +m_refRatio/2 in all directions
FArrayBox NodeCoarseAverage::m_weights [protected] |
weights for coarsening
bool NodeCoarseAverage::m_sameGrids [protected] |
are the fine grids merely refined versions of the coarse grids?
DisjointBoxLayout NodeCoarseAverage::m_coarsenedGrids [protected] |
CELL-centered grids at the finer level, coarsened by m_refRatio
LevelData<NodeFArrayBox> NodeCoarseAverage::m_coarsenedFine [protected] |
work array for the coarsening of the fine data, based on the layout m_coarsenedGrids
LayoutData< Vector<IntVectSet> > NodeCoarseAverage::m_IVSV [protected] |
interior boundary nodes of coarsened finer-level grids, distributed among the coarser-level grids
LayoutData< BitSet > NodeCoarseAverage::m_IVSVfull [protected] |
whether each section of m_IVSVsame is a complete box
LayoutData< Vector<IntVectSet> > NodeCoarseAverage::m_IVSVsame [protected] |
interior boundary nodes of coarsened finer-level grids, distributed among the same grids
1.5.5