#include <source/hierarchy/patches/BoundaryBoxUtils.h>
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. |
SAMRAI::hier::BoundaryBoxUtils< DIM >::BoundaryBoxUtils | ( | ) |
SAMRAI::hier::BoundaryBoxUtils< DIM >::BoundaryBoxUtils | ( | const BoundaryBox< DIM > & | bbox | ) |
SAMRAI::hier::BoundaryBoxUtils< DIM >::~BoundaryBoxUtils | ( | ) | [virtual] |
void SAMRAI::hier::BoundaryBoxUtils< DIM >::setBoundaryBox | ( | const BoundaryBox< DIM > & | bbox | ) |
Set boundary box.
All utility operations refer to this box.
const BoundaryBox< DIM > & SAMRAI::hier::BoundaryBoxUtils< DIM >::getBoundaryBox | ( | ) | const |
Get boundary box.
All utility operations refer to this box.
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:
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.
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.
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.
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.
limit_box | Box to not stick past |
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.