CoarseAverageCodim Class Reference

#include <CoarseAverageCodim.H>

List of all members.


Detailed Description

Replaces coarse-level data with averaged fine-level data on the codimensions of a box This class is similar to CoarseAverage

Public Member Functions

 CoarseAverageCodim ()
 Default constructor.
 CoarseAverageCodim (const DisjointBoxLayout &a_fineGrids, const int a_codim, const int a_nComp, const int a_nRef)
 Full constructor.
 ~CoarseAverageCodim ()
 Destructor.
void define (const DisjointBoxLayout &a_fineGrids, const int a_codim, const int a_nComp, const int a_nRef)
 Defines the object.
bool isDefined () const
 Has define been called?
void average (const LevelData< CodimBox > &a_fineData)
 Averages fine-level data to internal coarse representation of fine grid.
void averageHarmonic (const LevelData< CodimBox > &a_fineData)
 Harmonic averaging of fine data to coarse representation of fine grid.
void sum (const LevelData< CodimBox > &a_fineData, const int a_refFactor=1)
 Summation of fine data to internal coarse representation of fine grid.
void copyTo (LevelData< CodimBox > &a_coarseData)
 Obtain averaged results by copying to the destination.
void averageToCoarse (LevelData< CodimBox > &a_coarseData, const LevelData< CodimBox > &a_fineData)
 Averages fine-level data to coarse level.
void averageToCoarseHarmonic (LevelData< CodimBox > &a_coarseData, const LevelData< CodimBox > &a_fineData)
 Averages fine-level data to coarse level using harmonic averaging.

Protected Types

enum  AverageType { arithmetic = 0, harmonic }

Protected Member Functions

void computeAverages (LevelData< CodimBox > &a_coarseData, const LevelData< CodimBox > &a_fineData, const AverageType a_averageType)
 Utility function to completely determine averages.
void average (const LevelData< CodimBox > &a_fineData, const AverageType a_averageType, const int a_refFactor)
void averageGridData (CodimBox &a_coarsenedFine, const CodimBox &a_fine, const AverageType a_averageType, const int a_refFactor) const
 Averages entire single grid data from fine->coarse.

Protected Attributes

LevelData< CodimBoxm_coarsenedFineData
bool m_isDefined
bool m_isAveraged
int m_nRef

Member Enumeration Documentation

Enumerator:
arithmetic 
harmonic 


Constructor & Destructor Documentation

CoarseAverageCodim::CoarseAverageCodim (  ) 

Default constructor.

CoarseAverageCodim::CoarseAverageCodim ( const DisjointBoxLayout a_fineGrids,
const int  a_codim,
const int  a_nComp,
const int  a_nRef 
)

Full constructor.

CoarseAverageCodim::~CoarseAverageCodim (  ) 

Destructor.


Member Function Documentation

void CoarseAverageCodim::define ( const DisjointBoxLayout a_fineGrids,
const int  a_codim,
const int  a_nComp,
const int  a_nRef 
)

Defines the object.

bool CoarseAverageCodim::isDefined (  )  const [inline]

Has define been called?

References m_isDefined.

void CoarseAverageCodim::average ( const LevelData< CodimBox > &  a_fineData  ) 

Averages fine-level data to internal coarse representation of fine grid.

void CoarseAverageCodim::averageHarmonic ( const LevelData< CodimBox > &  a_fineData  ) 

Harmonic averaging of fine data to coarse representation of fine grid.

void CoarseAverageCodim::sum ( const LevelData< CodimBox > &  a_fineData,
const int  a_refFactor = 1 
)

Summation of fine data to internal coarse representation of fine grid.

void CoarseAverageCodim::copyTo ( LevelData< CodimBox > &  a_coarseData  ) 

Obtain averaged results by copying to the destination.

void CoarseAverageCodim::averageToCoarse ( LevelData< CodimBox > &  a_coarseData,
const LevelData< CodimBox > &  a_fineData 
)

Averages fine-level data to coarse level.

void CoarseAverageCodim::averageToCoarseHarmonic ( LevelData< CodimBox > &  a_coarseData,
const LevelData< CodimBox > &  a_fineData 
)

Averages fine-level data to coarse level using harmonic averaging.

void CoarseAverageCodim::computeAverages ( LevelData< CodimBox > &  a_coarseData,
const LevelData< CodimBox > &  a_fineData,
const AverageType  a_averageType 
) [protected]

Utility function to completely determine averages.

void CoarseAverageCodim::average ( const LevelData< CodimBox > &  a_fineData,
const AverageType  a_averageType,
const int  a_refFactor 
) [protected]

Utility for averaging fine-level data to internal coarse representation of fine grid

void CoarseAverageCodim::averageGridData ( CodimBox a_coarsenedFine,
const CodimBox a_fine,
const AverageType  a_averageType,
const int  a_refFactor 
) const [protected]

Averages entire single grid data from fine->coarse.


Member Data Documentation

Work array for coarsening of fine data, same "shape" as fine data

Referenced by isDefined().

int CoarseAverageCodim::m_nRef [protected]


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

Generated on Mon Nov 20 03:42:55 2017 for Chombo + EB by  doxygen 1.5.5