NodeCoarseAverage Class Reference

#include <NodeCoarseAverage.H>

List of all members.


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.

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< NodeFArrayBoxm_coarsenedFine
LayoutData< Vector< IntVectSet > > m_IVSV
LayoutData< BitSetm_IVSVfull
LayoutData< Vector< IntVectSet > > m_IVSVsame


Constructor & Destructor Documentation

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.


Member Function Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
a_coarse  coarse data
a_fine  fine data, modified in exchange()


Member Data Documentation

has this NodeCoarseAverage object been defined yet?

bool NodeCoarseAverage::m_verbose [protected]

flag for verbose output

the refinement ratio between the two levels

the number of components of data, used in work array

CELL-centered physical domain at the coarser level

box with indices from -m_refRatio/2 to +m_refRatio/2 in all directions

weights for coarsening

are the fine grids merely refined versions of the coarse grids?

CELL-centered grids at the finer level, coarsened by m_refRatio

work array for the coarsening of the fine data, based on the layout m_coarsenedGrids

interior boundary nodes of coarsened finer-level grids, distributed among the coarser-level grids

whether each section of m_IVSVsame is a complete box

interior boundary nodes of coarsened finer-level grids, distributed among the same grids


The documentation for this class was generated from the following file:

Generated on Fri Apr 5 04:25:13 2019 for Chombo + EB by  doxygen 1.5.5