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 Copier & getUExchangeCopier () const
 Return the exchange copier for U. More...
 
const Copier & getJUExchangeCopier () const
 Return the exchange copier for JU. More...
 
const Copier & refUExchangeCopier () const
 Return the exchange copier for U (before defined) More...
 
const Copier & refJUExchangeCopier () const
 Return the exchange copier for JU (before defined) More...
 

Protected Member Functions

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

Protected Attributes

LevelGridMetrics * m_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 &)
 
MappedLevelData & operator= (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() [1/2]

MappedLevelData::MappedLevelData ( )

Default constructor.

◆ ~MappedLevelData()

MappedLevelData::~MappedLevelData ( )

Destructor.

◆ MappedLevelData() [2/2]

MappedLevelData::MappedLevelData ( const MappedLevelData &  )
private

Member Function Documentation

◆ operator=()

MappedLevelData& MappedLevelData::operator= ( const MappedLevelData &  )
private

◆ define()

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 
)

◆ reshapeJUNew()

void MappedLevelData::reshapeJUNew ( )

◆ reshapeJUOld()

void MappedLevelData::reshapeJUOld ( )

◆ reshapeU()

void MappedLevelData::reshapeU ( )

◆ getU() [1/2]

const LevelData<FArrayBox>& MappedLevelData::getU ( const int  a_numValidGhost = 0,
const int  a_numInvalidGhost = 0 
) const

◆ getU() [2/2]

LevelData<FArrayBox>& MappedLevelData::getU ( const int  a_numValidGhost = 0,
const int  a_numInvalidGhost = 0 
)

◆ getJU() [1/2]

const LevelData<FArrayBox>& MappedLevelData::getJU ( const int  a_numValidGhost = 0,
const int  a_numInvalidGhost = 0 
) const

◆ getJU() [2/2]

LevelData<FArrayBox>& MappedLevelData::getJU ( const int  a_numValidGhost = 0,
const int  a_numInvalidGhost = 0 
)

◆ getJUOld()

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.

◆ rawU() [1/2]

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.

◆ rawU() [2/2]

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

References CH_assert, m_defined, and m_ULevP.

◆ rawJU() [1/2]

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.

◆ rawJU() [2/2]

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

◆ invalidateU()

void MappedLevelData::invalidateU ( const bool  a_this2FnInterpDataInvalid = true)

Invalidate all of <U>

◆ invalidateJUGhosts()

void MappedLevelData::invalidateJUGhosts ( )

◆ invalidate()

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

Invalidate all ghost data and all of <U>

◆ copyJUNewToOld()

void MappedLevelData::copyJUNewToOld ( )

(assumes the same layout)

◆ copyJUOldToNew()

void MappedLevelData::copyJUOldToNew ( )

(assumes different layouts)

◆ swapJUNewAndOld()

void MappedLevelData::swapJUNewAndOld ( )

◆ getUExchangeCopier()

const Copier & MappedLevelData::getUExchangeCopier ( ) const
inline

Return the exchange copier for U.

References CH_assert, m_defined, and m_UExchangeCopier.

◆ getJUExchangeCopier()

const Copier & MappedLevelData::getJUExchangeCopier ( ) const
inline

Return the exchange copier for JU.

References CH_assert, m_defined, and m_JUExchangeCopier.

◆ refUExchangeCopier()

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.

◆ refJUExchangeCopier()

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.

◆ deallocate()

void MappedLevelData::deallocate ( )
protected

◆ fillInvalidGhosts()

void MappedLevelData::fillInvalidGhosts ( )
protected

◆ hasCoarser()

bool MappedLevelData::hasCoarser ( ) const
inlineprotected

References m_CrULevP.

Member Data Documentation

◆ m_LGMP

LevelGridMetrics* MappedLevelData::m_LGMP
protected

◆ m_ULevP

LevelData<FArrayBox>* MappedLevelData::m_ULevP
protected

Referenced by rawU().

◆ m_JULevP

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

Referenced by getJUOld(), and rawJU().

◆ m_CrULevP

const LevelData<FArrayBox>* MappedLevelData::m_CrULevP
protected

Referenced by hasCoarser().

◆ m_UExchangeCopier

Copier MappedLevelData::m_UExchangeCopier
protected

◆ m_JUExchangeCopier

Copier MappedLevelData::m_JUExchangeCopier
protected

◆ m_velocityIntv

Interval MappedLevelData::m_velocityIntv
protected

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

◆ m_invalidGhostStatusU

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.

◆ m_invalidGhostStatusJU

int MappedLevelData::m_invalidGhostStatusJU
protected

◆ m_validStatusU

int MappedLevelData::m_validStatusU
protected

◆ m_validStatusJU

int MappedLevelData::m_validStatusJU
protected

◆ m_validCFLayerStatusU

int MappedLevelData::m_validCFLayerStatusU
protected

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

◆ m_extraBlockStatusU

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.

◆ m_numComp

int MappedLevelData::m_numComp
protected

◆ m_numGhostU

int MappedLevelData::m_numGhostU
protected

◆ m_numGhostJU

int MappedLevelData::m_numGhostJU
protected

◆ m_indexJUOld

int MappedLevelData::m_indexJUOld
protected

Referenced by getJUOld().

◆ m_indexJUNew

int MappedLevelData::m_indexJUNew
protected

Referenced by rawJU().

◆ m_allocU

int MappedLevelData::m_allocU
protected

◆ m_allocJUNew

int MappedLevelData::m_allocJUNew
protected

◆ m_allocJUOld

int MappedLevelData::m_allocJUOld
protected

◆ m_trimUExchanger

bool MappedLevelData::m_trimUExchanger
protected

◆ m_trimJUExchanger

bool MappedLevelData::m_trimJUExchanger
protected

◆ m_useJUExchangerForU

bool MappedLevelData::m_useJUExchangerForU
protected

◆ m_haveValidCrFnU

bool MappedLevelData::m_haveValidCrFnU
protected

◆ m_defined

bool MappedLevelData::m_defined
protected

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