#include <source/patchdata/outeredge/OuteredgeData.h>
Inheritance diagram for SAMRAI::pdat::OuteredgeData< DIM, TYPE >:
Public Member Functions | |
OuteredgeData (const hier::Box< DIM > &box, const int depth, tbox::Pointer< tbox::Arena > pool=tbox::Pointer< tbox::Arena >(NULL)) | |
Constructor for an outeredge data object. | |
virtual | ~OuteredgeData () |
Virtual destructor for a outeredge data object. | |
virtual void | copy (const hier::PatchData< DIM > &src) |
A fast copy between the source and destination (i.e., this) patch data objects. | |
virtual void | copy2 (hier::PatchData< DIM > &dst) const |
A fast copy between the source and destination. | |
virtual void | copy (const hier::PatchData< DIM > &src, const hier::BoxOverlap< DIM > &overlap) |
Copy data from the source into the destination using the designated overlap descriptor. | |
virtual void | copy2 (hier::PatchData< DIM > &dst, const hier::BoxOverlap< DIM > &overlap) const |
Copy data from the source into the destination using the designated overlap descriptor. | |
void | copyDepth (int dst_depth, const EdgeData< DIM, TYPE > &src, int src_depth) |
Fast copy between the source and destination at the specified depths. | |
virtual bool | canEstimateStreamSizeFromBox () const |
Determines whether the patch data subclass can estinate the necessary stream size using only index space information. | |
virtual int | getDataStreamSize (const hier::BoxOverlap< DIM > &overlap) const |
Calculate the number of bytes needed to stream the data lying in the specified box domain. | |
virtual void | packStream (tbox::AbstractStream &stream, const hier::BoxOverlap< DIM > &overlap) const |
Pack data lying on the specified index set into the output stream. | |
virtual void | unpackStream (tbox::AbstractStream &stream, const hier::BoxOverlap< DIM > &overlap) |
Unpack data from the message stream into the specified index set. | |
int | getDepth () const |
Return the depth (e.g., the number of components in each spatial location) of the array. | |
bool | dataExists (int axis, int face_nrml) const |
Returns whether outeredges exists for the face normal to a given axis. | |
TYPE * | getPointer (const int axis, const int face_nrml, const int s, const int d=0) |
Get a pointer to the beginning of a particular component of the outeredge centered array. | |
const TYPE * | getPointer (int axis, int face_nrml, int s, int d=0) const |
Get a const pointer to the beginning of a particular component of the outeredge centered array. | |
ArrayData< DIM, TYPE > & | getArrayData (int axis, int face_nrml, int s) |
Get a pointer to the array data object of a particular component of the outeredge centered array. | |
const ArrayData< DIM, TYPE > & | getArrayData (int axis, int face_nrml, int s) const |
Get a const pointer to the array data object of a particular component of the outeredge centered array. | |
TYPE & | operator() (const EdgeIndex< DIM > &i, int axis, int depth=0) |
Index<DIM> into the outeredge data array using a edge index. | |
const TYPE & | operator() (const EdgeIndex< DIM > &i, int axis, int depth=0) const |
Index<DIM> into the outeredge data array (via a const reference) using a edge index. | |
hier::Box< DIM > | getDataBox (int axis, int face_nrml, int s) |
void | fill (const TYPE &t, const int d=0) |
Fill all values of component depth d with the value t. | |
void | fill (const TYPE &t, const hier::Box< DIM > &box, const int d=0) |
Fill all values of component depth d within the box with the value t. | |
void | fillAll (const TYPE &t) |
Fill all components with value t. | |
void | fillAll (const TYPE &t, const hier::Box< DIM > &box) |
Fill all components within the box with value t. | |
void | print (const hier::Box< DIM > &box, ostream &os=tbox::plog, int prec=-1) const |
Print all outeredge data residing in the specified box. | |
void | print (const hier::Box< DIM > &box, int d, ostream &os=tbox::plog, int prec=-1) const |
Print the specified component of the outeredge data residing in the specified box. | |
void | printAxisSide (int axis, int face_nrml, int s, const hier::Box< DIM > &box, ostream &os=tbox::plog, int prec=-1) const |
Print all outeredge centered data for specified (axis,face_nrml) index residing in the specified box and side. | |
void | printAxisSide (int axis, int face_nrml, int s, const hier::Box< DIM > &box, int d, ostream &os=tbox::plog, int prec=-1) const |
Print all outeredge centered data for specified (axis,face_nrml) index residing in the specified box and side. | |
virtual void | getSpecializedFromDatabase (tbox::Pointer< tbox::Database > database) |
Check that class version and restart file version are equal. If so, read data members from the database. | |
virtual void | putSpecializedToDatabase (tbox::Pointer< tbox::Database > database) |
Write out the class version number and other data members to the database. | |
Static Public Member Functions | |
static size_t | getSizeOfData (const hier::Box< DIM > &box, const int depth) |
Calculate the amount of memory needed to represent the data in an outeredge centered grid. |
It is templated on TYPE with a specified depth (that is, number of components for each spatial location). See the edge geometry and patch data classes for more information about the translation between the AMR index space and edge-centered data.
Outeredge data is stored in DIM*DIM*2 arrays, containing the data for the patch boundary sides with each of the possible outward pointing normal directions. Where an outeredge falls on more than one side (patch edges and corners), the outeredge belongs to the array associated with the higher dimensional direction. In each of these arrays, memory allocation is in column-major ordering (e.g., Fortran style) so that the leftmost index runs fastest in memory.
The outeredge data is related to the edge data in the following way:
Outeredge box(axis,face_nrml,s) = EdgeData<DIM>.getBox(axis)
where "axis" corresponds to the box of the standard edge datatype, "face_nrml" is the normal face direction, and "s" indicates the upper or lower face. Note that when edge_dir = face_dir, there are no outside edges so the data is NULL.
A three-dimensional outeredge data object instantiated with a box [l0:u0,l1:u1,l2:u2] allocates 12 data (i.e., 3x2 pairs) arrays dimensioned as:
* * a = edge axis * f = face normal dir * s = lower/upper face * * (a,f,s) * 0: (0,0,[0,1]) NULL * (0,1,[0,1]) [l0:u0,l1:l1,l2+1:u2,d], [l0:u0,u1:u1,l2+1:u2,d] * (0,2,[0,1]) [l0:u0,l1:u1+1,l2:l2,d], [l0:u0,l1:u1+1,u2:u2,d] * note: trimmed in 2, not trimmed in 1 * * 1: (1,0,[0,1]) [l0:l0,l1:u1,l2+1:u2,d], [u0:u0,l1:u1,l2+1:u2,d] * (1,1,[0,1]) NULL * (1,2,[0,1]) [l0:u0+1,l1:u1,l2:l2,d], [l0:u0+1,l1:u1,u2:u2,d] * note: trimmed in 2, not trimmed in 0 * * 2: (2,0,[0,1]) [l0:l0,l1+1:u1,l2:u2,d], [u0:u0,l1+1:u1,l2:u2,d] * (2,1,[0,1]) [l0:u0+1,l1:l1,l2:u2,d], [l0:u0+1,u1:u1,l2:u2,d] * (2,2,[0,1]) NULL * note: trimmed in 1, not trimmed in 0 * *
The data type TYPE must define a default constructor (that takes no arguments) and also the assignment operator.
hier::PatchData<DIM>
OuteredgeDataFactory<DIM>
OuteredgeIndex<DIM>
EdgeIterator<DIM>
OuteredgeGeometry<DIM>
|
Constructor for an outeredge data object.
|
|
Virtual destructor for a outeredge data object.
|
|
A fast copy between the source and destination (i.e., this) patch data objects. Data is copied where there is overlap in the underlying index space. The copy is performed on the interior plus the ghost cell width (for both the source and destination). Currently, source data must be EdgeData<DIM>. If copy() does not understand the source object type, then copy2() is called. |
|
A fast copy between the source and destination. Member function copy2() is similar to copy() except that the location of source and destination are reversed and copy2() throws an exception (aka dumps core) if it does not understand the type of the argument. Currently, the destination data must be EdgeData<DIM>. |
|
Copy data from the source into the destination using the designated overlap descriptor. The overlap description will have been computed using the appropriate box geometry objects. If copy() does not understand the source object type, then copy2() is called. Currently, this function does nothing since copying to Outeredge from Outeredge is not defined on all box overlap configurations. |
|
Copy data from the source into the destination using the designated overlap descriptor. Member function copy2() is similar to the copy() member function except that the location of source and destination are reversed and copy2() throws an exception (aka dumps core) if it does not understand the type of the argument. Currently, the destination data must be EdgeData<DIM>. |
|
Fast copy between the source and destination at the specified depths. Data is copied from the source into the destination where there is overlap in the underlying index space. The copy is performed on the interior plus the ghost cell width (for both the source and destination). |
|
Determines whether the patch data subclass can estinate the necessary stream size using only index space information. This routine is defined for the standard built-in types (bool, char, double, float, and int). Implements SAMRAI::hier::PatchData< DIM >. |
|
Calculate the number of bytes needed to stream the data lying in the specified box domain. This routine is defined for the standard built-in types (bool, char, double, float, and int). |
|
Pack data lying on the specified index set into the output stream.
|
|
Unpack data from the message stream into the specified index set.
|
|
Return the depth (e.g., the number of components in each spatial location) of the array.
|
|
Returns whether outeredges exists for the face normal to a given axis. The "axis" and "face_nrml" arguments correspond to the edge axis and face normal, as discussed above. |
|
Get a pointer to the beginning of a particular component of the outeredge centered array. The "axis" and "face_nrml" arguments specify the X=0, Y=1, or Z=2 axis and "s" specifies the lower=0 or upper=1 side. See class description for the size of the array returned. |
|
Get a const pointer to the beginning of a particular component of the outeredge centered array. The "axis" and "face_nrml" arguments specify the X=0, Y=1, or Z=2 axis and "s" specifies the lower=0 or upper=1 side. See class description for the size of the array returned. |
|
Get a pointer to the array data object of a particular component of the outeredge centered array. The "axis" and "face_nrml" arguments specify the X=0, Y=1, or Z=2 axis and "s" specifies the lower=0 or upper=1 side. |
|
Get a const pointer to the array data object of a particular component of the outeredge centered array. The "axis" and "face_nrml" arguments specify the X=0, Y=1, or Z=2 axis and "s" specifies the lower=0 or upper=1 side. |
|
Index<DIM> into the outeredge data array using a edge index. The index MUST be an index on the outeredge of the box. |
|
Index<DIM> into the outeredge data array (via a const reference) using a edge index. The index MUST be an index on the outeredge of the box. |
|
|
|
Fill all values of component depth d with the value t.
|
|
Fill all values of component depth d within the box with the value t.
|
|
Fill all components with value t.
|
|
Fill all components within the box with value t.
|
|
Calculate the amount of memory needed to represent the data in an outeredge centered grid. This function assumes that the amount of memory needed for TYPE is sizeof(TYPE). If this is not the case, then a specialized function must be defined. |
|
Print all outeredge data residing in the specified box. If the depth of the array is greater than one, all components are printed. Precision of floating point numbers (i.e., TYPE = float, double, or dcomplex) can be specified using the provided argument. The default is 12 decimal places for double and complex floating point numbers, and the default is 6 decimal places floats. For other types, this is ignored. |
|
Print the specified component of the outeredge data residing in the specified box. Precision of floating point numbers (i.e., TYPE = float, double, or dcomplex) can be specified using the provided argument. The default is 12 decimal places for double and complex floating point numbers, and the default is 6 decimal places floats. For other types, this is ignored. |
|
Print all outeredge centered data for specified (axis,face_nrml) index residing in the specified box and side. If the depth of the data is greater than one, then all components are printed. Precision of floating point numbers (i.e., TYPE = float, double, or dcomplex) can be specified using the provided argument. The default is 12 decimal places for double and complex floating point numbers, and the default is 6 decimal places floats. For other types, this is ignored. |
|
Print all outeredge centered data for specified (axis,face_nrml) index residing in the specified box and side. If the depth of the data is greater than one, then all components are printed. Precision of floating point numbers (i.e., TYPE = float, double, or dcomplex) can be specified using the provided argument. The default is 12 decimal places for double and complex floating point numbers, and the default is 6 decimal places floats. For other types, this is ignored. |
|
Check that class version and restart file version are equal. If so, read data members from the database. Assertions: database must be a non-null pointer. Implements SAMRAI::hier::PatchData< DIM >. |
|
Write out the class version number and other data members to the database. Assertions: database must be a non-null pointer. Implements SAMRAI::hier::PatchData< DIM >. |