Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SAMRAI::pdat::OuteredgeGeometry< DIM > Class Template Reference

#include <source/patchdata/boxgeometry/OuteredgeGeometry.h>

Inheritance diagram for SAMRAI::pdat::OuteredgeGeometry< DIM >:

Inheritance graph
[legend]
List of all members.

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)

Detailed Description

template<int DIM>
class SAMRAI::pdat::OuteredgeGeometry< DIM >

Class OuteredgeGeometry<DIM> manages the mapping between the AMR index space and the outeredge-centered geometry index space. It is a subclass of hier::BoxGeometry and it computes intersections between outeredge- centered box geometries. Outeredge data resides only on the outer edges of the patch.

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.

See also:
hier::BoxGeometry

pdat::OuteredgeOverlap


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::pdat::OuteredgeGeometry< DIM >::OuteredgeGeometry const hier::Box< DIM > &  box,
const hier::IntVector< DIM > &  ghosts
 

Construct the edge geometry object given the box and ghost cell width.

template<int DIM>
SAMRAI::pdat::OuteredgeGeometry< DIM >::~OuteredgeGeometry  )  [virtual]
 

The virtual destructor does nothing interesting.


Member Function Documentation

template<int DIM>
tbox::Pointer< hier::BoxOverlap< DIM > > SAMRAI::pdat::OuteredgeGeometry< 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 [virtual]
 

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().

template<int DIM>
const hier::Box< DIM > & SAMRAI::pdat::OuteredgeGeometry< DIM >::getBox  )  const [inline]
 

Return the box extents for this edge centered box geometry object.

template<int DIM>
const hier::IntVector< DIM > & SAMRAI::pdat::OuteredgeGeometry< DIM >::getGhosts  )  const [inline]
 

Return the ghost cell width for this edge centered box geometry object.

template<int DIM>
void SAMRAI::pdat::OuteredgeGeometry< DIM >::trimBoxes hier::Box< DIM > &  boxlo,
hier::Box< DIM > &  boxup,
const int  axis,
const int  face_nrml
[static]
 

Trim databoxes in particular axis, face_nrml directions to avoid duplicating data on common outer edges.


The documentation for this class was generated from the following files:
Generated on Fri Dec 2 11:29:30 2005 for SAMRAI by  doxygen 1.4.2