#include <source/patchdata/boxgeometry/OuteredgeGeometry.h>
Inheritance diagram for SAMRAI::pdat::OuteredgeGeometry< DIM >:
Public Member Functions | |
OuteredgeGeometry (const hier::Box< DIM > &box, const hier::IntVector< DIM > &ghosts) | |
virtual | ~OuteredgeGeometry () |
virtual tbox::Pointer< hier::BoxOverlap< DIM > > | calculateOverlap (const hier::BoxGeometry< DIM > &dst_geometry, const hier::BoxGeometry< DIM > &src_geometry, const hier::Box< DIM > &src_mask, const bool overwrite_interior, const hier::IntVector< DIM > &src_offset, const bool retry) const |
const hier::Box< DIM > & | getBox () const |
const hier::IntVector< DIM > & | getGhosts () const |
Static Public Member Functions | |
static void | trimBoxes (hier::Box< DIM > &boxlo, hier::Box< DIM > &boxup, const int axis, const int face_nrml) |
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 * *
where 0, 1, and 2 can be thought of as X, Y, Z respectively, and d is the depth of the data. One- and two-dimensional edge data arrays are managed similary. The "a" dimension corresponds with the "axis" of standard EdgeData<DIM>.
Note that the intersection between two outeredge-centered boxes can be complicated, since edge geometries contain indices on the edges of boxes. Thus, there may be overlap between two boxes, even though the boxes do not intersect in the AMR index space.
pdat::OuteredgeOverlap
|
Construct the edge geometry object given the box and ghost cell width. |
|
The virtual destructor does nothing interesting. |
|
Compute the overlap in index space between the source edge box geometry object and the destination box geometry. Refer to the box geometry class for a detailed description of calculateOverlap(). |
|
Return the box extents for this edge centered box geometry object. |
|
Return the ghost cell width for this edge centered box geometry object. |
|
Trim databoxes in particular axis, face_nrml directions to avoid duplicating data on common outer edges. |