IBAMR  IBAMR version 0.19.
Classes | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
SAMRAI::tbox::HDFDatabase Class Reference

#include <tbox/HDFDatabase.h>

Inheritance diagram for SAMRAI::tbox::HDFDatabase:
Inheritance graph
[legend]

Classes

struct  hdf_complex
 
struct  KeyData
 

Public Types

enum  DataType {
  SAMRAI_INVALID, SAMRAI_DATABASE, SAMRAI_BOOL, SAMRAI_CHAR,
  SAMRAI_INT, SAMRAI_COMPLEX, SAMRAI_DOUBLE, SAMRAI_FLOAT,
  SAMRAI_STRING, SAMRAI_BOX
}
 

Public Member Functions

 HDFDatabase (const std::string &name)
 
virtual ~HDFDatabase ()
 
virtual bool keyExists (const std::string &key)
 
virtual Array< std::string > getAllKeys ()
 
virtual enum DataType getArrayType (const std::string &key)
 Return the type of data associated with the key. More...
 
virtual int getArraySize (const std::string &key)
 
virtual bool isDatabase (const std::string &key)
 
virtual Pointer< DatabaseputDatabase (const std::string &key)
 
virtual Pointer< DatabasegetDatabase (const std::string &key)
 
virtual bool isBool (const std::string &key)
 
virtual void putBoolArray (const std::string &key, const bool *const data, const int nelements)
 
virtual Array< boolgetBoolArray (const std::string &key)
 
virtual bool isDatabaseBox (const std::string &key)
 
virtual void putDatabaseBoxArray (const std::string &key, const DatabaseBox *const data, const int nelements)
 
virtual Array< DatabaseBoxgetDatabaseBoxArray (const std::string &key)
 
virtual bool isChar (const std::string &key)
 
virtual void putCharArray (const std::string &key, const char *const data, const int nelements)
 
virtual Array< char > getCharArray (const std::string &key)
 
virtual bool isComplex (const std::string &key)
 
virtual void putComplexArray (const std::string &key, const dcomplex *const data, const int nelements)
 
virtual Array< dcomplexgetComplexArray (const std::string &key)
 
virtual bool isDouble (const std::string &key)
 
virtual void putDoubleArray (const std::string &key, const double *const data, const int nelements)
 
virtual Array< doublegetDoubleArray (const std::string &key)
 
virtual bool isFloat (const std::string &key)
 
virtual void putFloatArray (const std::string &key, const float *const data, const int nelements)
 
virtual Array< float > getFloatArray (const std::string &key)
 
virtual bool isInteger (const std::string &key)
 
virtual void putIntegerArray (const std::string &key, const int *const data, const int nelements)
 
virtual Array< intgetIntegerArray (const std::string &key)
 
virtual bool isString (const std::string &key)
 
virtual void putStringArray (const std::string &key, const std::string *const data, const int nelements)
 
virtual Array< std::string > getStringArray (const std::string &key)
 
virtual void printClassData (std::ostream &os=pout)
 
virtual bool create (const std::string &name)
 
virtual bool open (const std::string &name)
 
virtual bool attachToFile (hid_t group_id)
 Attach the Database to an existing HDF file. More...
 
virtual bool close ()
 
virtual std::string getName ()
 Returns the name of this database.
More...
 
hid_t getGroupId ()
 
virtual void putBoolArray (const std::string &key, const Array< bool > &data)
 
virtual void putBoolArray (const std::string &key, const bool *const data, const int nelements)=0
 
virtual Array< boolgetBoolArray (const std::string &key)=0
 
virtual void getBoolArray (const std::string &key, bool *data, const int nelements)
 
virtual void putDatabaseBoxArray (const std::string &key, const Array< DatabaseBox > &data)
 
virtual void putDatabaseBoxArray (const std::string &key, const DatabaseBox *const data, const int nelements)=0
 
virtual Array< DatabaseBoxgetDatabaseBoxArray (const std::string &key)=0
 
virtual void getDatabaseBoxArray (const std::string &key, DatabaseBox *data, const int nelements)
 
virtual void putCharArray (const std::string &key, const Array< char > &data)
 
virtual void putCharArray (const std::string &key, const char *const data, const int nelements)=0
 
virtual Array< char > getCharArray (const std::string &key)=0
 
virtual void getCharArray (const std::string &key, char *data, const int nelements)
 
virtual void putComplexArray (const std::string &key, const Array< dcomplex > &data)
 
virtual void putComplexArray (const std::string &key, const dcomplex *const data, const int nelements)=0
 
virtual Array< dcomplexgetComplexArray (const std::string &key)=0
 
virtual void getComplexArray (const std::string &key, dcomplex *data, const int nelements)
 
virtual void putFloatArray (const std::string &key, const Array< float > &data)
 
virtual void putFloatArray (const std::string &key, const float *const data, const int nelements)=0
 
virtual Array< float > getFloatArray (const std::string &key)=0
 
virtual void getFloatArray (const std::string &key, float *data, const int nelements)
 
virtual void putDoubleArray (const std::string &key, const Array< double > &data)
 
virtual void putDoubleArray (const std::string &key, const double *const data, const int nelements)=0
 
virtual Array< doublegetDoubleArray (const std::string &key)=0
 
virtual void getDoubleArray (const std::string &key, double *data, const int nelements)
 
virtual void putIntegerArray (const std::string &key, const Array< int > &data)
 
virtual void putIntegerArray (const std::string &key, const int *const data, const int nelements)=0
 
virtual Array< intgetIntegerArray (const std::string &key)=0
 
virtual void getIntegerArray (const std::string &key, int *data, const int nelements)
 
virtual void putStringArray (const std::string &key, const Array< std::string > &data)
 
virtual void putStringArray (const std::string &key, const std::string *const data, const int nelements)=0
 
virtual Array< std::string > getStringArray (const std::string &key)=0
 
virtual void getStringArray (const std::string &key, std::string *data, const int nelements)
 
virtual void putBool (const std::string &key, const bool &data)
 
virtual void putBoolArray (const std::string &key, const Array< bool > &data)
 
virtual bool getBool (const std::string &key)
 
virtual bool getBoolWithDefault (const std::string &key, const bool &defaultvalue)
 
virtual void getBoolArray (const std::string &key, bool *data, const int nelements)
 
virtual void putDatabaseBox (const std::string &key, const DatabaseBox &data)
 
virtual void putDatabaseBoxArray (const std::string &key, const Array< DatabaseBox > &data)
 
virtual DatabaseBox getDatabaseBox (const std::string &key)
 
virtual DatabaseBox getDatabaseBoxWithDefault (const std::string &key, const DatabaseBox &defaultvalue)
 
virtual void getDatabaseBoxArray (const std::string &key, DatabaseBox *data, const int nelements)
 
virtual void putChar (const std::string &key, const char &data)
 
virtual void putCharArray (const std::string &key, const Array< char > &data)
 
virtual char getChar (const std::string &key)
 
virtual char getCharWithDefault (const std::string &key, const char &defaultvalue)
 
virtual void getCharArray (const std::string &key, char *data, const int nelements)
 
virtual void putComplex (const std::string &key, const dcomplex &data)
 
virtual void putComplexArray (const std::string &key, const Array< dcomplex > &data)
 
virtual dcomplex getComplex (const std::string &key)
 
virtual dcomplex getComplexWithDefault (const std::string &key, const dcomplex &defaultvalue)
 
virtual void getComplexArray (const std::string &key, dcomplex *data, const int nelements)
 
virtual void putDouble (const std::string &key, const double &data)
 
virtual void putDoubleArray (const std::string &key, const Array< double > &data)
 
virtual double getDouble (const std::string &key)
 
virtual double getDoubleWithDefault (const std::string &key, const double &defaultvalue)
 
virtual void getDoubleArray (const std::string &key, double *data, const int nelements)
 
virtual void putFloat (const std::string &key, const float &data)
 
virtual void putFloatArray (const std::string &key, const Array< float > &data)
 
virtual float getFloat (const std::string &key)
 
virtual float getFloatWithDefault (const std::string &key, const float &defaultvalue)
 
virtual void getFloatArray (const std::string &key, float *data, const int nelements)
 
virtual void putInteger (const std::string &key, const int &data)
 
virtual void putIntegerArray (const std::string &key, const Array< int > &data)
 
virtual int getInteger (const std::string &key)
 
virtual int getIntegerWithDefault (const std::string &key, const int &defaultvalue)
 
virtual void getIntegerArray (const std::string &key, int *data, const int nelements)
 
virtual void putString (const std::string &key, const std::string &data)
 
virtual void putStringArray (const std::string &key, const Array< std::string > &data)
 
virtual std::string getString (const std::string &key)
 
virtual std::string getStringWithDefault (const std::string &key, const std::string &defaultvalue)
 
virtual void getStringArray (const std::string &key, std::string *data, const int nelements)
 
void getScalar (const std::string &key, bool &scalar)
 
void getScalar (const std::string &key, char &scalar)
 
void getScalar (const std::string &key, dcomplex &scalar)
 
void getScalar (const std::string &key, float &scalar)
 
void getScalar (const std::string &key, double &scalar)
 
void getScalar (const std::string &key, int &scalar)
 
void putScalar (const std::string &key, const bool scalar)
 
void putScalar (const std::string &key, const char scalar)
 
void putScalar (const std::string &key, const dcomplex scalar)
 
void putScalar (const std::string &key, const float scalar)
 
void putScalar (const std::string &key, const double scalar)
 
void putScalar (const std::string &key, const int scalar)
 
void getArray (const std::string &key, Array< bool > &array)
 
void getArray (const std::string &key, Array< char > &array)
 
void getArray (const std::string &key, Array< dcomplex > &array)
 
void getArray (const std::string &key, Array< float > &array)
 
void getArray (const std::string &key, Array< double > &array)
 
void getArray (const std::string &key, Array< int > &array)
 
void putArray (const std::string &key, const Array< bool > array)
 
void putArray (const std::string &key, const Array< char > array)
 
void putArray (const std::string &key, const Array< dcomplex > array)
 
void putArray (const std::string &key, const Array< float > array)
 
void putArray (const std::string &key, const Array< double > array)
 
void putArray (const std::string &key, const Array< int > array)
 

Private Member Functions

 HDFDatabase (const HDFDatabase &)
 
void operator= (const HDFDatabase &)
 
 HDFDatabase (const std::string &name, hid_t group_ID)
 
void insertArray (hid_t parent_id, const char *name, hsize_t offset, int ndims, const hsize_t dim[], const int *perm, hid_t member_id) const
 
hid_t createCompoundDatabaseBox (char type_spec) const
 Create an HDF compound type for box. More...
 
hid_t createCompoundComplex (char type_spec) const
 Create an HDF compound type for complex. More...
 
void performKeySearch ()
 
void cleanupKeySearch ()
 
void writeAttribute (int type_key, hid_t dataset_id)
 Write attribute for a given dataset. More...
 
int readAttribute (hid_t dataset_id)
 Read attribute for a given dataset. More...
 

Static Private Member Functions

static herr_t iterateKeys (hid_t loc_id, const char *name, void *database)
 
static void addKeyToList (const char *name, int type, void *database)
 

Private Attributes

std::string d_top_level_search_group
 
std::string d_group_to_search
 
int d_still_searching
 
int d_found_group
 
bool d_is_file
 Whether database is mounted to a file. More...
 
hid_t d_file_id
 ID of file attached to database. More...
 
hid_t d_group_id
 ID of group attached to database. More...
 
std::string d_database_name
 
List< KeyDatad_keydata
 

Detailed Description

Class HDFDatabase implements the interface of the Database class to store data in the HDF5 (Hierarchical Data Format) data format.

It is assumed that all processors will access the database in the same manner. Error reporting is done using the SAMRAI error reporting macros.

See also
tbox::Database

Member Enumeration Documentation

◆ DataType

Enumerated type indicating what type of values is stored in a database entry. Returned from getType() method.

Note: The SAMRAI_ prefix is needed since some poorly written packages do "#define CHAR" etc.

Enumerator
SAMRAI_INVALID 
SAMRAI_DATABASE 
SAMRAI_BOOL 
SAMRAI_CHAR 
SAMRAI_INT 
SAMRAI_COMPLEX 
SAMRAI_DOUBLE 
SAMRAI_FLOAT 
SAMRAI_STRING 
SAMRAI_BOX 

Constructor & Destructor Documentation

◆ HDFDatabase() [1/3]

SAMRAI::tbox::HDFDatabase::HDFDatabase ( const std::string &  name)

The HDF database constructor creates an empty database with the specified name. By default the database will not be associated with a file until it is mounted, using the mount() member function.

When assertion checking is active, the name string must be non-empty.

◆ ~HDFDatabase()

virtual SAMRAI::tbox::HDFDatabase::~HDFDatabase ( )
virtual

The database destructor closes the HDF5 group or data file.

◆ HDFDatabase() [2/3]

SAMRAI::tbox::HDFDatabase::HDFDatabase ( const HDFDatabase )
private

◆ HDFDatabase() [3/3]

SAMRAI::tbox::HDFDatabase::HDFDatabase ( const std::string &  name,
hid_t  group_ID 
)
private

Member Function Documentation

◆ keyExists()

virtual bool SAMRAI::tbox::HDFDatabase::keyExists ( const std::string &  key)
virtual

Return true if the specified key exists in the database and false otherwise.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ getAllKeys()

virtual Array<std::string> SAMRAI::tbox::HDFDatabase::getAllKeys ( )
virtual

Return an array of all keys in the current database. Note that no keys from subdatabases contained in the current database will appear in the array. To get the keys of any other database, you must call this routine for that database.

Implements SAMRAI::tbox::Database.

◆ getArrayType()

virtual enum DataType SAMRAI::tbox::HDFDatabase::getArrayType ( const std::string &  key)
virtual

If the key does not exist, then INVALID is returned

Parameters
keyKey name in database.

Implements SAMRAI::tbox::Database.

◆ getArraySize()

virtual int SAMRAI::tbox::HDFDatabase::getArraySize ( const std::string &  key)
virtual

Return the size of the array associated with the key. If the key does not exist, then zero is returned.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ isDatabase()

virtual bool SAMRAI::tbox::HDFDatabase::isDatabase ( const std::string &  key)
virtual

Return true or false depending on whether the specified key represents a database entry. If the key does not exist or if the string is empty, then false is returned.

Implements SAMRAI::tbox::Database.

◆ putDatabase()

virtual Pointer<Database> SAMRAI::tbox::HDFDatabase::putDatabase ( const std::string &  key)
virtual

Create a new database with the specified key name and return a pointer to it. A new group with the key name is also created in the data file.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ getDatabase()

virtual Pointer<Database> SAMRAI::tbox::HDFDatabase::getDatabase ( const std::string &  key)
virtual

Get the database with the specified key name. If the specified key does not represent a database entry in the database, then an error message is printed and the program exits.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ isBool()

virtual bool SAMRAI::tbox::HDFDatabase::isBool ( const std::string &  key)
virtual

Return true or false depending on whether the specified key represents a boolean entry. If the key does not exist or if the string is empty, then false is returned.

Implements SAMRAI::tbox::Database.

◆ putBoolArray() [1/4]

virtual void SAMRAI::tbox::HDFDatabase::putBoolArray ( const std::string &  key,
const bool *const  data,
const int  nelements 
)
virtual

Create a boolean array entry in the database with the specified key name.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ getBoolArray() [1/4]

virtual Array<bool> SAMRAI::tbox::HDFDatabase::getBoolArray ( const std::string &  key)
virtual

Get a boolean entry in the database with the specified key name. If the specified key does not exist in the database, then an error message is printed and the program exits.

When assertion checking is active, the key string must be non-empty. Get a boolean entry from the database with the specified key name. If the specified key does not exist in the database, then an error message is printed and the program exits.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ isDatabaseBox()

virtual bool SAMRAI::tbox::HDFDatabase::isDatabaseBox ( const std::string &  key)
virtual

Return true or false depending on whether the specified key represents a box entry. If the key does not exist or if the string is empty, then false is returned.

Implements SAMRAI::tbox::Database.

◆ putDatabaseBoxArray() [1/4]

virtual void SAMRAI::tbox::HDFDatabase::putDatabaseBoxArray ( const std::string &  key,
const DatabaseBox *const  data,
const int  nelements 
)
virtual

Create a box array entry in the database with the specified key name.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ getDatabaseBoxArray() [1/4]

virtual Array<DatabaseBox> SAMRAI::tbox::HDFDatabase::getDatabaseBoxArray ( const std::string &  key)
virtual

Get a box entry from the database with the specified key name. If the specified key does not exist in the database, then an error message is printed and the program exits.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ isChar()

virtual bool SAMRAI::tbox::HDFDatabase::isChar ( const std::string &  key)
virtual

Return true or false depending on whether the specified key represents a char entry. If the key does not exist or if the string is empty, then false is returned.

Implements SAMRAI::tbox::Database.

◆ putCharArray() [1/4]

virtual void SAMRAI::tbox::HDFDatabase::putCharArray ( const std::string &  key,
const char *const  data,
const int  nelements 
)
virtual

Create a character array entry in the database with the specified key name.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ getCharArray() [1/4]

virtual Array<char> SAMRAI::tbox::HDFDatabase::getCharArray ( const std::string &  key)
virtual

Get a character entry from the database with the specified key name. If the specified key does not exist in the database, then an error message is printed and the program exits.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ isComplex()

virtual bool SAMRAI::tbox::HDFDatabase::isComplex ( const std::string &  key)
virtual

Return true or false depending on whether the specified key represents a complex entry. If the key does not exist or if the string is empty, then false is returned.

Implements SAMRAI::tbox::Database.

◆ putComplexArray() [1/4]

virtual void SAMRAI::tbox::HDFDatabase::putComplexArray ( const std::string &  key,
const dcomplex *const  data,
const int  nelements 
)
virtual

Create a complex array entry in the database with the specified key name.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ getComplexArray() [1/4]

virtual Array<dcomplex> SAMRAI::tbox::HDFDatabase::getComplexArray ( const std::string &  key)
virtual

Get a complex entry from the database with the specified key name. If the specified key does not exist in the database then an error message is printed and the program exits.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ isDouble()

virtual bool SAMRAI::tbox::HDFDatabase::isDouble ( const std::string &  key)
virtual

Return true or false depending on whether the specified key represents a double entry. If the key does not exist or if the string is empty, then false is returned.

Implements SAMRAI::tbox::Database.

◆ putDoubleArray() [1/4]

virtual void SAMRAI::tbox::HDFDatabase::putDoubleArray ( const std::string &  key,
const double *const  data,
const int  nelements 
)
virtual

Create a double array entry in the database with the specified key name.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ getDoubleArray() [1/4]

virtual Array<double> SAMRAI::tbox::HDFDatabase::getDoubleArray ( const std::string &  key)
virtual

Get a double entry from the database with the specified key name. If the specified key does not exist in the database then an error message is printed and the program exits.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ isFloat()

virtual bool SAMRAI::tbox::HDFDatabase::isFloat ( const std::string &  key)
virtual

Return true or false depending on whether the specified key represents a float entry. If the key does not exist or if the string is empty, then false is returned.

Implements SAMRAI::tbox::Database.

◆ putFloatArray() [1/4]

virtual void SAMRAI::tbox::HDFDatabase::putFloatArray ( const std::string &  key,
const float *const  data,
const int  nelements 
)
virtual

Create a float array entry in the database with the specified key name.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ getFloatArray() [1/4]

virtual Array<float> SAMRAI::tbox::HDFDatabase::getFloatArray ( const std::string &  key)
virtual

Get a float entry from the database with the specified key name. If the specified key does not exist in the database then an error message is printed and the program exits.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ isInteger()

virtual bool SAMRAI::tbox::HDFDatabase::isInteger ( const std::string &  key)
virtual

Return true or false depending on whether the specified key represents an integer entry. If the key does not exist or if the string is empty, then false is returned.

Implements SAMRAI::tbox::Database.

◆ putIntegerArray() [1/4]

virtual void SAMRAI::tbox::HDFDatabase::putIntegerArray ( const std::string &  key,
const int *const  data,
const int  nelements 
)
virtual

Create an integer array entry in the database with the specified key name.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ getIntegerArray() [1/4]

virtual Array<int> SAMRAI::tbox::HDFDatabase::getIntegerArray ( const std::string &  key)
virtual

Get an integer entry from the database with the specified key name. If the specified key does not exist in the database then an error message is printed and the program exits.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ isString()

virtual bool SAMRAI::tbox::HDFDatabase::isString ( const std::string &  key)
virtual

Return true or false depending on whether the specified key represents a string entry. If the key does not exist or if the string is empty, then false is returned.

Implements SAMRAI::tbox::Database.

◆ putStringArray() [1/4]

virtual void SAMRAI::tbox::HDFDatabase::putStringArray ( const std::string &  key,
const std::string *const  data,
const int  nelements 
)
virtual

Create a string array entry in the database with the specified key name.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ getStringArray() [1/4]

virtual Array<std::string> SAMRAI::tbox::HDFDatabase::getStringArray ( const std::string &  key)
virtual

Get a string entry from the database with the specified key name. If the specified key does not exist in the database then an error message is printed and the program exits.

When assertion checking is active, the key string must be non-empty.

Implements SAMRAI::tbox::Database.

◆ printClassData()

virtual void SAMRAI::tbox::HDFDatabase::printClassData ( std::ostream &  os = pout)
virtual

Print contents of current database to the specified output stream.
If no output stream is specified, then data is written to stream pout. Note that none of the subdatabases contained in the current database will have their contents printed. To view the contents of any other database, you must call this print routine for that database.

Implements SAMRAI::tbox::Database.

◆ create()

virtual bool SAMRAI::tbox::HDFDatabase::create ( const std::string &  name)
virtual

Create a new database file.

Returns true if successful.

Parameters
namename of database. Normally a filename.

Implements SAMRAI::tbox::Database.

◆ open()

virtual bool SAMRAI::tbox::HDFDatabase::open ( const std::string &  name)
virtual

Open an existing database file.

Returns true if successful.

Parameters
namename of database. Normally a filename.

Implements SAMRAI::tbox::Database.

◆ attachToFile()

virtual bool SAMRAI::tbox::HDFDatabase::attachToFile ( hid_t  group_id)
virtual

If an application has an existing HDF file used for restart this method can be used to write SAMRAI restart information to the existing file instead of SAMRAI creating a distinct file.

The group_id should be a hid returned from a H5Gcreate call.
SAMRAI data will be written within this group.

Returns true if attach was successful.

◆ close()

virtual bool SAMRAI::tbox::HDFDatabase::close ( )
virtual

Close the database.

Returns true if successful.

If the database is currently open then close it. This should flush all data to the file (if the database is on disk).

Implements SAMRAI::tbox::Database.

◆ getName()

virtual std::string SAMRAI::tbox::HDFDatabase::getName ( )
virtual

The name for the root of the database is the name supplied when creating it. Names for nested databases are the keyname of the database.

Implements SAMRAI::tbox::Database.

◆ getGroupId()

hid_t SAMRAI::tbox::HDFDatabase::getGroupId ( )

Return the group_id so VisIt can access an object's HDF database.

◆ operator=()

void SAMRAI::tbox::HDFDatabase::operator= ( const HDFDatabase )
private

◆ iterateKeys()

static herr_t SAMRAI::tbox::HDFDatabase::iterateKeys ( hid_t  loc_id,
const char *  name,
void *  database 
)
staticprivate

◆ addKeyToList()

static void SAMRAI::tbox::HDFDatabase::addKeyToList ( const char *  name,
int  type,
void *  database 
)
staticprivate

◆ insertArray()

void SAMRAI::tbox::HDFDatabase::insertArray ( hid_t  parent_id,
const char *  name,
hsize_t  offset,
int  ndims,
const hsize_t  dim[],
const int perm,
hid_t  member_id 
) const
private

◆ createCompoundDatabaseBox()

hid_t SAMRAI::tbox::HDFDatabase::createCompoundDatabaseBox ( char  type_spec) const
private

When finished, the type should be closed using H5Tclose(hid_t).

Parameters
char_type'n' mean use native types; 'f' = means use types for file.
Returns
the compound type id.

◆ createCompoundComplex()

hid_t SAMRAI::tbox::HDFDatabase::createCompoundComplex ( char  type_spec) const
private

When finished, the type should be closed using H5Tclose(hid_t).

Parameters
char_type'n' mean use native types; 'f' = means use types for file.
Returns
the compound type id.

◆ performKeySearch()

void SAMRAI::tbox::HDFDatabase::performKeySearch ( )
private

◆ cleanupKeySearch()

void SAMRAI::tbox::HDFDatabase::cleanupKeySearch ( )
private

◆ writeAttribute()

void SAMRAI::tbox::HDFDatabase::writeAttribute ( int  type_key,
hid_t  dataset_id 
)
private

Currently only one attribute is kept for each dataset: its type. The type attribute is used to determine what kind of data the dataset represent.

Parameters
type_keyType identifier for the dataset
dataset_idThe HDF dataset id

◆ readAttribute()

int SAMRAI::tbox::HDFDatabase::readAttribute ( hid_t  dataset_id)
private

Currently only one attribute is kept for each dataset: its type. The type attribute is returned.

Parameters
dataset_idThe HDF dataset id
Returns
type attribute

◆ putBoolArray() [2/4]

virtual void SAMRAI::tbox::Database::putBoolArray

Create a boolean array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.

◆ putBoolArray() [3/4]

virtual void SAMRAI::tbox::Database::putBoolArray

Create a boolean array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ getBoolArray() [2/4]

virtual Array<bool> SAMRAI::tbox::Database::getBoolArray

Get a boolean entry from the database with the specified key name. If the specified key does not exist in the database or is not a boolean array, then an error message is printed and the program exits.

Parameters
keyKey name in database.

◆ getBoolArray() [3/4]

virtual void SAMRAI::tbox::Database::getBoolArray

Get a boolean entry from the database with the specified key name. If the specified key does not exist in the database or is not a boolean array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ putDatabaseBoxArray() [2/4]

virtual void SAMRAI::tbox::Database::putDatabaseBoxArray

Create a box array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.

◆ putDatabaseBoxArray() [3/4]

virtual void SAMRAI::tbox::Database::putDatabaseBoxArray

Create a box array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ getDatabaseBoxArray() [2/4]

virtual Array<DatabaseBox> SAMRAI::tbox::Database::getDatabaseBoxArray

Get a box entry from the database with the specified key name. If the specified key does not exist in the database or is not a box array, then an error message is printed and the program exits.

Parameters
keyKey name in database.

◆ getDatabaseBoxArray() [3/4]

virtual void SAMRAI::tbox::Database::getDatabaseBoxArray

Get a box entry from the database with the specified key name. If the specified key does not exist in the database or is not a box array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ putCharArray() [2/4]

virtual void SAMRAI::tbox::Database::putCharArray

Create a character array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
keyKey name in database.
dataArray with data to put into database.

◆ putCharArray() [3/4]

virtual void SAMRAI::tbox::Database::putCharArray

Create a character array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ getCharArray() [2/4]

virtual Array<char> SAMRAI::tbox::Database::getCharArray

Get a character entry from the database with the specified key name. If the specified key does not exist in the database or is not a character array, then an error message is printed and the program exits.

Parameters
keyKey name in database.

◆ getCharArray() [3/4]

virtual void SAMRAI::tbox::Database::getCharArray

Get a character entry from the database with the specified key name. If the specified key does not exist in the database or is not a character array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ putComplexArray() [2/4]

virtual void SAMRAI::tbox::Database::putComplexArray

Create a complex array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.

◆ putComplexArray() [3/4]

virtual void SAMRAI::tbox::Database::putComplexArray

Create a complex array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ getComplexArray() [2/4]

virtual Array<dcomplex> SAMRAI::tbox::Database::getComplexArray

Get a complex entry from the database with the specified key name. If the specified key does not exist in the database or is not a complex array, then an error message is printed and the program exits.

Parameters
keyKey name in database.

◆ getComplexArray() [3/4]

virtual void SAMRAI::tbox::Database::getComplexArray

Get a complex entry from the database with the specified key name. If the specified key does not exist in the database or is not a complex array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ putFloatArray() [2/4]

virtual void SAMRAI::tbox::Database::putFloatArray

Create a float array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.

◆ putFloatArray() [3/4]

virtual void SAMRAI::tbox::Database::putFloatArray

Create a float array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ getFloatArray() [2/4]

virtual Array<float> SAMRAI::tbox::Database::getFloatArray

Get a float entry from the database with the specified key name. If the specified key does not exist in the database or is not a float array, then an error message is printed and the program exits.

Parameters
keyKey name in database.

◆ getFloatArray() [3/4]

virtual void SAMRAI::tbox::Database::getFloatArray

Get a float entry from the database with the specified key name. If the specified key does not exist in the database or is not a float array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ putDoubleArray() [2/4]

virtual void SAMRAI::tbox::Database::putDoubleArray

Create a double array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.

◆ putDoubleArray() [3/4]

virtual void SAMRAI::tbox::Database::putDoubleArray

Create a double array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ getDoubleArray() [2/4]

virtual Array<double> SAMRAI::tbox::Database::getDoubleArray

Get a double entry from the database with the specified key name. If the specified key does not exist in the database or is not a double array, then an error message is printed and the program exits.

Parameters
keyKey name in database.

◆ getDoubleArray() [3/4]

virtual void SAMRAI::tbox::Database::getDoubleArray

Get a double entry from the database with the specified key name. If the specified key does not exist in the database or is not a double array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ putIntegerArray() [2/4]

virtual void SAMRAI::tbox::Database::putIntegerArray

Create an integer array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.

◆ putIntegerArray() [3/4]

virtual void SAMRAI::tbox::Database::putIntegerArray

Create an integer array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ getIntegerArray() [2/4]

virtual Array<int> SAMRAI::tbox::Database::getIntegerArray

Get an integer entry from the database with the specified key name. If the specified key does not exist in the database or is not an integer array, then an error message is printed and the program exits.

Parameters
keyKey name in database.

◆ getIntegerArray() [3/4]

virtual void SAMRAI::tbox::Database::getIntegerArray

Get an integer entry from the database with the specified key name. If the specified key does not exist in the database or is not an integer array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ putStringArray() [2/4]

virtual void SAMRAI::tbox::Database::putStringArray

Create a string array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.

◆ putStringArray() [3/4]

virtual void SAMRAI::tbox::Database::putStringArray

Create a string array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ getStringArray() [2/4]

virtual Array<std::string> SAMRAI::tbox::Database::getStringArray

Get a string entry from the database with the specified key name. If the specified key does not exist in the database or is not a string array, then an error message is printed and the program exits.

Parameters
keyKey name in database.

◆ getStringArray() [3/4]

virtual void SAMRAI::tbox::Database::getStringArray

Get a string entry from the database with the specified key name. If the specified key does not exist in the database or is not a string array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

◆ putBool()

virtual void SAMRAI::tbox::Database::putBool ( const std::string &  key,
const bool data 
)
virtualinherited

Create a boolean scalar entry in the database with the specified key name. If thoe key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataValue to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putBoolArray() [4/4]

virtual void SAMRAI::tbox::Database::putBoolArray ( const std::string &  key,
const Array< bool > &  data 
)
virtualinherited

Create a boolean array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getBool()

virtual bool SAMRAI::tbox::Database::getBool ( const std::string &  key)
virtualinherited

Get a boolean entry in the database with the specified key name. If the specified key does not exist in the database or is not a boolean scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getBoolWithDefault()

virtual bool SAMRAI::tbox::Database::getBoolWithDefault ( const std::string &  key,
const bool defaultvalue 
)
virtualinherited

Get a boolean entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not a boolean scalar, then an error message is printed and the program exits.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getBoolArray() [4/4]

virtual void SAMRAI::tbox::Database::getBoolArray ( const std::string &  key,
bool data,
const int  nelements 
)
virtualinherited

Get a boolean entry from the database with the specified key name. If the specified key does not exist in the database or is not a boolean array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putDatabaseBox()

virtual void SAMRAI::tbox::Database::putDatabaseBox ( const std::string &  key,
const DatabaseBox data 
)
virtualinherited

Create a box scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataData to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putDatabaseBoxArray() [4/4]

virtual void SAMRAI::tbox::Database::putDatabaseBoxArray ( const std::string &  key,
const Array< DatabaseBox > &  data 
)
virtualinherited

Create a box array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getDatabaseBox()

virtual DatabaseBox SAMRAI::tbox::Database::getDatabaseBox ( const std::string &  key)
virtualinherited

Get a box entry in the database with the specified key name. If the specified key does not exist in the database or is not a box scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getDatabaseBoxWithDefault()

virtual DatabaseBox SAMRAI::tbox::Database::getDatabaseBoxWithDefault ( const std::string &  key,
const DatabaseBox defaultvalue 
)
virtualinherited

Get a box entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not a box scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.
defaultvalueDefault value to return if not found.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getDatabaseBoxArray() [4/4]

virtual void SAMRAI::tbox::Database::getDatabaseBoxArray ( const std::string &  key,
DatabaseBox data,
const int  nelements 
)
virtualinherited

Get a box entry from the database with the specified key name. If the specified key does not exist in the database or is not a box array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putChar()

virtual void SAMRAI::tbox::Database::putChar ( const std::string &  key,
const char &  data 
)
virtualinherited

Create a character scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataValue to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putCharArray() [4/4]

virtual void SAMRAI::tbox::Database::putCharArray ( const std::string &  key,
const Array< char > &  data 
)
virtualinherited

Create a character array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
keyKey name in database.
dataArray with data to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getChar()

virtual char SAMRAI::tbox::Database::getChar ( const std::string &  key)
virtualinherited

Get a character entry in the database with the specified key name. If the specified key does not exist in the database or is not an character scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getCharWithDefault()

virtual char SAMRAI::tbox::Database::getCharWithDefault ( const std::string &  key,
const char &  defaultvalue 
)
virtualinherited

Get a character entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not a character scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.
defaultvalueDefault value to return if not found.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getCharArray() [4/4]

virtual void SAMRAI::tbox::Database::getCharArray ( const std::string &  key,
char *  data,
const int  nelements 
)
virtualinherited

Get a character entry from the database with the specified key name. If the specified key does not exist in the database or is not a character array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putComplex()

virtual void SAMRAI::tbox::Database::putComplex ( const std::string &  key,
const dcomplex data 
)
virtualinherited

Create a complex scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataValue to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putComplexArray() [4/4]

virtual void SAMRAI::tbox::Database::putComplexArray ( const std::string &  key,
const Array< dcomplex > &  data 
)
virtualinherited

Create a complex array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getComplex()

virtual dcomplex SAMRAI::tbox::Database::getComplex ( const std::string &  key)
virtualinherited

Get a complex entry in the database with the specified key name. If the specified key does not exist in the database or is not a complex scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getComplexWithDefault()

virtual dcomplex SAMRAI::tbox::Database::getComplexWithDefault ( const std::string &  key,
const dcomplex defaultvalue 
)
virtualinherited

Get a complex entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not a complex scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.
defaultvalueDefault value to return if not found.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getComplexArray() [4/4]

virtual void SAMRAI::tbox::Database::getComplexArray ( const std::string &  key,
dcomplex data,
const int  nelements 
)
virtualinherited

Get a complex entry from the database with the specified key name. If the specified key does not exist in the database or is not a complex array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putDouble()

virtual void SAMRAI::tbox::Database::putDouble ( const std::string &  key,
const double data 
)
virtualinherited

Create a double scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataValue to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putDoubleArray() [4/4]

virtual void SAMRAI::tbox::Database::putDoubleArray ( const std::string &  key,
const Array< double > &  data 
)
virtualinherited

Create a double array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getDouble()

virtual double SAMRAI::tbox::Database::getDouble ( const std::string &  key)
virtualinherited

Get a double entry in the database with the specified key name. If the specified key does not exist in the database or is not a double scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getDoubleWithDefault()

virtual double SAMRAI::tbox::Database::getDoubleWithDefault ( const std::string &  key,
const double defaultvalue 
)
virtualinherited

Get a double entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not a double scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.
defaultvalueDefault value to return if not found.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getDoubleArray() [4/4]

virtual void SAMRAI::tbox::Database::getDoubleArray ( const std::string &  key,
double data,
const int  nelements 
)
virtualinherited

Get a double entry from the database with the specified key name. If the specified key does not exist in the database or is not a double array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putFloat()

virtual void SAMRAI::tbox::Database::putFloat ( const std::string &  key,
const float &  data 
)
virtualinherited

Create a float scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataValue to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putFloatArray() [4/4]

virtual void SAMRAI::tbox::Database::putFloatArray ( const std::string &  key,
const Array< float > &  data 
)
virtualinherited

Create a float array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getFloat()

virtual float SAMRAI::tbox::Database::getFloat ( const std::string &  key)
virtualinherited

Get a float entry in the database with the specified key name. If the specified key does not exist in the database or is not a float scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getFloatWithDefault()

virtual float SAMRAI::tbox::Database::getFloatWithDefault ( const std::string &  key,
const float &  defaultvalue 
)
virtualinherited

Get a float entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not a float scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.
defaultvalueDefault value to return if not found.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getFloatArray() [4/4]

virtual void SAMRAI::tbox::Database::getFloatArray ( const std::string &  key,
float *  data,
const int  nelements 
)
virtualinherited

Get a float entry from the database with the specified key name. If the specified key does not exist in the database or is not a float array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putInteger()

virtual void SAMRAI::tbox::Database::putInteger ( const std::string &  key,
const int data 
)
virtualinherited

Create an integer scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataValue to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putIntegerArray() [4/4]

virtual void SAMRAI::tbox::Database::putIntegerArray ( const std::string &  key,
const Array< int > &  data 
)
virtualinherited

Create an integer array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getInteger()

virtual int SAMRAI::tbox::Database::getInteger ( const std::string &  key)
virtualinherited

Get an integer entry in the database with the specified key name. If the specified key does not exist in the database or is not an integer scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getIntegerWithDefault()

virtual int SAMRAI::tbox::Database::getIntegerWithDefault ( const std::string &  key,
const int defaultvalue 
)
virtualinherited

Get an integer entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not an integer scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.
defaultvalueDefault value to return if not found.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getIntegerArray() [4/4]

virtual void SAMRAI::tbox::Database::getIntegerArray ( const std::string &  key,
int data,
const int  nelements 
)
virtualinherited

Get an integer entry from the database with the specified key name. If the specified key does not exist in the database or is not an integer array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putString()

virtual void SAMRAI::tbox::Database::putString ( const std::string &  key,
const std::string &  data 
)
virtualinherited

Create a string scalar entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataValue to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ putStringArray() [4/4]

virtual void SAMRAI::tbox::Database::putStringArray ( const std::string &  key,
const Array< std::string > &  data 
)
virtualinherited

Create a string array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
dataArray with data to put into database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getString()

virtual std::string SAMRAI::tbox::Database::getString ( const std::string &  key)
virtualinherited

Get a string entry in the database with the specified key name. If the specified key does not exist in the database or is not an string scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getStringWithDefault()

virtual std::string SAMRAI::tbox::Database::getStringWithDefault ( const std::string &  key,
const std::string &  defaultvalue 
)
virtualinherited

Get a string entry in the database with the specified key name. If the specified key does not exist in the database, then the default value is returned. If the key exists but is not a string scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.
defaultvalueDefault value to return if not found.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getStringArray() [4/4]

virtual void SAMRAI::tbox::Database::getStringArray ( const std::string &  key,
std::string *  data,
const int  nelements 
)
virtualinherited

Get a string entry from the database with the specified key name. If the specified key does not exist in the database or is not a string array, then an error message is printed and the program exits. The specified number of elements must match exactly the number of elements in the array in the database.

Parameters
keyKey name in database.
dataArray with data to put into database.
nelementsNumber of elements to write from array.

Reimplemented in SAMRAI::tbox::MemoryDatabase.

◆ getScalar() [1/6]

void SAMRAI::tbox::Database::getScalar ( const std::string &  key,
bool scalar 
)
inherited

Get a bool entry in the database with the specified key name. If the specified key does not exist in the database or is not an bool scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.
scalarReturns scalar that was read.

◆ getScalar() [2/6]

void SAMRAI::tbox::Database::getScalar ( const std::string &  key,
char &  scalar 
)
inherited

Get a char entry in the database with the specified key name. If the specified key does not exist in the database or is not an char scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.
scalarReturns scalar that was read.

◆ getScalar() [3/6]

void SAMRAI::tbox::Database::getScalar ( const std::string &  key,
dcomplex scalar 
)
inherited

Get a complex entry in the database with the specified key name. If the specified key does not exist in the database or is not an complex scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.
scalarReturns scalar that was read.

◆ getScalar() [4/6]

void SAMRAI::tbox::Database::getScalar ( const std::string &  key,
float &  scalar 
)
inherited

Get a float entry in the database with the specified key name. If the specified key does not exist in the database or is not an float scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.
scalarReturns scalar that was read.

◆ getScalar() [5/6]

void SAMRAI::tbox::Database::getScalar ( const std::string &  key,
double scalar 
)
inherited

Get a double entry in the database with the specified key name. If the specified key does not exist in the database or is not an double scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.
scalarReturns scalar that was read.

◆ getScalar() [6/6]

void SAMRAI::tbox::Database::getScalar ( const std::string &  key,
int scalar 
)
inherited

Get a integer entry in the database with the specified key name. If the specified key does not exist in the database or is not an integer scalar, then an error message is printed and the program exits.

Parameters
keyKey name in database.
scalarReturns scalar that was read.

◆ putScalar() [1/6]

void SAMRAI::tbox::Database::putScalar ( const std::string &  key,
const bool  scalar 
)
inherited

Get a bool entry from the database with the specified key name. If the specified key does not exist in the database or is not a bool array, then an error message is printed and the program exits.

Parameters
keyKey name in database.
scalarValue to put into database.

◆ putScalar() [2/6]

void SAMRAI::tbox::Database::putScalar ( const std::string &  key,
const char  scalar 
)
inherited

Get a char entry from the database with the specified key name. If the specified key does not exist in the database or is not a char array, then an error message is printed and the program exits.

Parameters
keyKey name in database.
scalarValue to put into database.

◆ putScalar() [3/6]

void SAMRAI::tbox::Database::putScalar ( const std::string &  key,
const dcomplex  scalar 
)
inherited

Get a complex entry from the database with the specified key name. If the specified key does not exist in the database or is not a complex array, then an error message is printed and the program exits.

Parameters
keyKey name in database.
scalarValue to put into database.

◆ putScalar() [4/6]

void SAMRAI::tbox::Database::putScalar ( const std::string &  key,
const float  scalar 
)
inherited

Get a float entry from the database with the specified key name. If the specified key does not exist in the database or is not a float array, then an error message is printed and the program exits.

Parameters
keyKey name in database.
scalarValue to put into database.

◆ putScalar() [5/6]

void SAMRAI::tbox::Database::putScalar ( const std::string &  key,
const double  scalar 
)
inherited

Get a double entry from the database with the specified key name. If the specified key does not exist in the database or is not a double array, then an error message is printed and the program exits.

Parameters
keyKey name in database.
scalarValue to put into database.

◆ putScalar() [6/6]

void SAMRAI::tbox::Database::putScalar ( const std::string &  key,
const int  scalar 
)
inherited

Get a integer entry from the database with the specified key name. If the specified key does not exist in the database or is not a integer array, then an error message is printed and the program exits.

Parameters
keyKey name in database.
scalarValue to put into database.

◆ getArray() [1/6]

void SAMRAI::tbox::Database::getArray ( const std::string &  key,
Array< bool > &  array 
)
inherited

Get a bool entry from the database with the specified key name. If the specified key does not exist in the database or is not a bool array, then an error message is printed and the program exits.

Parameters
keyKey name in database.
arrayReturns array that was read.

◆ getArray() [2/6]

void SAMRAI::tbox::Database::getArray ( const std::string &  key,
Array< char > &  array 
)
inherited

Get a char entry from the database with the specified key name. If the specified key does not exist in the database or is not a char array, then an error message is printed and the program exits.

Parameters
keyKey name in database.
arrayReturns array that was read.

◆ getArray() [3/6]

void SAMRAI::tbox::Database::getArray ( const std::string &  key,
Array< dcomplex > &  array 
)
inherited

Get a complex entry from the database with the specified key name. If the specified key does not exist in the database or is not a complex array, then an error message is printed and the program exits.

Parameters
keyKey name in database.
arrayReturns array that was read.

◆ getArray() [4/6]

void SAMRAI::tbox::Database::getArray ( const std::string &  key,
Array< float > &  array 
)
inherited

Get a float entry from the database with the specified key name. If the specified key does not exist in the database or is not a float array, then an error message is printed and the program exits.

Parameters
keyKey name in database.
arrayReturns array that was read.

◆ getArray() [5/6]

void SAMRAI::tbox::Database::getArray ( const std::string &  key,
Array< double > &  array 
)
inherited

Get a double entry from the database with the specified key name. If the specified key does not exist in the database or is not a double array, then an error message is printed and the program exits.

Parameters
keyKey name in database.
arrayReturns array that was read.

◆ getArray() [6/6]

void SAMRAI::tbox::Database::getArray ( const std::string &  key,
Array< int > &  array 
)
inherited

Get a integer entry from the database with the specified key name. If the specified key does not exist in the database or is not a integer array, then an error message is printed and the program exits.

Parameters
keyKey name in database.
arrayReturns array that was read.

◆ putArray() [1/6]

void SAMRAI::tbox::Database::putArray ( const std::string &  key,
const Array< bool array 
)
inherited

Create an bool array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
arrayArray to put into database.

◆ putArray() [2/6]

void SAMRAI::tbox::Database::putArray ( const std::string &  key,
const Array< char >  array 
)
inherited

Create an char array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
arrayArray to put into database.

◆ putArray() [3/6]

void SAMRAI::tbox::Database::putArray ( const std::string &  key,
const Array< dcomplex array 
)
inherited

Create an complex array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
arrayArray to put into database.

◆ putArray() [4/6]

void SAMRAI::tbox::Database::putArray ( const std::string &  key,
const Array< float >  array 
)
inherited

Create an float array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
arrayArray to put into database.

◆ putArray() [5/6]

void SAMRAI::tbox::Database::putArray ( const std::string &  key,
const Array< double array 
)
inherited

Create an double array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
arrayArray to put into database.

◆ putArray() [6/6]

void SAMRAI::tbox::Database::putArray ( const std::string &  key,
const Array< int array 
)
inherited

Create an integer array entry in the database with the specified key name. If the key already exists in the database, then the old key record is deleted and the new one is silently created in its place.

Parameters
keyKey name in database.
arrayArray to put into database.

Member Data Documentation

◆ d_top_level_search_group

std::string SAMRAI::tbox::HDFDatabase::d_top_level_search_group
private

◆ d_group_to_search

std::string SAMRAI::tbox::HDFDatabase::d_group_to_search
private

◆ d_still_searching

int SAMRAI::tbox::HDFDatabase::d_still_searching
private

◆ d_found_group

int SAMRAI::tbox::HDFDatabase::d_found_group
private

◆ d_is_file

bool SAMRAI::tbox::HDFDatabase::d_is_file
private

◆ d_file_id

hid_t SAMRAI::tbox::HDFDatabase::d_file_id
private

Is either -1 (not mounted to file) or set to the return value from opening a file. Set to -1 on unmounting the file.

◆ d_group_id

hid_t SAMRAI::tbox::HDFDatabase::d_group_id
private

A database object is always attached to a group. The group id is set in the constructor when constructing from a group. If the object mounts a file, the group id is the file id.

◆ d_database_name

std::string SAMRAI::tbox::HDFDatabase::d_database_name
private

◆ d_keydata

List<KeyData> SAMRAI::tbox::HDFDatabase::d_keydata
private

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