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

Perform shifts, extensions, etc on a BoundaryBox using the box's location index and type. More...

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

List of all members.

Public Member Functions

 BoundaryBoxUtils ()
 BoundaryBoxUtils (const BoundaryBox< DIM > &bbox)
 Construct with a boundary box.
virtual ~BoundaryBoxUtils ()
void setBoundaryBox (const BoundaryBox< DIM > &bbox)
 Set boundary box.
const BoundaryBox< DIM > & getBoundaryBox () const
 Get boundary box.
const IntVector< DIM > & getOutwardShift () const
 Get the outward direction in logical space.
void stretchBoxToGhostWidth (Box< DIM > &box, const hier::IntVector< DIM > &gcw) const
 Stretch box outward by the given ghost cell width.
void extendBoxOutward (Box< DIM > &box, const IntVector< DIM > &extension) const
 Extend box outward by the given amount.
int normalDir () const
 Return the normal direction.
hier::BoundaryBox< DIM > trimBoundaryBox (const hier::Box< DIM > &limit_box) const
 Trim a boundary box so that it does not stick out past a limiting box in direction transverse to the boundary normal.
hier::Box< DIM > getSurfaceBoxFromBoundaryBox () const
 Return box describing the index space of the outer surface of a boundary box.


Detailed Description

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

Perform shifts, extensions, etc on a BoundaryBox using the box's location index and type.

See also:
hier::BoundaryBox


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::hier::BoundaryBoxUtils< DIM >::BoundaryBoxUtils (  ) 

template<int DIM>
SAMRAI::hier::BoundaryBoxUtils< DIM >::BoundaryBoxUtils ( const BoundaryBox< DIM > &  bbox  ) 

Construct with a boundary box.

See also:
setBoundaryBox()

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


Member Function Documentation

template<int DIM>
void SAMRAI::hier::BoundaryBoxUtils< DIM >::setBoundaryBox ( const BoundaryBox< DIM > &  bbox  ) 

Set boundary box.

All utility operations refer to this box.

template<int DIM>
const BoundaryBox< DIM > & SAMRAI::hier::BoundaryBoxUtils< DIM >::getBoundaryBox (  )  const

Get boundary box.

All utility operations refer to this box.

template<int DIM>
const IntVector< DIM > & SAMRAI::hier::BoundaryBoxUtils< DIM >::getOutwardShift (  )  const

Get the outward direction in logical space.

Each component of the outward direction will have one of these values:

template<int DIM>
void SAMRAI::hier::BoundaryBoxUtils< DIM >::stretchBoxToGhostWidth ( Box< DIM > &  box,
const hier::IntVector< DIM > &  gcw 
) const

Stretch box outward by the given ghost cell width.

The number of direction affected is the same as the codimension of the boundary.

Note that the BoundaryBox is defined to be one cell wide. The output of this method is the BoundaryBox, stretched to cover the given ghost cell width. This means that if gcw is one, the output is identical to the BoundaryBox. If the gcw is zero in any direction, the output will shrink to nothing in that direction.

Return the stretched box.

template<int DIM>
void SAMRAI::hier::BoundaryBoxUtils< DIM >::extendBoxOutward ( Box< DIM > &  box,
const IntVector< DIM > &  extension 
) const

Extend box outward by the given amount.

The number of directions extended is the same as the codimension of the boundary.

Return the extended box.

template<int DIM>
int SAMRAI::hier::BoundaryBoxUtils< DIM >::normalDir (  )  const

Return the normal direction.

The normal direction is defined only for surface boundaries (codimension 1). A -1 is returned for all other boundary types.

template<int DIM>
hier::BoundaryBox< DIM > SAMRAI::hier::BoundaryBoxUtils< DIM >::trimBoundaryBox ( const hier::Box< DIM > &  limit_box  )  const

Trim a boundary box so that it does not stick out past a limiting box in direction transverse to the boundary normal.

This method affects the only box dimensions parallel to the boundary. For methods affecting other box dimensions, see stretchBoxToGhostWidth().

The boundary type of the BoundaryBox that was given to the BoundaryBoxUtils constructor must be less than DIM.

Parameters:
limit_box Box to not stick past
Returns:
New trimmed boundary box.

template<int DIM>
hier::Box< DIM > SAMRAI::hier::BoundaryBoxUtils< DIM >::getSurfaceBoxFromBoundaryBox (  )  const

Return box describing the index space of the outer surface of a boundary box.

Define a box describing the indices of the surface of the the input boundary box. A surface is a face in 3D and an edge in 2D. These surfaces lie on the boundary itself.

The input boundary_box must be of type 1 (see hier::BoundaryBox::getBoundaryType()).

This is a utility function for working with the surface indices coresponding to a boundary box.

Returns:
a box to define the face indices corresponding to boundary_box


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