#include <source/hierarchy/variables/LocallyActiveVariableDatabase.h>
Inheritance diagram for SAMRAI::hier::LocallyActiveVariableDatabase< DIM >:
|
The constructor for LocallyActiveVariableDatabase<DIM> is protected. Consistent with the definition of a Singleton class, only the database object has access to the constructor for the class. The constructor initializes the state of database contents. |
|
The destructor for LocallyActiveVariableDatabase<DIM> is protected. See the comments for the constructor. The destructor deallocates database contents. |
|
Return a pointer to the singleton instance of the locally-active variable database. All access to the LocallyActiveVariableDatabase<DIM> object is through the getDatabase() function. For example, to access the variable with string name "my_variable", use the following call: LocallyActiveVariableDatabase<DIM>::getVariable()->getVariable("my_variable"). Note that there is no freeDatabase() static member function as one might expect for a Singleton class. This is unnecessary since the deallocation at program termination is handled by the VariableDatabase base class through the virtual destructor. Reimplemented from SAMRAI::hier::VariableDatabase< DIM >. |
|
Return pointer to the patch descriptor managed by the database (and shared by all patches in an SAMR hierarchy).
Reimplemented from SAMRAI::hier::VariableDatabase< DIM >. |
|
Return pointer to variable context shared by all locally-active variables registered with this database. |
|
Add the given variable and ghost cell width to the database of locally-active variables. This function is similar to the variable registration member functions in the VariableDatabase<DIM> class, but is more restrictive here since each variable can be registered with only one patch data index. This function imposes the same restrictions on uniqueness of variable names as the VariableDatabase<DIM> base class. Typically, this function will generate a new patch descriptor index for the variable and ghost cell width and add the variable-ghost cell width pair and index to the database. If the variable-ghost cell width pair is already mapped to some patch data identifier in the database, then that index will be returned and the function will do nothing. However, if the variable-ghost cell width pair is already mapped to some patch data identifier with a different ghost cell width, the program will abort with a descriptive error message.
|
|
Get variable in locally-active database with given name string identifier.
Reimplemented from SAMRAI::hier::VariableDatabase< DIM >. |
|
Check if variable with given name exists in the locally-active database.
Reimplemented from SAMRAI::hier::VariableDatabase< DIM >. |
|
Check if given variable exists in the locally-active database.
|
|
Check whether the given variable matches the type of the patch data at the given descriptor index. Note this check can be performed regardless of whether the variable and data index are in the variable database and so this function does not provide information about the contents of the database.
|
|
Map variable in database to patch data identifier. If variable is not in the database (i.e., it has not been added), then an invalid descriptor index (i.e., < 0) is returned.
|
|
Map patch data identifier to variable associated with the data, if possible, and set the variable pointer to the variable in the database.
Reimplemented from SAMRAI::hier::VariableDatabase< DIM >. |
|
Return level manager in the database that maintains active patch data information for the input level, if possible. Note that this database class only maintains level manager objects corresponding to patch levels that live in a patch hierarchy. Also, the number of the patch level for each corresponding manager must be unique. Thus, the following results are possible when this method is called:
|
|
Reset the level manager in the database that maintains active patch data information for the given level, if possible. Note that this database class only maintains level manager objects corresponding to patch levels that live in a patch hierarchy. Thus, if the input level does not live in a hierarchy, this method does nothing. Also, the number of the patch level for each corresponding manager must be unique. Thus, if the database owns a level manager associated with a patch level whose number matches the input level, the existing manager is removed from the database and is replaced with a new manager object for the given level. However, if one has a smart pointer to the pre-existing level manager, one can maintain that while resetting the one in the database as long as the pointer reference count remains greater than zero.
|
|
Print all variable, context, and patch descriptor information contained in the database to the specified output stream.
|
|
|