Chombo + EB  3.2
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
CFIVS Class Reference

Internal class to find parts of a box outside the valid region of a level. More...

#include <CFIVS.H>

Public Member Functions

 CFIVS ()
 Null constructor. More...
 
 ~CFIVS ()
 Destructor. More...
 
void define (const IntVectSet &a_IVS)
 Explicit define based on an IntVectSet. More...
 
void define (const DataIndex &a_dataIndex, const DisjointBoxLayout &a_grids, const Box &a_ghostBox)
 General define for any box using NeighborIterators. More...
 
void coarsen (int a_ref)
 Coarsen the stored cells. More...
 
const BoxpackedBox () const
 Returns packed box for when isPacked() is true. More...
 
const BoxminBox () const
 Returns minbox for when isPacked() is false (but can also be used if true) More...
 
const IntVectSetgetIVS () const
 Get the set of IntVects. More...
 
bool isPacked () const
 Returns "true" if this CF IntVectSet can be represented as a simple Box. More...
 
bool isEmpty () const
 Returns "true" if the defined IVS is empty. More...
 
bool isDefined () const
 Returns "true" if the object has been defined. More...
 
Legacy members

New uses of CFIVS should avoid these routines

 CFIVS (const Box &a_domain, const Box &a_boxIn, const DisjointBoxLayout &a_fineBoxes, int a_direction, Side::LoHiSide a_hiorlo)
 (Deprecated) constructor More...
 
 CFIVS (const ProblemDomain &a_domain, const Box &a_boxIn, const DisjointBoxLayout &a_fineBoxes, int a_direction, Side::LoHiSide a_hiorlo)
 (Deprecated) full constructor More...
 
void define (const Box &a_domain, const Box &a_boxIn, const DisjointBoxLayout &a_fineBoxes, int a_direction, Side::LoHiSide a_hiorlo)
 (Deprecated) define function More...
 
void define (const ProblemDomain &a_domain, const Box &a_boxIn, const DisjointBoxLayout &a_fineBoxes, int a_direction, Side::LoHiSide a_hiorlo)
 (Deprecated) full define function More...
 
void define (const ProblemDomain &a_domain, const Box &a_boxIn, const Vector< Box > &a_periodicfineBoxes, int a_direction, Side::LoHiSide a_hiorlo)
 is the face on the hi or lo side of the box? More...
 
void define (const ProblemDomain &a_domain, const DataIndex &a_dataIndex, const DisjointBoxLayout &a_grids, int a_direction, Side::LoHiSide a_hiorlo)
 
const IntVectSetgetFineIVS () const
 Get fine intvects which need to be interpolated. More...
 

Static Public Attributes

static long long s_packCount
 
static long long s_sparseCount
 

Protected Member Functions

void setDefaultValues ()
 
void decrementCounts ()
 Decrement counts (during redefine) More...
 
void packIVS ()
 Pack the IVS. More...
 

Protected Attributes

IntVectSet m_IVS
 IntVects that are outside the level. More...
 
Box m_packedBox
 
bool m_packed
 
bool m_empty
 
bool m_defined
 Has this object been defined? More...
 

Detailed Description

Internal class to find parts of a box outside the valid region of a level.

Typically used to find the ghost cells between this and a coarser level. These cells are represented by an IntVectSet and, if possible, packed into a box. This class should only be used through a CFRegion which breaks down the parts of a box into regions that have a high probability of being packed.

Constructor & Destructor Documentation

◆ CFIVS() [1/3]

CFIVS::CFIVS ( )

Null constructor.

◆ ~CFIVS()

CFIVS::~CFIVS ( )

Destructor.

◆ CFIVS() [2/3]

CFIVS::CFIVS ( const Box a_domain,
const Box a_boxIn,
const DisjointBoxLayout a_fineBoxes,
int  a_direction,
Side::LoHiSide  a_hiorlo 
)

(Deprecated) constructor

The ProblemDomain class has replaced the Box domain Replaces Box domain with a ProblemDomain and calls define fn.

◆ CFIVS() [3/3]

CFIVS::CFIVS ( const ProblemDomain a_domain,
const Box a_boxIn,
const DisjointBoxLayout a_fineBoxes,
int  a_direction,
Side::LoHiSide  a_hiorlo 
)

(Deprecated) full constructor

CFRegion should specify the region and call general define for a box Calls corresponding define function.

Member Function Documentation

◆ define() [1/6]

void CFIVS::define ( const IntVectSet a_IVS)

Explicit define based on an IntVectSet.

◆ define() [2/6]

void CFIVS::define ( const DataIndex a_dataIndex,
const DisjointBoxLayout a_grids,
const Box a_ghostBox 
)

General define for any box using NeighborIterators.

◆ coarsen()

void CFIVS::coarsen ( int  a_ref)

Coarsen the stored cells.

◆ packedBox()

const Box & CFIVS::packedBox ( ) const
inline

Returns packed box for when isPacked() is true.

References CH_assert, isPacked(), and m_packedBox.

◆ minBox()

const Box & CFIVS::minBox ( ) const
inline

Returns minbox for when isPacked() is false (but can also be used if true)

References m_packedBox.

◆ getIVS()

const IntVectSet & CFIVS::getIVS ( ) const
inline

Get the set of IntVects.

References m_IVS.

◆ isPacked()

bool CFIVS::isPacked ( ) const
inline

Returns "true" if this CF IntVectSet can be represented as a simple Box.

Returns 'true' if this coarse-fine IntVectSet can be represented as just a Box, ie. a user can perform a dense computation instead of a pointwise calculation using IVSIterator.

References CH_assert, m_defined, and m_packed.

Referenced by packedBox().

◆ isEmpty()

bool CFIVS::isEmpty ( ) const
inline

Returns "true" if the defined IVS is empty.

References CH_assert, m_defined, and m_empty.

◆ isDefined()

bool CFIVS::isDefined ( ) const
inline

Returns "true" if the object has been defined.

References m_defined.

◆ setDefaultValues()

void CFIVS::setDefaultValues ( )
protected

◆ decrementCounts()

void CFIVS::decrementCounts ( )
protected

Decrement counts (during redefine)

◆ packIVS()

void CFIVS::packIVS ( )
protected

Pack the IVS.

◆ define() [3/6]

void CFIVS::define ( const Box a_domain,
const Box a_boxIn,
const DisjointBoxLayout a_fineBoxes,
int  a_direction,
Side::LoHiSide  a_hiorlo 
)

(Deprecated) define function

CFRegion should specify the region and call general define for a box Replaces Box domain with a ProblemDomain and calls define fn.

◆ define() [4/6]

void CFIVS::define ( const ProblemDomain a_domain,
const Box a_boxIn,
const DisjointBoxLayout a_fineBoxes,
int  a_direction,
Side::LoHiSide  a_hiorlo 
)

(Deprecated) full define function

CFRegion should specify the region and call general define for a box

Parameters
a_boxInProblem domain at the fine level
a_fineBoxesfine-level grid box
a_directionfine-level grids
a_hiorlodirection of the face of interest

◆ define() [5/6]

void CFIVS::define ( const ProblemDomain a_domain,
const Box a_boxIn,
const Vector< Box > &  a_periodicfineBoxes,
int  a_direction,
Side::LoHiSide  a_hiorlo 
)

is the face on the hi or lo side of the box?

(Deprecated) faster define function. Requires the use of CFStencil::buildPeriodicVector static function. CFRegion should specify the region and call general define for a box

◆ define() [6/6]

void CFIVS::define ( const ProblemDomain a_domain,
const DataIndex a_dataIndex,
const DisjointBoxLayout a_grids,
int  a_direction,
Side::LoHiSide  a_hiorlo 
)

(Deprecated) Updated define function that uses NeighborIterators instead of traversing the entire list of boxes. CFRegion should specify the region and call general define for a box. However, at least this one is using the recommended technology, Neighbor iterators.

◆ getFineIVS()

const IntVectSet & CFIVS::getFineIVS ( ) const
inline

Get fine intvects which need to be interpolated.

Renamed to getIVS() since CFIV has a general purpose now. This will be empty if isEmpty() returns true

References m_IVS.

Member Data Documentation

◆ s_packCount

long long CFIVS::s_packCount
static

◆ s_sparseCount

long long CFIVS::s_sparseCount
static

◆ m_IVS

IntVectSet CFIVS::m_IVS
protected

IntVects that are outside the level.

Referenced by getFineIVS(), and getIVS().

◆ m_packedBox

Box CFIVS::m_packedBox
protected

If m_packed is true, the Box with which the coarse-fine IntVectSet can be represented. If m_packed is false, same as m_IVS.minBox().

Referenced by minBox(), and packedBox().

◆ m_packed

bool CFIVS::m_packed
protected

Can the coarse-fine IntVectSet be represented as a Box? Set to false if the IVS is empty

Referenced by isPacked().

◆ m_empty

bool CFIVS::m_empty
protected

Is the IVS empty - cached here for fast lookup

Referenced by isEmpty().

◆ m_defined

bool CFIVS::m_defined
protected

Has this object been defined?

Referenced by isDefined(), isEmpty(), and isPacked().


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