Overture
Version 25
|
#include <ParentChildSiblingInfo.h>
Public Types | |
typedef ParentChildSiblingInfoData | RCData |
Public Member Functions | |
ParentChildSiblingInfo () | |
default constructor | |
ParentChildSiblingInfo (const ParentChildSiblingInfo &x, const CopyType ct=DEEP) | |
copy constructor | |
~ParentChildSiblingInfo () | |
destructor | |
ParentChildSiblingInfo & | operator= (const ParentChildSiblingInfo &x) |
assignment operator | |
virtual aString | getClassName (void) const |
returns the className | |
void | reference (const ParentChildSiblingInfo &x) |
make a reference or a shallow copy | |
void | reference (ParentChildSiblingInfoData &x) |
reference a ParentChildSiblingInfoData object | |
virtual void | breakReference (void) |
break a reference and replace with a deep copy | |
virtual void | consistencyCheck (void) const |
performs error and consistency checks | |
virtual Integer | get (const GenericDataBase &db, const aString &name) |
read from a database | |
virtual Integer | put (const GenericDataBase &db, const aString &name) const |
write to a database | |
const list< ParentInfo * > & | getParents (void) const |
return list of parents from letter (rcData) | |
const list< ChildInfo * > & | getChildren (void) const |
return list of children from letter (rcData) | |
const list< SiblingInfo * > & | getSiblings (void) const |
return list of siblings from letter (rcData) | |
int | getParentBoxes (intSerialArray &, BoxList &, const IndexType &, const int) |
returns a list of parent boxes and the indices of the grids on which these boxes exist | |
int | getChildBoxes (intSerialArray &, BoxList &, const IndexType &, const int) |
returns a list of child boxes and the indices of the grids on which these boxes exist | |
int | getSiblingBoxes (intSerialArray &, BoxList &, BoxList &, const IndexType &, const int) |
returns a list of sibling boxes and the indices of the grids on which these boxes exist | |
int | getParentGhostBoxes (intSerialArray &, BoxList &, const Range &, const GridCollection &, const int, const IndexType &, const bool=FALSE) |
returns a list of parent ghost boxes and the indices of the grids on which these boxes exist | |
int | getSiblingGhostBoxes (intSerialArray &, BoxList &, BoxList &, const Range &, const GridCollection &, const int, const IndexType &) |
returns a list of sibling ghost boxes and the indices of the grids on which these boxes exist | |
Public Member Functions inherited from ReferenceCounting | |
ReferenceCounting () | |
ReferenceCounting (const ReferenceCounting &x, const CopyType ct=DEEP) | |
virtual | ~ReferenceCounting () |
Integer | incrementReferenceCount () |
Integer | decrementReferenceCount () |
Integer | getReferenceCount () const |
Logical | uncountedReferencesMayExist () |
Integer | getGlobalID () const |
void | setGlobalID (int id) |
Static Public Member Functions | |
static void | buildParentChildSiblingInfoObjects (const GridCollection &gc, ListOfParentChildSiblingInfo &listOfPCSInfo) |
builds ParentChildSiblingInfo objects for all MappedGrids in a GridCollection object | |
static bool | isValidBoxForType (const Box &box, const IndexType &iType) |
returns true if the box is valid for the given IndexType | |
static void | getGhostRegionBoxes (const MappedGrid &, const Range &, const IndexType &, BoxList &, bool excludePhysicalBoundaries=false) |
returns a list of ghost boxes representing the index space of the ghost points around a MappedGrid | |
Public Attributes | |
RCData * | rcData |
Friends | |
ostream & | operator<< (ostream &s, const ParentChildSiblingInfo &pcsInfo) |
ParentChildSiblingInfo::ParentChildSiblingInfo | ( | ) |
default constructor
References assert, ReferenceCounting::incrementReferenceCount(), NULL, and rcData.
ParentChildSiblingInfo::ParentChildSiblingInfo | ( | const ParentChildSiblingInfo & | x, |
const CopyType | ct = DEEP |
||
) |
ParentChildSiblingInfo::~ParentChildSiblingInfo | ( | ) |
destructor
References ReferenceCounting::decrementReferenceCount(), NULL, and rcData.
|
virtual |
break a reference and replace with a deep copy
breaks a reference to the object rcData currently points at and creates a seperate copy
Reimplemented from ReferenceCounting.
References ReferenceCounting::getReferenceCount(), NULL, rcData, and x.
|
static |
builds ParentChildSiblingInfo objects for all MappedGrids in a GridCollection object
this routine is called to build the ParentChildSiblingInfo objects associated with each MappedGrid in a grid collection.
gc | : the GridCollection representing an adaptive grid (input) |
listOfPCSInfo | : returns the reference counted list of ParentChildSiblingInfo objects associated with each grid ordered by their grid number in gc. |
it is assumed that we have access to the refinement level information and that a call to gc.update(THERefinement) is not necessary
References ListOfParentChildSiblingInfo::addElement(), assert, GenericGridCollection::baseGridNumber, FALSE, ListOfParentChildSiblingInfo::getLength(), GenericGridCollection::gridNumber, isPeriodic, MappedGrid::isPeriodic(), ListOfParentChildSiblingInfo::listLength(), GenericGridCollection::numberOfComponentGrids(), MappedGrid::numberOfDimensions(), GenericGridCollection::numberOfGrids(), GenericGridCollection::numberOfRefinementLevels(), GridCollection::refinementFactor, and GridCollection::refinementLevel.
Referenced by GridCollectionData::updateParentChildSiblingInfo().
|
virtual |
performs error and consistency checks
Reimplemented from ReferenceCounting.
References assert, ReferenceCounting::consistencyCheck(), ParentChildSiblingInfoData::consistencyCheck(), getClassName(), ReferenceCounting::getGlobalID(), NULL, and rcData.
|
virtual |
read from a database
int ParentChildSiblingInfo::getChildBoxes | ( | intSerialArray & | gridIndices, |
BoxList & | childBoxes, | ||
const IndexType & | iType, | ||
const int | problemDimension | ||
) |
returns a list of child boxes and the indices of the grids on which these boxes exist
returns the number of child boxes and also their indices and intersection boxes by reference
gridIndices | : list of indices of child MappedGrids in the adaptive GridCollection (output) |
childBoxes | : list of Boxes representing index space on children overlapped by MappedGrid corresponding to this object (output) |
iType | : desired index type along each direction, only valid dimensions are considered, rest assumed to be NODE centered (input) |
problemDimension | : number of valid dimensions (input) |
NOTE: The boxes returned in the box lists have the index type specified by iType along valid dimensions and are NODE centered for higher dimensions
References assert, getChildren(), isValidBoxForType(), and NULL.
|
inline |
return list of children from letter (rcData)
References assert, ParentChildSiblingInfoData::getChildren(), NULL, and rcData.
Referenced by getChildBoxes(), and operator<<().
|
inlinevirtual |
|
static |
returns a list of ghost boxes representing the index space of the ghost points around a MappedGrid
returns a list of boxes representing the ghost region of mg lying between ghostLines
mg,: | MappedGrid whose ghost region is to be determined (input) |
ghostLines,: | Range object base = 0 corresponds to boundary, 1 to the first ghost line and so on bound >= base represents last ghost line to consider (input) |
iType,: | desired index type along each direction, only valid dimensions are considered, rest assumed to be NODE centered (input) |
ghostRegionBoxes | : list of boxes representing index space of ghost region of mg lying between ghostLines |
NOTE: The boxes returned in the box lists have the index type specified by iType along valid dimensions and are NODE centered for higher dimensions
References assert, MappedGrid::boundaryCondition(), MappedGrid::box(), and MappedGrid::numberOfDimensions().
Referenced by getParentGhostBoxes(), and getSiblingGhostBoxes().
int ParentChildSiblingInfo::getParentBoxes | ( | intSerialArray & | gridIndices, |
BoxList & | parentBoxes, | ||
const IndexType & | iType, | ||
const int | problemDimension | ||
) |
returns a list of parent boxes and the indices of the grids on which these boxes exist
returns the number of parent boxes and also their indices and intersection boxes by reference
gridIndices | : list of indices of parent MappedGrids in the adaptive GridCollection (output) |
parentBoxes | : list of Boxes representing index space on parents overlapped by MappedGrid corresponding to this object (output) |
iType | : desired index type along each direction, only valid dimensions are considered, rest assumed to be NODE centered (input) |
problemDimension | : number of valid dimensions (input) |
NOTE: The boxes returned in the box lists have the index type specified by iType along valid dimensions and are NODE centered for higher dimensions
References assert, getParents(), isValidBoxForType(), and NULL.
Referenced by InterpolateRefinements::interpolateCoarseFromFine().
int ParentChildSiblingInfo::getParentGhostBoxes | ( | intSerialArray & | gridIndices, |
BoxList & | parentGhostBoxes, | ||
const Range & | ghostLines, | ||
const GridCollection & | gc, | ||
const int | currentGridIndex, | ||
const IndexType & | iType, | ||
const bool | excludeSiblingPoints = FALSE |
||
) |
returns a list of parent ghost boxes and the indices of the grids on which these boxes exist
Given a range of bounding ghost lines (which can include the boundary) and a desired centering along each axis this routine returns a list of boxes that represent the index space on parent MappedGrids that lie under the specified ghost region of the current grid indexed by currentGridIndex, and an intSerialArray of grid indices of the respective parents in gc. The boxes are returned in fine grid index space. A flag controls whether ghost points that lie under sibling MappedGrids should be included or not. An integer return value specifies the number of boxes if any.
gridIndices | : list of indices of sibling MappedGrids in the adaptive GridCollection (output) |
parentGhostBoxes | : list of Boxes representing index space on parents that lies under the ghost region specified by the Range ghostLines (output). The boxes are specified in the index space of the current grid and NOT that of the parents. i.e. they are fine grid boxes and NOT coarse boxes |
ghostLines | : Range of ghost lines, 0 corresponding to the boundary, 1 being the first ghost line etc(input) |
gc | : adaptive GridCollection (input) |
currentGridIndex | : grid number of the current grid into gc (input) |
iType | : desired index type along each direction, only valid dimensions are considered, rest assumed to be NODE centered (input) |
excludeSiblingPoints | : whether ghost points that lie under sibling grids should be excluded. default is FALSE (input) |
NOTE: The boxes returned in the box lists have the index type specified by iType along valid dimensions and are NODE centered for higher dimensions
References assert, boundingBox, getGhostRegionBoxes(), getParents(), getSiblingGhostBoxes(), isValidBoxForType(), NULL, GridCollection::numberOfDimensions(), and GridCollection::refinementFactor.
Referenced by InterpolateRefinements::interpolateRefinementBoundaries().
|
inline |
return list of parents from letter (rcData)
References assert, ParentChildSiblingInfoData::getParents(), NULL, and rcData.
Referenced by getParentBoxes(), getParentGhostBoxes(), and operator<<().
int ParentChildSiblingInfo::getSiblingBoxes | ( | intSerialArray & | gridIndices, |
BoxList & | siblingBoxes, | ||
BoxList & | ghostBoxesOnCurrentGrid, | ||
const IndexType & | iType, | ||
const int | problemDimension | ||
) |
returns a list of sibling boxes and the indices of the grids on which these boxes exist
returns the number of sibling boxes and also their indices and intersection boxes by reference
gridIndices | : list of indices of sibling MappedGrids in the adaptive GridCollection (output) |
siblingBoxes | : list of Boxes representing index space on sibling overlapped by MappedGrid corresponding to this object (output) |
ghostBoxesOnCurrentGrid | : list of Boxes representing index space in ghost region of current grid that corresponds to siblingBoxes (output) |
iType | : desired index type along each direction, only valid dimensions are considered, rest assumed to be NODE centered (input) |
problemDimension | : number of valid dimensions (input) |
NOTE: The boxes returned in the box lists have the index type specified by iType along valid dimensions and are NODE centered for higher dimensions
References assert, getSiblings(), isValidBoxForType(), and NULL.
int ParentChildSiblingInfo::getSiblingGhostBoxes | ( | intSerialArray & | gridIndices, |
BoxList & | siblingBoxes, | ||
BoxList & | ghostBoxesOnCurrentGrid, | ||
const Range & | ghostLines, | ||
const GridCollection & | gc, | ||
const int | currentGridIndex, | ||
const IndexType & | iType | ||
) |
returns a list of sibling ghost boxes and the indices of the grids on which these boxes exist
Given a range of bounding ghost lines (which can include the boundary) and a desired centering along each axis this routine returns a list of boxes that represent the index space on sibling MappedGrids that lie over the specified ghost region of the current grid indexed by currentGridIndex, a list of boxes representing the index space on the current grid lying under the sibling boxes, and an intSerialArray of grid indices of the respective siblings in gc. An integer return value specifies the number of boxes if any.
gridIndices,: | list of indices of sibling MappedGrids in the adaptive GridCollection (output) |
siblingBoxes,: | list of Boxes representing index space on sibling overlapped by ghost region of MappedGrid corresponding to this object that lies between the ghost lines specified by the Range object ghostLines(output) |
ghostBoxesOnCurrentGrid | list of Boxes representing index space in ghost region of current grid that corresponds to siblingBoxes (output) |
ghostLines,: | Range of ghost lines, 0 corresponding to the boundary, 1 being the first ghost line etc (input) |
gc | : adaptive GridCollection(input) |
currentGridIndex,: | grid number of the current grid into gc (input) |
iType | : desired index type along each direction, only valid dimensions are considered, rest assumed to be NODE centered (input) |
NOTE: The boxes returned in the box lists have the index type specified by iType along valid dimensions and are NODE centered for higher dimensions
References assert, getGhostRegionBoxes(), getSiblings(), isValidBoxForType(), NULL, and GridCollection::numberOfDimensions().
Referenced by getParentGhostBoxes(), and InterpolateRefinements::interpolateRefinementBoundaries().
|
inline |
return list of siblings from letter (rcData)
References assert, ParentChildSiblingInfoData::getSiblings(), NULL, and rcData.
Referenced by getSiblingBoxes(), getSiblingGhostBoxes(), and operator<<().
|
static |
returns true if the box is valid for the given IndexType
mainly internal use
Referenced by getChildBoxes(), getParentBoxes(), getParentGhostBoxes(), getSiblingBoxes(), and getSiblingGhostBoxes().
ParentChildSiblingInfo & ParentChildSiblingInfo::operator= | ( | const ParentChildSiblingInfo & | x | ) |
assignment operator
References ParentChildSiblingInfoData::getClassName(), and rcData.
|
virtual |
write to a database
References ParentChildSiblingInfoData::put(), and rcData.
void ParentChildSiblingInfo::reference | ( | const ParentChildSiblingInfo & | x | ) |
make a reference or a shallow copy
sets the rcData pointer to point to the ParentChildSiblingInfoData that x->rcData points at and increments the reference count for the ParentChildSiblingInfoData object
References ReferenceCounting::decrementReferenceCount(), ReferenceCounting::incrementReferenceCount(), NULL, rcData, and ReferenceCounting::reference().
void ParentChildSiblingInfo::reference | ( | ParentChildSiblingInfoData & | x | ) |
reference a ParentChildSiblingInfoData object
sets the rcData pointer to the ParentChildSiblingInfoData object x, incrementing its reference count
References ReferenceCounting::decrementReferenceCount(), ReferenceCounting::incrementReferenceCount(), NULL, and rcData.
|
friend |
RCData* ParentChildSiblingInfo::rcData |
Referenced by breakReference(), consistencyCheck(), getChildren(), getParents(), getSiblings(), operator=(), ParentChildSiblingInfo(), put(), reference(), and ~ParentChildSiblingInfo().