#include <MiniIFFAB.H>
Public Member Functions | |
MiniIFFAB () | |
MiniIFFAB (const IntVectSet &a_region, const EBGraph &a_ebgraph, const int &a_direction, const int &a_nvarin) | |
~MiniIFFAB () | |
void | define (const IntVectSet &a_region, const EBGraph &a_ebgraph, const int &a_direction, const int &a_nvarin) |
void | setVal (const T &value) |
void | setVal (int ivar, const T &value) |
void | copy (const Box &a_intBox, const Interval &a_destInterval, const Box &a_toBox, const MiniIFFAB< T > &a_src, const Interval &a_srcInterval) |
void | clear () |
MiniIFFAB (const Box &a_region, int a_nVar) | |
invalid but necessary for leveldata to compile | |
bool | isDefined () const |
int | nComp () const |
T & | operator() (const FaceIndex &a_face, const int &varlocin) |
const T & | operator() (const FaceIndex &a_face, const int &varlocin) const |
T * | dataPtr (const int &a_comp) |
T * | getIndex (const FaceIndex &a_face, const int &a_comp) const |
const T * | dataPtr (const int &a_comp) const |
int | size (const Box &R, const Interval &comps) const |
void | linearOut (void *buf, const Box &R, const Interval &comps) const |
void | linearIn (void *buf, const Box &R, const Interval &comps) |
int | numFaces () const |
const IntVectSet & | getIVS () const |
Static Public Member Functions | |
static int | preAllocatable () |
Static Public Attributes | |
static bool | s_verbose = false |
Protected Attributes | |
T * | m_data |
Vector< FaceIndex > | m_faces |
IntVectSet | m_ivs |
int | m_nFaces |
int | m_nComp |
int | m_direction |
EBGraph | m_ebgraph |
bool | m_isDefined |
Private Member Functions | |
void | setDefaultValues () |
void | getFaceSubset (Vector< FaceIndex > &a_subFaces, const Box &a_subBox) const |
void | operator= (const MiniIFFAB< T > &) |
MiniIFFAB (const MiniIFFAB< T > &) |
Default constructor. Constructs an uninitialized IFFAB. You must subsequently call { define} before using this IFFAB.
References MiniIFFAB< T >::setDefaultValues().
MiniIFFAB< T >::MiniIFFAB | ( | const IntVectSet & | a_region, | |
const EBGraph & | a_ebgraph, | |||
const int & | a_direction, | |||
const int & | a_nvarin | |||
) | [inline] |
Defining constructor. Specifies the irregular domain and the number of data components per face. The irregular domain must lie completely within the EBGraph. The contents are uninitialized. Calls full define function.
References MiniIFFAB< T >::define(), and MiniIFFAB< T >::setDefaultValues().
References MiniIFFAB< T >::clear().
References MayDay::Error().
void MiniIFFAB< T >::define | ( | const IntVectSet & | a_region, | |
const EBGraph & | a_ebgraph, | |||
const int & | a_direction, | |||
const int & | a_nvarin | |||
) | [inline] |
Full define function. Specifies the irregular domain and the number of data components per face. The irregular domain must lie completely within the EBGraph. The contents are uninitialized. If it has previously been defined, the old definition data is overwritten and lost.
References MiniIFFAB< T >::clear(), FaceIterator::getVector(), MiniIFFAB< T >::m_data, MiniIFFAB< T >::m_direction, MiniIFFAB< T >::m_ebgraph, MiniIFFAB< T >::m_faces, MiniIFFAB< T >::m_isDefined, MiniIFFAB< T >::m_ivs, MiniIFFAB< T >::m_nComp, MiniIFFAB< T >::m_nFaces, Vector< T >::size(), SpaceDim, and FaceStop::SurroundingWithBoundary.
Referenced by MiniIFFAB< T >::MiniIFFAB().
void MiniIFFAB< T >::setVal | ( | const T & | value | ) | [inline] |
Set a value at every data location.
References MiniIFFAB< T >::isDefined(), MiniIFFAB< T >::m_data, MiniIFFAB< T >::m_nComp, and MiniIFFAB< T >::m_nFaces.
void MiniIFFAB< T >::setVal | ( | int | ivar, | |
const T & | value | |||
) | [inline] |
Set a value at every data location.
References MiniIFFAB< T >::isDefined(), MiniIFFAB< T >::m_data, MiniIFFAB< T >::m_nComp, and MiniIFFAB< T >::m_nFaces.
void MiniIFFAB< T >::copy | ( | const Box & | a_intBox, | |
const Interval & | a_destInterval, | |||
const Box & | a_toBox, | |||
const MiniIFFAB< T > & | a_src, | |||
const Interval & | a_srcInterval | |||
) | [inline] |
define over surrounding nodes of invectset (ivs is cell-centered).
References Interval::begin(), Interval::end(), MiniIFFAB< T >::isDefined(), IntVectSet::isEmpty(), MiniIFFAB< T >::m_direction, MiniIFFAB< T >::m_ebgraph, MiniIFFAB< T >::m_ivs, MiniIFFAB< T >::m_nComp, FaceIterator::ok(), FaceIterator::reset(), Interval::size(), and FaceStop::SurroundingWithBoundary.
void MiniIFFAB< T >::clear | ( | ) | [inline] |
Remove all data from this MiniIFFAB. You must call { define} again in order to use it.
References MiniIFFAB< T >::m_data, MiniIFFAB< T >::m_faces, Vector< T >::resize(), and MiniIFFAB< T >::setDefaultValues().
Referenced by MiniIFFAB< T >::define(), and MiniIFFAB< T >::~MiniIFFAB().
bool MiniIFFAB< T >::isDefined | ( | ) | const [inline] |
Tells whether this MiniIFFAB has been defined, either with a constructor or with { define}. It must be initialized in order to access its data.
References MiniIFFAB< T >::m_isDefined.
Referenced by MiniIFFAB< T >::copy(), MiniIFFAB< T >::linearIn(), MiniIFFAB< T >::linearOut(), MiniIFFAB< T >::operator()(), MiniIFFAB< T >::setVal(), and MiniIFFAB< T >::size().
int MiniIFFAB< T >::nComp | ( | ) | const [inline] |
Return the number of data components of this MiniIFFAB.
References MiniIFFAB< T >::m_nComp.
T & MiniIFFAB< T >::operator() | ( | const FaceIndex & | a_face, | |
const int & | varlocin | |||
) | [inline] |
Indexing operator. Return a reference to the contents of this IFFAB, at the specified face and data component. The first component is zero, the last is {nvar-1}. The returned object is a modifiable lvalue.
References MiniIFFAB< T >::dataPtr(), FaceIndex::direction(), MiniIFFAB< T >::getIndex(), MiniIFFAB< T >::isDefined(), and MiniIFFAB< T >::m_direction.
T * MiniIFFAB< T >::dataPtr | ( | const int & | a_comp | ) | [inline] |
References MiniIFFAB< T >::m_data, MiniIFFAB< T >::m_nComp, and MiniIFFAB< T >::m_nFaces.
Referenced by MiniIFFAB< T >::getIndex(), and MiniIFFAB< T >::operator()().
const T * MiniIFFAB< T >::dataPtr | ( | const int & | a_comp | ) | const [inline] |
References MiniIFFAB< T >::m_data, MiniIFFAB< T >::m_nComp, and MiniIFFAB< T >::m_nFaces.
static int MiniIFFAB< T >::preAllocatable | ( | ) | [inline, static] |
int MiniIFFAB< T >::numFaces | ( | ) | const [inline] |
References MiniIFFAB< T >::m_nFaces.
const IntVectSet& MiniIFFAB< T >::getIVS | ( | ) | const [inline] |
References MiniIFFAB< T >::m_ivs.
void MiniIFFAB< T >::setDefaultValues | ( | ) | [inline, private] |
References MiniIFFAB< T >::m_data, MiniIFFAB< T >::m_direction, MiniIFFAB< T >::m_isDefined, MiniIFFAB< T >::m_nComp, and MiniIFFAB< T >::m_nFaces.
Referenced by MiniIFFAB< T >::clear(), and MiniIFFAB< T >::MiniIFFAB().
void MiniIFFAB< T >::getFaceSubset | ( | Vector< FaceIndex > & | a_subFaces, | |
const Box & | a_subBox | |||
) | const [inline, private] |
References Box::contains(), Side::Hi, Side::Lo, MiniIFFAB< T >::m_faces, Vector< T >::push_back(), Vector< T >::resize(), and Vector< T >::size().
Referenced by MiniIFFAB< T >::linearOut(), and MiniIFFAB< T >::size().
References MayDay::Error().
Referenced by MiniIFFAB< T >::size().
IntVectSet MiniIFFAB< T >::m_ivs [protected] |
Referenced by MiniIFFAB< T >::copy(), MiniIFFAB< T >::define(), MiniIFFAB< T >::getIVS(), and MiniIFFAB< T >::size().
int MiniIFFAB< T >::m_direction [protected] |
Referenced by MiniIFFAB< T >::copy(), MiniIFFAB< T >::define(), and MiniIFFAB< T >::size().
bool MiniIFFAB< T >::m_isDefined [protected] |