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

SAMRAI::tbox::DatabaseBox Class Reference

#include <source/toolbox/database/DatabaseBox.h>

List of all members.

Public Member Functions

 DatabaseBox ()
 DatabaseBox (const int dimension, const int *lower, const int *upper)
 DatabaseBox (const DatabaseBox &box)
DatabaseBoxoperator= (const DatabaseBox &box)
 ~DatabaseBox ()
bool empty () const
int getDimension () const
void setDimension (const int dimension)
int & lower (const int i)
int & upper (const int i)
int lower (const int i) const
int upper (const int i) const
int operator== (const DatabaseBox &box) const

Public Attributes

DatabaseBox_POD d_data
 All data members in a POD type.


Detailed Description

Class DatabaseBox represents a one, two, or three dimensional box in the AMR index space. It is defined by lower and upper bounds given by integer arrays.

This box is an auxilliary data structure used by the database routines to manipulate boxes. This box type removes cyclic dependencies among the database routines (which need a box) and the box (which needs the database routines). The box classes in the hierarchy package convert this box structure into the standard SAMRAI box class used by the AMR algorithms.


Constructor & Destructor Documentation

SAMRAI::tbox::DatabaseBox::DatabaseBox  )  [inline]
 

The default constructor creates a zero dimension empty box.

SAMRAI::tbox::DatabaseBox::DatabaseBox const int  dimension,
const int *  lower,
const int *  upper
 

Create a box of the specified dimension describing the index space between lower and upper. The dimension argument must be zero, one, two, or three.

SAMRAI::tbox::DatabaseBox::DatabaseBox const DatabaseBox box  )  [inline]
 

The copy constructor copies the index space of the argument box.

SAMRAI::tbox::DatabaseBox::~DatabaseBox  )  [inline]
 

The destructor does nothing interesting.


Member Function Documentation

DatabaseBox & SAMRAI::tbox::DatabaseBox::operator= const DatabaseBox box  )  [inline]
 

The assignment operator copies the index space of the argument box.

bool SAMRAI::tbox::DatabaseBox::empty  )  const
 

Return whether the box is empty. A box is empty if it has dimension zero or if any of the upper dimensions is less than its corresponding lower dimension.

int SAMRAI::tbox::DatabaseBox::getDimension  )  const [inline]
 

Return the currently defined dimension of the box.

void SAMRAI::tbox::DatabaseBox::setDimension const int  dimension  )  [inline]
 

Set the current dimension of the box. This must be in the range from zero (an empty box) to three.

int & SAMRAI::tbox::DatabaseBox::lower const int  i  )  [inline]
 

Return the specified component (non-const) of the lower index of the box.

int & SAMRAI::tbox::DatabaseBox::upper const int  i  )  [inline]
 

Return the specified component (non-const) of the upper index of the box.

int SAMRAI::tbox::DatabaseBox::lower const int  i  )  const [inline]
 

Return the specified component (const) of the lower index of the box.

int SAMRAI::tbox::DatabaseBox::upper const int  i  )  const [inline]
 

Return the specified component (const) of the upper index of the box.

int SAMRAI::tbox::DatabaseBox::operator== const DatabaseBox box  )  const
 

Check whether two boxes represent the same portion of index space.


Member Data Documentation

DatabaseBox_POD SAMRAI::tbox::DatabaseBox::d_data
 

All data members in a POD type.

Due to the need to compute offsets for data members and that offsets cannot be computed for non-POD data, we place all data members in a POD struct and own an object of that struct.

Data members are public so that the HDFDatabase need not mirror this structure in defining a compound type for HDF.


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