Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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

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

List of all members.

Public Member Functions

const tbox::Array< int > & getDirections (const int loc, const int codim) const
 Return array of active directions for specific case.
const tbox::Array< int > & getMaxLocationIndices () const
 Returns array containd maximum locations for each codimension.
bool isLower (const int loc, const int codim, const int dim) const
 Determines if boundary is lower boundary.
bool isUpper (const int loc, const int codim, const int index) const
 Determines if boundary is upper boundary.
int mapLocationIndex (const int loc) const
 execute the mapping between original numbering and new scheme

Static Public Member Functions

static BoundaryLookupTable<
DIM > * 
getLookupTable ()
 Return pointer to singleton instance of the boundary lookup table.
static void freeLookupTable ()
 Deallocate the BoundaryLookupTable<DIM> instance.
static void setUsingOriginalLocations (const bool use_original)
 Set the lookup table to return original numbering scheme.

Protected Member Functions

 BoundaryLookupTable ()
 ~BoundaryLookupTable ()


Detailed Description

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

Class BoundaryLookupTable<DIM> is a singleton class that contains a table that organizes all of the possible directions where a physical boundary can exist around a domain. It is used by GridGeometry<DIM> during the construction of boundary boxes and by PatchGeometry<DIM> to determine the box regions that need to be filled during a physical boundary fill.

See also:
hier::BoundaryBox

hier::GridGeometry

hier::PatchGeometry


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::hier::BoundaryLookupTable< DIM >::BoundaryLookupTable  )  [protected]
 

The constructor for BoundaryLookupTable<DIM> is protected. Consistent with the definition of a Singleton class, only the database object has access to the constructor for the class.

The constructor initializes the state of lookup table contents.

template<int DIM>
SAMRAI::hier::BoundaryLookupTable< DIM >::~BoundaryLookupTable  )  [protected]
 

The destructor for BoundaryLookupTable<DIM> is protected. See the comments for the constructor.

The destructor deallocates lookup table contents.


Member Function Documentation

template<int DIM>
BoundaryLookupTable< DIM > * SAMRAI::hier::BoundaryLookupTable< DIM >::getLookupTable  )  [inline, static]
 

Return pointer to singleton instance of the boundary lookup table.

Note that when the database is accessed for the first time, the Singleton instance is registered with the ShutdownRegistry class which destroys such objects at program completion. Thus, users of this class do not explicitly allocate or deallocate the Singleton instance.

Returns:
tbox::Pointer to lookup table instance.

template<int DIM>
void SAMRAI::hier::BoundaryLookupTable< DIM >::freeLookupTable  )  [inline, static]
 

Deallocate the BoundaryLookupTable<DIM> instance.

It is not necessary to call this function at program termination, since it is automatically called by the ShutdownRegistry class.

template<int DIM>
void SAMRAI::hier::BoundaryLookupTable< DIM >::setUsingOriginalLocations const bool  use_original  )  [static]
 

Set the lookup table to return original numbering scheme.

For codimension 2 in 3-dimensional problems, the numbering scheme for the location indices of BoundaryBox has been changed. To use the original numbering scheme for backward compatibility, call this static function with the argument set to true;

Parameters:
use_original bool argument set to true if using original scheme

template<int DIM>
const tbox::Array< int > & SAMRAI::hier::BoundaryLookupTable< DIM >::getDirections const int  loc,
const int  codim
const [inline]
 

Return array of active directions for specific case.

Returns integer array of length codim of the active directions for the boundary of codimension codim indexed by loc.

Parameters:
loc Location index being used
codim Codimension being used

template<int DIM>
const tbox::Array< int > & SAMRAI::hier::BoundaryLookupTable< DIM >::getMaxLocationIndices  )  const [inline]
 

Returns array containd maximum locations for each codimension.

Returns integer array of length DIM of the maximum limits, for each codimension, of the location indicies.

template<int DIM>
bool SAMRAI::hier::BoundaryLookupTable< DIM >::isLower const int  loc,
const int  codim,
const int  dim
const [inline]
 

Determines if boundary is lower boundary.

Returns true if the boundary type of codimension codim indexed by loc is a lower boundary in the specified dimension.

Parameters:
loc Location index of boundary being tested
codim Codimension of boundary being tested
dim dimension identifier

template<int DIM>
bool SAMRAI::hier::BoundaryLookupTable< DIM >::isUpper const int  loc,
const int  codim,
const int  index
const [inline]
 

Determines if boundary is upper boundary.

Returns true if the boundary type of codimension codim indexed by loc is a upper boundary in the specified dimension.

Parameters:
loc Location index of boundary being tested
codim Codimension of boundary being tested
dim dimension identifier

template<int DIM>
int SAMRAI::hier::BoundaryLookupTable< DIM >::mapLocationIndex const int  loc  )  const [inline]
 

execute the mapping between original numbering and new scheme

For codimension 2 in 3 dimensions, maps the value of the argument from the original numbering scheme to the new scheme, or vice versa, and returns the mapped value.

Parameters:
loc location index to be mapped


The documentation for this class was generated from the following files:
Generated on Fri Dec 2 11:24:33 2005 for SAMRAI by  doxygen 1.4.2