Advanced Multi-Physics (AMP)
On-Line Documentation
Public Member Functions | Private Attributes | List of all members
AMP::DatabaseBox Class Referencefinal

Class to store a box. More...

#include <Database.h>

Public Member Functions

 DatabaseBox ()
 Empty constructor.
 
 DatabaseBox (int dim, const int *lower, const int *upper)
 Default constructor.
 
 DatabaseBox (std::string_view str)
 Construct from a string of the format "[(0,0,0), (7,7,7)]".
 
uint8_t & dim ()
 Return a non-const reference to the number of dimensions.
 
uint8_t dim () const
 Return the number of dimensions.
 
bool empty () const
 
int & lower (uint8_t i)
 Return non-const reference to the specified component of the lower index.
 
int lower (uint8_t i) const
 Return the specified component of the lower index.
 
bool operator== (const DatabaseBox &box) const
 
int & upper (uint8_t i)
 Return non-const reference to the specified component of the upper index.
 
int upper (uint8_t i) const
 Return the specified component of the upper index.
 

Private Attributes

uint8_t d_dim
 
std::array< int, 5 > d_lower
 
std::array< int, 5 > d_upper
 

Detailed Description

Class to store a box.

Definition at line 665 of file Database.h.

Constructor & Destructor Documentation

◆ DatabaseBox() [1/3]

AMP::DatabaseBox::DatabaseBox ( )

Empty constructor.

◆ DatabaseBox() [2/3]

AMP::DatabaseBox::DatabaseBox ( int  dim,
const int *  lower,
const int *  upper 
)

Default constructor.

◆ DatabaseBox() [3/3]

AMP::DatabaseBox::DatabaseBox ( std::string_view  str)
explicit

Construct from a string of the format "[(0,0,0), (7,7,7)]".

Member Function Documentation

◆ dim() [1/2]

uint8_t & AMP::DatabaseBox::dim ( )

Return a non-const reference to the number of dimensions.

◆ dim() [2/2]

uint8_t AMP::DatabaseBox::dim ( ) const

Return the number of dimensions.

◆ empty()

bool AMP::DatabaseBox::empty ( ) const

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

◆ lower() [1/2]

int & AMP::DatabaseBox::lower ( uint8_t  i)

Return non-const reference to the specified component of the lower index.

◆ lower() [2/2]

int AMP::DatabaseBox::lower ( uint8_t  i) const

Return the specified component of the lower index.

◆ operator==()

bool AMP::DatabaseBox::operator== ( const DatabaseBox box) const

◆ upper() [1/2]

int & AMP::DatabaseBox::upper ( uint8_t  i)

Return non-const reference to the specified component of the upper index.

◆ upper() [2/2]

int AMP::DatabaseBox::upper ( uint8_t  i) const

Return the specified component of the upper index.

Member Data Documentation

◆ d_dim

uint8_t AMP::DatabaseBox::d_dim
private

Definition at line 711 of file Database.h.

◆ d_lower

std::array<int, 5> AMP::DatabaseBox::d_lower
private

Definition at line 712 of file Database.h.

◆ d_upper

std::array<int, 5> AMP::DatabaseBox::d_upper
private

Definition at line 712 of file Database.h.


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



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:42.
Comments on this page