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

SAMRAI::pdat::SideVariable< DIM, TYPE > Class Template Reference

#include <source/patchdata/side/SideVariable.h>

Inheritance diagram for SAMRAI::pdat::SideVariable< DIM, TYPE >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 SideVariable (const string &name, int depth=1, bool fine_boundary_represents_var=true, int direction=-1)
virtual ~SideVariable ()
const hier::IntVector< DIM > & getDirectionVector () const
bool fineBoundaryRepresentsVariable () const
bool dataLivesOnPatchBorder () const

Detailed Description

template<int DIM, class TYPE>
class SAMRAI::pdat::SideVariable< DIM, TYPE >

Class SideVariable<DIM> is a templated variable class used to define side-centered quantities on an AMR mesh. It is templated on the type of the underlying data (e.g., double, int, bool, etc.). Side variable data is associated with the sides (or faces) of cells. Side data is stored in DIM arrays, each of which holds values for sides having the same normal vector. For example, a three-dimensional side variable can be used to create side-centered data arrays over a box [l0:u0,l1:u1,l2:u2] that can be dimensioned as:
     [ l0 : u0+1 ,
       l1 : u1 ,
       l2 : u2 , d ]   ,

     [ l0 : u0 ,
       l1 : u1+1 ,
       l2 : u2 , d ]   ,

     [ l0 : u0 ,
       l1 : u1 ,
       l2 : u2+1 , d ]   ,

 * 
for the x, y, and z (or 0, 1, 2) side directions, respectively, and where d is the depth index (i.e., number of values at each side index location). One- and two- dimensional side variables define storage similarly. For more information on indexing and manipulating side patch data objects, see the classes SideData<DIM> and SideGeometry<DIM>.

IMPORTANT: The class FaceVariable<DIM> and associated classes define the same storage as this side variable class, except that the indices are permuted in the face data type.

Note that it is possible to create a side variable to allocate and manage data for cell sides associated with a single coordinate direction only. See the constructor for more information.

See also:
pdat::SideData

pdat::SideDataFactory

pdat::SideGeometry

hier::Variable


Constructor & Destructor Documentation

template<int DIM, class TYPE>
SAMRAI::pdat::SideVariable< DIM, TYPE >::SideVariable const string &  name,
int  depth = 1,
bool  fine_boundary_represents_var = true,
int  direction = -1
 

Create a side variable object having properties specified by the name, depth (i.e., number of data values at each index location), coarse-fine interface representation, and coordinate direction information. Default arguments are provided for the last three. The default depth is one. The fine boundary representation boolean indicates which values (either coarse or fine) take precedence during coarsen and refine operations. The default state is that fine data values take precedence on coarse-fine interfaces. The default data allocation scheme is that side data will be allocated for all coordinate directions (i.e., -1). If this is desired, then the direction argument may be omitted. If an integer direction argument is specified, the only data for that direction will be maintained and managed for this variable (if not -1).

template<int DIM, class TYPE>
SAMRAI::pdat::SideVariable< DIM, TYPE >::~SideVariable  )  [virtual]
 

Virtual destructor for side variable objects.


Member Function Documentation

template<int DIM, class TYPE>
const hier::IntVector< DIM > & SAMRAI::pdat::SideVariable< DIM, TYPE >::getDirectionVector  )  const
 

Return constant reference to vector describing which coordinate directions have data associated with this side variable object. A vector entry of zero indicates that there is no data array allocated for the corresponding coordinate direction for side data created via this side variable object. A non-zero value indicates that a valid data array will be allocated for that coordinate direction.

template<int DIM, class TYPE>
bool SAMRAI::pdat::SideVariable< DIM, TYPE >::fineBoundaryRepresentsVariable  )  const [inline, virtual]
 

Return a boolean value indicating how data for the side variable will be treated on coarse-fine interfaces. True (default case set in constructor) indicates that fine patch values take precedence. False indicates that values on fine patches at a coarse-fine interface should be interpolated from coarser level values.

Implements SAMRAI::hier::Variable< DIM >.

template<int DIM, class TYPE>
bool SAMRAI::pdat::SideVariable< DIM, TYPE >::dataLivesOnPatchBorder  )  const [inline, virtual]
 

Return true since the side data index space extends beyond the interior of patches. That is, side data lives on patch borders.

Implements SAMRAI::hier::Variable< DIM >.


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