#include <source/toolbox/database/DatabaseBox.h>
Public Member Functions | |
DatabaseBox () | |
DatabaseBox (const int dimension, const int *lower, const int *upper) | |
DatabaseBox (const DatabaseBox &box) | |
DatabaseBox & | operator= (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. |
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.
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.
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.
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.