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

#include <ibtk/PartitioningBox.h>

Inheritance diagram for SAMRAI::geom::CartesianPatchGeometry< DIM >:
Inheritance graph
[legend]

Public Member Functions

 CartesianPatchGeometry (const hier::IntVector< DIM > &ratio_to_level_zero, const tbox::Array< tbox::Array< bool > > &touches_regular_bdry, const tbox::Array< tbox::Array< bool > > &touches_periodic_bdry, const double *dx, const double *x_lo, const double *x_hi)
 
 ~CartesianPatchGeometry ()
 
const doublegetDx () const
 
const doublegetXLower () const
 
const doublegetXUpper () const
 
virtual void printClassData (std::ostream &os) const
 
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. More...
 
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)
 
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. More...
 
bool getTouchesRegularBoundary () const
 Query whether patch touches a regular boundary. More...
 
bool getTouchesRegularBoundary (int axis, int upperlower) const
 Query whether patch touches a specific regular boundary. More...
 
bool getTouchesPeriodicBoundary () const
 Query whether patch touches a regular boundary. More...
 
bool getTouchesPeriodicBoundary (int axis, int upperlower) const
 Query whether patch touches a specific regular boundary. More...
 

Private Member Functions

 CartesianPatchGeometry (const CartesianPatchGeometry< DIM > &)
 
void operator= (const CartesianPatchGeometry< DIM > &)
 

Private Attributes

double d_dx [DIM]
 
double d_x_lo [DIM]
 
double d_x_up [DIM]
 
bool d_has_regular_boundary
 
bool d_has_periodic_boundary
 
IntVector< DIM > d_ratio_to_level_zero
 
tbox::Array< BoundaryBox< DIM > > d_patch_boundaries [DIM]
 
bool d_touches_regular_bdry [DIM][2]
 
bool d_touches_periodic_bdry [DIM][2]
 

Detailed Description

template<int DIM>
class SAMRAI::geom::CartesianPatchGeometry< DIM >

Class CartesianPatchGeometry implements simple Cartesian mes geometry management for a single patch in an AMR hierarchy. The geometry is limited to the mesh increments being specified by the DIM-tuple (dx[0],...,dx[DIM-1]) associated with the patch, and the spatial coordinates of the lower and upper corners of the patch within the computational domain. The grid data is set by CartesianGridGeometry<DIM> class. This patch geometry class is derived from hier::PatchGeometry<DIM> base class.

See also
hier::BoundaryBox
hier::PatchGeometry
geom::CartesianGridGeometry

Constructor & Destructor Documentation

◆ CartesianPatchGeometry() [1/2]

template<int DIM>
SAMRAI::geom::CartesianPatchGeometry< DIM >::CartesianPatchGeometry ( const hier::IntVector< DIM > &  ratio_to_level_zero,
const tbox::Array< tbox::Array< bool > > &  touches_regular_bdry,
const tbox::Array< tbox::Array< bool > > &  touches_periodic_bdry,
const double dx,
const double x_lo,
const double x_hi 
)

Constructor for CartesianPatchGeometry class. It simply passes patch boundary information to hier::PatchGeometry base class constructor and allocates storage for spatial coordinates on patch.

◆ ~CartesianPatchGeometry()

Destructor for CartesianPatchGeometry deallocates the storage for spatial coordinates on patch.

◆ CartesianPatchGeometry() [2/2]

template<int DIM>
SAMRAI::geom::CartesianPatchGeometry< DIM >::CartesianPatchGeometry ( const CartesianPatchGeometry< DIM > &  )
private

Member Function Documentation

◆ getDx()

template<int DIM>
const double* SAMRAI::geom::CartesianPatchGeometry< DIM >::getDx ( ) const

Return const pointer to dx array for patch.

◆ getXLower()

template<int DIM>
const double* SAMRAI::geom::CartesianPatchGeometry< DIM >::getXLower ( ) const

Return const pointer to lower spatial coordinate for patch.

◆ getXUpper()

template<int DIM>
const double* SAMRAI::geom::CartesianPatchGeometry< DIM >::getXUpper ( ) const

Return const pointer to upper spatial coordinate for patch.

◆ printClassData()

template<int DIM>
virtual void SAMRAI::geom::CartesianPatchGeometry< DIM >::printClassData ( std::ostream &  os) const
virtual

Print CartesianPatchGeometry class data.

Reimplemented from SAMRAI::hier::PatchGeometry< DIM >.

◆ operator=()

template<int DIM>
void SAMRAI::geom::CartesianPatchGeometry< DIM >::operator= ( const CartesianPatchGeometry< DIM > &  )
private

◆ getPatchBoundaries()

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

Return const reference to patch boundary information.

◆ setBoundaryBoxesOnPatch()

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

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
bdryThe array of BoundaryBox arrays.

◆ getRatio()

template<int DIM>
const IntVector<DIM>& SAMRAI::hier::PatchGeometry< DIM >::getRatio ( ) const
inherited

Return const reference to ratio to level zero index space.

◆ intersectsPhysicalBoundary()

template<int DIM>
bool SAMRAI::hier::PatchGeometry< DIM >::intersectsPhysicalBoundary ( ) const
inherited

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.

◆ getNodeBoundaries()

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

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

◆ getEdgeBoundaries()

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

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.

◆ getFaceBoundaries()

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

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.

◆ getCodimensionBoundaries()

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

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.

◆ setCodimensionBoundaries()

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

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

◆ getBoundaryFillBox()

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

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
bboxBoundaryBox representing location and type of boundary
patch_boxThe box for the patch where data is being filled
gcwghost cell width to fill

◆ getTouchesRegularBoundary() [1/2]

template<int DIM>
bool SAMRAI::hier::PatchGeometry< DIM >::getTouchesRegularBoundary ( ) const
inherited

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

◆ getTouchesRegularBoundary() [2/2]

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

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
axisAxis direction normal to the side being checked
upperlowerFlag should be 0 if checking the lower side in the axis direction, or 1 if checking the upper side.

◆ getTouchesPeriodicBoundary() [1/2]

template<int DIM>
bool SAMRAI::hier::PatchGeometry< DIM >::getTouchesPeriodicBoundary ( ) const
inherited

Returns true if the Patch touches any periodic boundary

◆ getTouchesPeriodicBoundary() [2/2]

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

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
axisAxis direction normal to the side being checked
upperlowerFlag should be 0 if checking the lower side in the axis direction, or 1 if checking the upper side.

Member Data Documentation

◆ d_dx

template<int DIM>
double SAMRAI::geom::CartesianPatchGeometry< DIM >::d_dx[DIM]
private

◆ d_x_lo

template<int DIM>
double SAMRAI::geom::CartesianPatchGeometry< DIM >::d_x_lo[DIM]
private

◆ d_x_up

template<int DIM>
double SAMRAI::geom::CartesianPatchGeometry< DIM >::d_x_up[DIM]
private

◆ d_has_regular_boundary

template<int DIM>
bool SAMRAI::hier::PatchGeometry< DIM >::d_has_regular_boundary
privateinherited

◆ d_has_periodic_boundary

template<int DIM>
bool SAMRAI::hier::PatchGeometry< DIM >::d_has_periodic_boundary
privateinherited

◆ d_ratio_to_level_zero

template<int DIM>
IntVector<DIM> SAMRAI::hier::PatchGeometry< DIM >::d_ratio_to_level_zero
privateinherited

◆ d_patch_boundaries

template<int DIM>
tbox::Array< BoundaryBox<DIM> > SAMRAI::hier::PatchGeometry< DIM >::d_patch_boundaries[DIM]
privateinherited

◆ d_touches_regular_bdry

template<int DIM>
bool SAMRAI::hier::PatchGeometry< DIM >::d_touches_regular_bdry[DIM][2]
privateinherited

◆ d_touches_periodic_bdry

template<int DIM>
bool SAMRAI::hier::PatchGeometry< DIM >::d_touches_periodic_bdry[DIM][2]
privateinherited

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