#include <source/mathops/hierarchy/HierarchyDataOpsManager.h>
Public Member Functions | |
Getting operators. | |
If a unique operator object is not requested, and if one already exists for the hierarchy and variable specified, the existing one will be created and returned. Otherwise, a new one is created. Objects created created for unique requests will not be used later when an equivalent request is made. | |
virtual tbox::Pointer< HierarchyDataOpsReal< DIM, double > > | getOperationsDouble (const tbox::Pointer< hier::Variable< DIM > > &variable, tbox::Pointer< hier::PatchHierarchy< DIM > > &hierarchy, bool get_unique=false) |
Return pointer to operation object for a double variable on the given hierarchy. | |
virtual tbox::Pointer< HierarchyDataOpsInteger< DIM > > | getOperationsInteger (const tbox::Pointer< hier::Variable< DIM > > &variable, tbox::Pointer< hier::PatchHierarchy< DIM > > &hierarchy, bool get_unique=false) |
Return pointer to operation object for a integer variable on the given hierarchy. | |
Static Public Member Functions | |
static HierarchyDataOpsManager< DIM > * | getManager () |
static void | freeManager () |
Protected Member Functions | |
HierarchyDataOpsManager () | |
virtual | ~HierarchyDataOpsManager () |
void | registerSingletonSubclassInstance (HierarchyDataOpsManager< DIM > *subclass_instance) |
Important note: This manager class is incomplete. Specifically, one cannot set an operation object to over-ride the default . This feature will be added in the near future.
Important note: If the manager must construct a new hierarchy data operation object, the range of levels used in the operation object must be set explicitly before the operations can be used.
See the Design Patterns book by Gamma {et al.} for more information about the singleton pattern.
SAMRAI::math::HierarchyDataOpsManager< DIM >::HierarchyDataOpsManager | ( | ) | [protected] |
The constructor for HierarchyDataOpsManager<DIM> is protected. Consistent with the definition of a Singleton class, only subclasses have access to the constructor for the class.
SAMRAI::math::HierarchyDataOpsManager< DIM >::~HierarchyDataOpsManager | ( | ) | [protected, virtual] |
The destructor for HierarchyDataOpsManager<DIM> is protected. See the comments for the constructor.
HierarchyDataOpsManager< DIM > * SAMRAI::math::HierarchyDataOpsManager< DIM >::getManager | ( | ) | [static] |
Return a pointer to the single instance of the patch data operation manager. All access to the HierarchyDataOpsManager<DIM> object is through the getManager() function. For example, to obtain a pointer to a hierarchy data operation object appropriate for a variable of type double one makes the following call: HierarchyDataOpsManager<DIM>::getManager()->getOperationsDouble( var, hierarchy), where ``var'' is a pointer to the variable, and hierarchy is a pointer to the AMR hierarchy.
Note that when the manager is accessed for the first time, the Singleton instance is registered with the ShutdownRegistry class which destroys such objects at program completion. Thus, users of this class do not explicitly allocate or deallocate the Singleton instance.
void SAMRAI::math::HierarchyDataOpsManager< DIM >::freeManager | ( | ) | [static] |
Deallocate the HierarchyDataOpsManager instance. It is not necessary to explicitly call freeManager() at program termination, since it is automatically called by the ShutdownRegistry class.
tbox::Pointer< HierarchyDataOpsReal< DIM, double > > SAMRAI::math::HierarchyDataOpsManager< DIM >::getOperationsDouble | ( | const tbox::Pointer< hier::Variable< DIM > > & | variable, | |
tbox::Pointer< hier::PatchHierarchy< DIM > > & | hierarchy, | |||
bool | get_unique = false | |||
) | [virtual] |
Return pointer to operation object for a double variable on the given hierarchy.
Return pointer to operation object for a double variable on the given hierarchy.
If a unique operator object is not requested, and if one already exists for the hierarchy and variable specified, the existing one will be created and returned. Otherwise, a new one is created. Objects created created for unique requests will not be used later when an equivalent request is made.
variable | operation should correspond to this variable |
hierarchy | operation should correspond to this hierarchy |
get_unique | Whether a unique operator is requested |
tbox::Pointer< HierarchyDataOpsInteger< DIM > > SAMRAI::math::HierarchyDataOpsManager< DIM >::getOperationsInteger | ( | const tbox::Pointer< hier::Variable< DIM > > & | variable, | |
tbox::Pointer< hier::PatchHierarchy< DIM > > & | hierarchy, | |||
bool | get_unique = false | |||
) | [virtual] |
Return pointer to operation object for a integer variable on the given hierarchy.
Return pointer to operation object for an integer variable on the given hierarchy.
If a unique operator object is not requested, and if one already exists for the hierarchy and variable specified, the existing one will be created and returned. Otherwise, a new one is created. Objects created created for unique requests will not be used later when an equivalent request is made.
variable | operation should correspond to this variable |
hierarchy | operation should correspond to this hierarchy |
get_unique | Whether a unique operator is requested |
void SAMRAI::math::HierarchyDataOpsManager< DIM >::registerSingletonSubclassInstance | ( | HierarchyDataOpsManager< DIM > * | subclass_instance | ) | [protected] |
Initialize Singleton instance with instance of subclass. This function is used to make the singleton object unique when inheriting from this base class.