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

Solution data on a level for mapped grids. More...

#include <MappedLevelData.H>

Public Member Functions

 MappedLevelData ()
 Default constructor. More...
 
 ~MappedLevelData ()
 Destructor. More...
 
void define (LevelGridMetrics *const a_LGMP, LevelData< FArrayBox > *const a_ULevP, LevelData< FArrayBox > *const a_JUNewLevP, LevelData< FArrayBox > *const a_JUOldLevP, const LevelData< FArrayBox > *const a_CrULevP, const int a_numComp, const Interval &a_velocityIntv, const int a_numGhostU, const int a_numGhostJU=1, const bool a_trimUExchanger=false, const bool a_trimJUExchanger=true, const bool a_useJUExchangerForU=true)
 
void reshapeJUNew ()
 
void reshapeJUOld ()
 
void reshapeU ()
 
const LevelData< FArrayBox > & getU (const int a_numValidGhost=0, const int a_numInvalidGhost=0) const
 
LevelData< FArrayBox > & getU (const int a_numValidGhost=0, const int a_numInvalidGhost=0)
 
const LevelData< FArrayBox > & getJU (const int a_numValidGhost=0, const int a_numInvalidGhost=0) const
 
LevelData< FArrayBox > & getJU (const int a_numValidGhost=0, const int a_numInvalidGhost=0)
 
LevelData< FArrayBox > & getJUOld ()
 Return JUOld (always raw) More...
 
const LevelData< FArrayBox > & rawU () const
 Return pointer to U data with no computation. More...
 
LevelData< FArrayBox > & rawU ()
 
const LevelData< FArrayBox > & rawJU () const
 Return pointer to JU data with no computation. More...
 
LevelData< FArrayBox > & rawJU ()
 
void invalidateU (const bool a_this2FnInterpDataInvalid=true)
 Invalidate all of <U> More...
 
void invalidateJUGhosts ()
 
void invalidate (const bool a_this2FnInterpDataInvalid=true)
 Invalidate all ghost data and all of <U> More...
 
void copyJUNewToOld ()
 (assumes the same layout) More...
 
void copyJUOldToNew ()
 (assumes different layouts) More...
 
void swapJUNewAndOld ()
 
const CopiergetUExchangeCopier () const
 Return the exchange copier for U. More...
 
const CopiergetJUExchangeCopier () const
 Return the exchange copier for JU. More...
 
const CopierrefUExchangeCopier () const
 Return the exchange copier for U (before defined) More...
 
const CopierrefJUExchangeCopier () const
 Return the exchange copier for JU (before defined) More...
 

Protected Member Functions

void deallocate ()
 
void fillInvalidGhosts ()
 
bool hasCoarser () const
 

Protected Attributes

LevelGridMetricsm_LGMP
 
LevelData< FArrayBox > * m_ULevP
 
LevelData< FArrayBox > * m_JULevP [2]
 
const LevelData< FArrayBox > * m_CrULevP
 
Copier m_UExchangeCopier
 
Copier m_JUExchangeCopier
 
Interval m_velocityIntv
 
int m_invalidGhostStatusU
 
int m_invalidGhostStatusJU
 
int m_validStatusU
 
int m_validStatusJU
 
int m_validCFLayerStatusU
 
int m_extraBlockStatusU
 
int m_numComp
 
int m_numGhostU
 
int m_numGhostJU
 
int m_indexJUOld
 
int m_indexJUNew
 
int m_allocU
 
int m_allocJUNew
 
int m_allocJUOld
 
bool m_trimUExchanger
 
bool m_trimJUExchanger
 
bool m_useJUExchangerForU
 
bool m_haveValidCrFnU
 
bool m_defined
 

Private Member Functions

 MappedLevelData (const MappedLevelData &)
 
MappedLevelDataoperator= (const MappedLevelData &)
 

Detailed Description

Solution data on a level for mapped grids.

This class aids the user with maintaining <U> and <JU> on the level. These quantities are frequently updated during the AMR process requiring new compuations of <> and exchanging or filling ghosts. This routine tracks the number of ghosts and performs the appropriate operations to return either <> or <JU> with the requested number of valid or invalid ghost cells.

Note
  • Beware that if getU() and getJUNew() are used as used as arguments to a function, the order in which they are invoked is not defined and getU() may have side-effects on <JU>

Constructor & Destructor Documentation

MappedLevelData::MappedLevelData ( )

Default constructor.

MappedLevelData::~MappedLevelData ( )

Destructor.

MappedLevelData::MappedLevelData ( const MappedLevelData )
private

Member Function Documentation

MappedLevelData& MappedLevelData::operator= ( const MappedLevelData )
private
void MappedLevelData::define ( LevelGridMetrics *const  a_LGMP,
LevelData< FArrayBox > *const  a_ULevP,
LevelData< FArrayBox > *const  a_JUNewLevP,
LevelData< FArrayBox > *const  a_JUOldLevP,
const LevelData< FArrayBox > *const  a_CrULevP,
const int  a_numComp,
const Interval a_velocityIntv,
const int  a_numGhostU,
const int  a_numGhostJU = 1,
const bool  a_trimUExchanger = false,
const bool  a_trimJUExchanger = true,
const bool  a_useJUExchangerForU = true 
)
void MappedLevelData::reshapeJUNew ( )
void MappedLevelData::reshapeJUOld ( )
void MappedLevelData::reshapeU ( )
const LevelData<FArrayBox>& MappedLevelData::getU ( const int  a_numValidGhost = 0,
const int  a_numInvalidGhost = 0 
) const
LevelData<FArrayBox>& MappedLevelData::getU ( const int  a_numValidGhost = 0,
const int  a_numInvalidGhost = 0 
)
const LevelData<FArrayBox>& MappedLevelData::getJU ( const int  a_numValidGhost = 0,
const int  a_numInvalidGhost = 0 
) const
LevelData<FArrayBox>& MappedLevelData::getJU ( const int  a_numValidGhost = 0,
const int  a_numInvalidGhost = 0 
)
LevelData< FArrayBox > & MappedLevelData::getJUOld ( )
inline

Return JUOld (always raw)

You can't set ghosts anymore so make sure JUNew has ghosts set properly before you make it old.

References CH_assert, m_defined, m_indexJUOld, and m_JULevP.

const LevelData< FArrayBox > & MappedLevelData::rawU ( ) const
inline

Return pointer to U data with no computation.

Should only be used for accessing memory. Assume data is invalid.

References CH_assert, m_defined, and m_ULevP.

LevelData< FArrayBox > & MappedLevelData::rawU ( )
inline

References CH_assert, m_defined, and m_ULevP.

const LevelData< FArrayBox > & MappedLevelData::rawJU ( ) const
inline

Return pointer to JU data with no computation.

Should only be used for accessing memory. Assume data is invalid.

References CH_assert, m_defined, m_indexJUNew, and m_JULevP.

LevelData< FArrayBox > & MappedLevelData::rawJU ( )
inline
void MappedLevelData::invalidateU ( const bool  a_this2FnInterpDataInvalid = true)

Invalidate all of <U>

void MappedLevelData::invalidateJUGhosts ( )
void MappedLevelData::invalidate ( const bool  a_this2FnInterpDataInvalid = true)

Invalidate all ghost data and all of <U>

void MappedLevelData::copyJUNewToOld ( )

(assumes the same layout)

void MappedLevelData::copyJUOldToNew ( )

(assumes different layouts)

void MappedLevelData::swapJUNewAndOld ( )
const Copier & MappedLevelData::getUExchangeCopier ( ) const
inline

Return the exchange copier for U.

References CH_assert, m_defined, and m_UExchangeCopier.

const Copier & MappedLevelData::getJUExchangeCopier ( ) const
inline

Return the exchange copier for JU.

References CH_assert, m_defined, and m_JUExchangeCopier.

const Copier & MappedLevelData::refUExchangeCopier ( ) const
inline

Return the exchange copier for U (before defined)

Should only be used for accessing memory. Assume not defined.

References m_UExchangeCopier.

const Copier & MappedLevelData::refJUExchangeCopier ( ) const
inline

Return the exchange copier for JU (before defined)

Should only be used for accessing memory. Assume not defined.

References m_JUExchangeCopier.

void MappedLevelData::deallocate ( )
protected
void MappedLevelData::fillInvalidGhosts ( )
protected
bool MappedLevelData::hasCoarser ( ) const
inlineprotected

References m_CrULevP.

Member Data Documentation

LevelGridMetrics* MappedLevelData::m_LGMP
protected
LevelData<FArrayBox>* MappedLevelData::m_ULevP
protected

Referenced by rawU().

LevelData<FArrayBox>* MappedLevelData::m_JULevP[2]
protected

Referenced by getJUOld(), and rawJU().

const LevelData<FArrayBox>* MappedLevelData::m_CrULevP
protected

Referenced by hasCoarser().

Copier MappedLevelData::m_UExchangeCopier
protected
Copier MappedLevelData::m_JUExchangeCopier
protected
Interval MappedLevelData::m_velocityIntv
protected

The velocity interval in the components of <U> (or any other space vectors but only 1 is supported)

int MappedLevelData::m_invalidGhostStatusU
protected

The number of invalid ghosts (those that do not overlap valid cells on this level) in which /<U> has been interpolated.

int MappedLevelData::m_invalidGhostStatusJU
protected
int MappedLevelData::m_validStatusU
protected
int MappedLevelData::m_validStatusJU
protected
int MappedLevelData::m_validCFLayerStatusU
protected

If > 0, the number of layers of valid cells near the coarse-fine interface that have not been filled

int MappedLevelData::m_extraBlockStatusU
protected

The number of extra-block ghost cells in which <U> has been exchanged. These are really valid ghosts but are tracked separately.

int MappedLevelData::m_numComp
protected
int MappedLevelData::m_numGhostU
protected
int MappedLevelData::m_numGhostJU
protected
int MappedLevelData::m_indexJUOld
protected

Referenced by getJUOld().

int MappedLevelData::m_indexJUNew
protected

Referenced by rawJU().

int MappedLevelData::m_allocU
protected
int MappedLevelData::m_allocJUNew
protected
int MappedLevelData::m_allocJUOld
protected
bool MappedLevelData::m_trimUExchanger
protected
bool MappedLevelData::m_trimJUExchanger
protected
bool MappedLevelData::m_useJUExchangerForU
protected
bool MappedLevelData::m_haveValidCrFnU
protected
bool MappedLevelData::m_defined
protected

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