IBAMR  IBAMR version 0.19.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SAMRAI::hier::BoundaryBoxUtils< DIM > Class Template Reference

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

#include <BoundaryBoxUtils.h>

Public Member Functions

 BoundaryBoxUtils ()
 
 BoundaryBoxUtils (const BoundaryBox< DIM > &bbox)
 Construct with a boundary box. More...
 
virtual ~BoundaryBoxUtils ()
 
void setBoundaryBox (const BoundaryBox< DIM > &bbox)
 Set boundary box. More...
 
const BoundaryBox< DIM > & getBoundaryBox () const
 Get boundary box. More...
 
const IntVector< DIM > & getOutwardShift () const
 Get the outward direction in logical space. More...
 
void stretchBoxToGhostWidth (Box< DIM > &box, const hier::IntVector< DIM > &gcw) const
 Stretch box outward by the given ghost cell width. More...
 
void extendBoxOutward (Box< DIM > &box, const IntVector< DIM > &extension) const
 Extend box outward by the given amount. More...
 
int normalDir () const
 Return the normal direction. More...
 
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. More...
 
hier::Box< DIM > getSurfaceBoxFromBoundaryBox () const
 Return box describing the index space of the outer surface of a boundary box. More...
 

Private Member Functions

void computeOutwardShift ()
 Compute the shift in the outward direction (redundant data, function of boundary box) and store in d_outward. More...
 

Private Attributes

BoundaryBox< DIM > d_bbox
 Boundary box implicitly referred to by all methods. More...
 
IntVector< DIM > d_outward
 Vector pointing outward from patch. More...
 

Detailed Description

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

See also
hier::BoundaryBox

Constructor & Destructor Documentation

◆ BoundaryBoxUtils() [1/2]

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

◆ BoundaryBoxUtils() [2/2]

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

◆ ~BoundaryBoxUtils()

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

Member Function Documentation

◆ setBoundaryBox()

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

All utility operations refer to this box.

◆ getBoundaryBox()

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

All utility operations refer to this box.

◆ getOutwardShift()

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

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

  • -1 if the outward direction is toward the lower indices
  • 0 for the direction is orthogonal to the outward direction.
  • 1 if the outward direction is toward the higher indices

◆ stretchBoxToGhostWidth()

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

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.

◆ extendBoxOutward()

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

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

Return the extended box.

◆ normalDir()

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

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

◆ trimBoundaryBox()

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

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_boxBox to not stick past
Returns
New trimmed boundary box.

◆ getSurfaceBoxFromBoundaryBox()

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

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

◆ computeOutwardShift()

template<int DIM>
void SAMRAI::hier::BoundaryBoxUtils< DIM >::computeOutwardShift ( )
private

Member Data Documentation

◆ d_bbox

template<int DIM>
BoundaryBox<DIM> SAMRAI::hier::BoundaryBoxUtils< DIM >::d_bbox
private

◆ d_outward

template<int DIM>
IntVector<DIM> SAMRAI::hier::BoundaryBoxUtils< DIM >::d_outward
private

The documentation for this class was generated from the following file: