Chombo + EB + MF  3.2
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
CoarseAverageCodim Class Reference

#include <CoarseAverageCodim.H>

Public Member Functions

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

Protected Types

enum  AverageType { arithmetic = 0, harmonic }
 

Protected Member Functions

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

Protected Attributes

LevelData< CodimBox< FArrayBox > > m_coarsenedFineData
 
bool m_isDefined
 
bool m_isAveraged
 
int m_nRef
 

Detailed Description

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

Member Enumeration Documentation

◆ AverageType

Enumerator
arithmetic 
harmonic 

Constructor & Destructor Documentation

◆ CoarseAverageCodim() [1/2]

CoarseAverageCodim::CoarseAverageCodim ( )

Default constructor.

◆ CoarseAverageCodim() [2/2]

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

Full constructor.

◆ ~CoarseAverageCodim()

CoarseAverageCodim::~CoarseAverageCodim ( )

Destructor.

Member Function Documentation

◆ define()

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

Defines the object.

◆ isDefined()

bool CoarseAverageCodim::isDefined ( ) const
inline

Has define been called?

References m_isDefined.

◆ average() [1/2]

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

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

◆ averageHarmonic()

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

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

◆ sum()

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

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

◆ copyTo()

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

Obtain averaged results by copying to the destination.

◆ averageToCoarse()

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

Averages fine-level data to coarse level.

◆ averageToCoarseHarmonic()

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

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

◆ computeAverages()

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

Utility function to completely determine averages.

◆ average() [2/2]

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

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

◆ averageGridData()

void CoarseAverageCodim::averageGridData ( CodimBox< FArrayBox > &  a_coarsenedFine,
const CodimBox< FArrayBox > &  a_fine,
const AverageType  a_averageType,
const int  a_refFactor 
) const
protected

Averages entire single grid data from fine->coarse.

Member Data Documentation

◆ m_coarsenedFineData

LevelData<CodimBox<FArrayBox> > CoarseAverageCodim::m_coarsenedFineData
protected

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

◆ m_isDefined

bool CoarseAverageCodim::m_isDefined
protected

Referenced by isDefined().

◆ m_isAveraged

bool CoarseAverageCodim::m_isAveraged
protected

◆ m_nRef

int CoarseAverageCodim::m_nRef
protected

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