SAMRAI::hier::PatchGeometry< DIM > Class Template Reference

#include <source/hierarchy/patches/PatchGeometry.h>

Inheritance diagram for SAMRAI::hier::PatchGeometry< DIM >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PatchGeometry (const IntVector< DIM > &ratio_to_level_zero, const tbox::Array< tbox::Array< bool > > &touches_regular_bdry, const tbox::Array< tbox::Array< bool > > &touches_periodic_bdry)
virtual ~PatchGeometry ()
const tbox::Array< BoundaryBox<
DIM > > * 
getPatchBoundaries () const
void setBoundaryBoxesOnPatch (const tbox::Array< BoundaryBox< DIM > > bdry[DIM])
 Set the boundary box arrays for this patch geometry.
const IntVector< DIM > & getRatio () const
bool intersectsPhysicalBoundary () const
const tbox::Array< BoundaryBox<
DIM > > & 
getNodeBoundaries () const
const tbox::Array< BoundaryBox<
DIM > > & 
getEdgeBoundaries () const
const tbox::Array< BoundaryBox<
DIM > > & 
getFaceBoundaries () const
const tbox::Array< BoundaryBox<
DIM > > & 
getCodimensionBoundaries (const int codim) const
void setCodimensionBoundaries (const tbox::Array< BoundaryBox< DIM > > &bdry_boxes, const int codim)
const tbox::Array< BoundaryBox<
DIM > > * 
getPatchBoundary () const
const tbox::Array< BoundaryBox<
DIM > > & 
getNodeBoundary () const
const tbox::Array< BoundaryBox<
DIM > > & 
getEdgeBoundary () const
const tbox::Array< BoundaryBox<
DIM > > & 
getFaceBoundary () const
const tbox::Array< BoundaryBox<
DIM > > & 
getCodimensionBoundary (const int codim) const
void setCodimensionBoundary (const tbox::Array< BoundaryBox< DIM > > &bdry_boxes, const int codim)
Box< DIM > getBoundaryFillBox (const BoundaryBox< DIM > &bbox, const Box< DIM > &patch_box, const IntVector< DIM > &gcw) const
 Compute a box outside a physical domain that needs to be filled.
bool getTouchesRegularBoundary () const
 Query whether patch touches a regular boundary.
bool getTouchesPeriodicBoundary () const
 Query whether patch touches a regular boundary.
bool getTouchesRegularBoundary (int axis, int upperlower) const
 Query whether patch touches a specific regular boundary.
bool getTouchesPeriodicBoundary (int axis, int upperlower) const
 Query whether patch touches a specific regular boundary.
virtual void printClassData (std::ostream &stream) const

Detailed Description

template<int DIM>
class SAMRAI::hier::PatchGeometry< DIM >

Class PatchGeometry is the base class for geometry classes that manage index space and mesh increment information on individual patches. Patch geometry information is used for setting boundary conditions in ghost cells and is used in the inter-level transfer operators for refining or coarsening data between two patches associated with different index spaces. The boundary information for patches is actually computed by the GridGeometry class.

See also:
hier::BoundaryBox

hier::GridGeometry


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::hier::PatchGeometry< DIM >::PatchGeometry ( const IntVector< DIM > &  ratio_to_level_zero,
const tbox::Array< tbox::Array< bool > > &  touches_regular_bdry,
const tbox::Array< tbox::Array< bool > > &  touches_periodic_bdry 
)

The default constructor for the patch geometry base class.

template<int DIM>
SAMRAI::hier::PatchGeometry< DIM >::~PatchGeometry (  )  [virtual]

The virtual destructor for the patch geometry base class.


Member Function Documentation

template<int DIM>
const tbox::Array< BoundaryBox< DIM > > * SAMRAI::hier::PatchGeometry< DIM >::getPatchBoundaries (  )  const [inline]

Return const reference to patch boundary information.

template<int DIM>
void SAMRAI::hier::PatchGeometry< DIM >::setBoundaryBoxesOnPatch ( const tbox::Array< BoundaryBox< DIM > >  bdry[DIM]  ) 

Set the boundary box arrays for this patch geometry.

An array of length DIM of tbox::Array< BoundaryBox<DIM> > is passed in to be stored as the boundary boxes for this patch geometry.

Parameters:
bdry The array of BoundaryBox arrays.

template<int DIM>
const IntVector< DIM > & SAMRAI::hier::PatchGeometry< DIM >::getRatio (  )  const [inline]

Return const reference to ratio to level zero index space.

template<int DIM>
bool SAMRAI::hier::PatchGeometry< DIM >::intersectsPhysicalBoundary (  )  const [inline]

Return a boolean value indicating whether the patch boundary intersects the physical domain boundary in a non-periodic direction. In other words, the return value is true when the patch has non-empty boundary boxes that lie outside the physical domain. Otherwise, the return value is false. Note that when a patch touches the "boundary" of the physical domain in a periodic direction, there are no boundary boxes to fill; the data is filled from the proper region of the domain interior in the periodic direction.

template<int DIM>
const tbox::Array< BoundaryBox< DIM > > & SAMRAI::hier::PatchGeometry< DIM >::getNodeBoundaries (  )  const [inline]

Return array of boundary box components for patch each of which intersects the patch at a single point (i.e., 0-dim intersection between cells in patch and cells in boundary box).

template<int DIM>
const tbox::Array< BoundaryBox< DIM > > & SAMRAI::hier::PatchGeometry< DIM >::getEdgeBoundaries (  )  const [inline]

Return array of boundary box components for patch each of which intersects the patch along a 1-dim edge (i.e., 1-dim intersection between cells in patch and cells in boundary box).

When assertion checking is active, this routine throws an assertion when DIM < 2.

template<int DIM>
const tbox::Array< BoundaryBox< DIM > > & SAMRAI::hier::PatchGeometry< DIM >::getFaceBoundaries (  )  const [inline]

Return array of boundary box components for patch each of which intersects the patch along a 2-dim face (i.e., 2-dim intersection between cells in patch and cells in boundary box).

When assertion checking is active, this routine throws an assertion when DIM < 3.

template<int DIM>
const tbox::Array< BoundaryBox< DIM > > & SAMRAI::hier::PatchGeometry< DIM >::getCodimensionBoundaries ( const int  codim  )  const [inline]

Return array of boundary box components for patch each of which intersects the patch as a (DIM - codim)-dimensional object. That is,

if DIM == 1: (codim == 1) => same components as getNodeBoundaries.

if DIM == 2, (codim == 1) => same components as getEdgeBoundaries. (codim == 2) => same components as getNodeBoundaries.

if DIM == 3, (codim == 1) => same components as getFaceBoundaries. (codim == 2) => same components as getEdgeBoundaries. (codim == 3) => same components as getNodeBoundaries.

When assertion checking is active, this routine throws an assertion when codim < 0 or codim > DIM.

template<int DIM>
void SAMRAI::hier::PatchGeometry< DIM >::setCodimensionBoundaries ( const tbox::Array< BoundaryBox< DIM > > &  bdry_boxes,
const int  codim 
)

Set the array of boundary box components of the given codimension for a patch.

template<int DIM>
const tbox::Array< BoundaryBox< DIM > > * SAMRAI::hier::PatchGeometry< DIM >::getPatchBoundary (  )  const [inline]

template<int DIM>
const tbox::Array< BoundaryBox< DIM > > & SAMRAI::hier::PatchGeometry< DIM >::getNodeBoundary (  )  const [inline]

template<int DIM>
const tbox::Array< BoundaryBox< DIM > > & SAMRAI::hier::PatchGeometry< DIM >::getEdgeBoundary (  )  const [inline]

template<int DIM>
const tbox::Array< BoundaryBox< DIM > > & SAMRAI::hier::PatchGeometry< DIM >::getFaceBoundary (  )  const [inline]

template<int DIM>
const tbox::Array< BoundaryBox< DIM > > & SAMRAI::hier::PatchGeometry< DIM >::getCodimensionBoundary ( const int  codim  )  const [inline]

template<int DIM>
void SAMRAI::hier::PatchGeometry< DIM >::setCodimensionBoundary ( const tbox::Array< BoundaryBox< DIM > > &  bdry_boxes,
const int  codim 
)

template<int DIM>
Box< DIM > SAMRAI::hier::PatchGeometry< DIM >::getBoundaryFillBox ( const BoundaryBox< DIM > &  bbox,
const Box< DIM > &  patch_box,
const IntVector< DIM > &  gcw 
) const

Compute a box outside a physical domain that needs to be filled.

The patch box will be grown by the given ghost cell width and then intersected with the boundary box. The resulting intersection will be grown to the needed ghost cell width in the direction normal to the boundary.

Parameters:
bbox BoundaryBox representing location and type of boundary
patch_box The box for the patch where data is being filled
gcw ghost cell width to fill

template<int DIM>
bool SAMRAI::hier::PatchGeometry< DIM >::getTouchesRegularBoundary (  )  const [inline]

Query whether patch touches a regular boundary.

Returns true if the Patch touches any non-periodic physical boundary

template<int DIM>
bool SAMRAI::hier::PatchGeometry< DIM >::getTouchesPeriodicBoundary (  )  const [inline]

Query whether patch touches a regular boundary.

Returns true if the Patch touches any periodic boundary

template<int DIM>
bool SAMRAI::hier::PatchGeometry< DIM >::getTouchesRegularBoundary ( int  axis,
int  upperlower 
) const [inline]

Query whether patch touches a specific regular boundary.

Returns true if the Patch touches a non-periodic physical boundary on the side of the Patch specified in the argument list. The side is specified by an axis direction and a flag specified the upper or lower side.

Parameters:
axis Axis direction normal to the side being checked
upperlower Flag should be 0 if checking the lower side in the axis direction, or 1 if checking the upper side.

template<int DIM>
bool SAMRAI::hier::PatchGeometry< DIM >::getTouchesPeriodicBoundary ( int  axis,
int  upperlower 
) const [inline]

Query whether patch touches a specific regular boundary.

Returns true if the Patch touches a periodic boundary on the side of the Patch specified in the argument list. The side is specified by an axis direction and a flag specified the upper or lower side.

Parameters:
axis Axis direction normal to the side being checked
upperlower Flag should be 0 if checking the lower side in the axis direction, or 1 if checking the upper side.

template<int DIM>
void SAMRAI::hier::PatchGeometry< DIM >::printClassData ( std::ostream &  stream  )  const [virtual]

Print object data to the specified output stream.

Reimplemented in SAMRAI::geom::CartesianPatchGeometry< DIM >, SAMRAI::geom::BlockPatchGeometry< DIM >, and SAMRAI::geom::SkeletonPatchGeometry< DIM >.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:28:29 2009 for SAMRAI by  doxygen 1.5.1