IBAMR  IBAMR version 0.19.
Static Public Member Functions | List of all members
SAMRAI::math::HierarchyDataOpsManager< DIM > Class Template Reference

#include <HierarchyDataOpsManager.h>

Static Public Member Functions

static HierarchyDataOpsManager< DIM > * getManager ()
 
static void freeManager ()
 

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.

static HierarchyDataOpsManager< DIM > * s_pdat_op_manager_instance
 
static bool s_registered_callback
 
tbox::Array< tbox::Pointer< HierarchyDataOpsReal< DIM, double > > > d_cell_ops_double
 
tbox::Array< tbox::Pointer< HierarchyDataOpsReal< DIM, double > > > d_face_ops_double
 
tbox::Array< tbox::Pointer< HierarchyDataOpsReal< DIM, double > > > d_node_ops_double
 
tbox::Array< tbox::Pointer< HierarchyDataOpsReal< DIM, double > > > d_side_ops_double
 
tbox::Array< tbox::Pointer< HierarchyDataOpsReal< DIM, double > > > d_edge_ops_double
 
tbox::Array< tbox::Pointer< HierarchyDataOpsComplex< DIM > > > d_cell_ops_complex
 
tbox::Array< tbox::Pointer< HierarchyDataOpsComplex< DIM > > > d_face_ops_complex
 
tbox::Array< tbox::Pointer< HierarchyDataOpsComplex< DIM > > > d_side_ops_complex
 
tbox::Array< tbox::Pointer< HierarchyDataOpsComplex< DIM > > > d_node_ops_complex
 
tbox::Array< tbox::Pointer< HierarchyDataOpsComplex< DIM > > > d_edge_ops_complex
 
tbox::Array< tbox::Pointer< HierarchyDataOpsInteger< DIM > > > d_cell_ops_int
 
tbox::Array< tbox::Pointer< HierarchyDataOpsInteger< DIM > > > d_face_ops_int
 
tbox::Array< tbox::Pointer< HierarchyDataOpsInteger< DIM > > > d_side_ops_int
 
tbox::Array< tbox::Pointer< HierarchyDataOpsInteger< DIM > > > d_node_ops_int
 
tbox::Array< tbox::Pointer< HierarchyDataOpsInteger< DIM > > > d_edge_ops_int
 
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. More...
 
virtual tbox::Pointer< HierarchyDataOpsComplex< DIM > > getOperationsComplex (const tbox::Pointer< hier::Variable< DIM > > &variable, tbox::Pointer< hier::PatchHierarchy< DIM > > &hierarchy, bool get_unique=false)
 Return pointer to operation object for a complex variable on the given hierarchy. More...
 
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. More...
 
 HierarchyDataOpsManager ()
 
virtual ~HierarchyDataOpsManager ()
 
void registerSingletonSubclassInstance (HierarchyDataOpsManager< DIM > *subclass_instance)
 

Detailed Description

template<int DIM>
class SAMRAI::math::HierarchyDataOpsManager< DIM >

Class HierarchyDataOpsManager<DIM> is a Singleton class that serves as a single point of control for gaining access to operation objects which to treat patch data over multiple levels in an AMR hierarchy. Specifically, this manager returns a pointer to a hierarchy data operation object given a variable and a hierarchy. Currently, this manager class supports patch data operation objects for cell-, face-, and node-centered data of type double, float, integer and dcomplex. Although it may be used to manage data operations for multiple patch hierarchies, it supports only one data operations per variable centering and data type per hierarchy. The manager will create and return a default hierarchy operation object when queried for an operation object if the operation does not already exist. If a matching operation object exists and is known to the manager, that operation object will be returned. This manager class may be extended using class inheritance and implementing a manager subclass. So, for example, if more than one operation object per variable type is needed on a hierarchy, such inheritance should be used to add this capability to the manager.

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.

See also
math::HierarchyDataOpsComplex
math::HierarchyDataOpsInteger
math::HierarchyDataOpsReal

Constructor & Destructor Documentation

◆ HierarchyDataOpsManager()

template<int DIM>
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.

◆ ~HierarchyDataOpsManager()

template<int DIM>
virtual SAMRAI::math::HierarchyDataOpsManager< DIM >::~HierarchyDataOpsManager ( )
protectedvirtual

The destructor for HierarchyDataOpsManager<DIM> is protected.
See the comments for the constructor.

Member Function Documentation

◆ getManager()

template<int DIM>
static 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.

◆ freeManager()

template<int DIM>
static 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.

◆ getOperationsDouble()

template<int DIM>
virtual 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
Parameters
variableoperation should correspond to this variable
hierarchyoperation should correspond to this hierarchy
get_uniqueWhether a unique operator is requested

◆ getOperationsComplex()

template<int DIM>
virtual tbox::Pointer< HierarchyDataOpsComplex<DIM> > SAMRAI::math::HierarchyDataOpsManager< DIM >::getOperationsComplex ( const tbox::Pointer< hier::Variable< DIM > > &  variable,
tbox::Pointer< hier::PatchHierarchy< DIM > > &  hierarchy,
bool  get_unique = false 
)
virtual
Parameters
variableoperation should correspond to this variable
hierarchyoperation should correspond to this hierarchy
get_uniqueWhether a unique operator is requested

◆ getOperationsInteger()

template<int DIM>
virtual 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
Parameters
variableoperation should correspond to this variable
hierarchyoperation should correspond to this hierarchy
get_uniqueWhether a unique operator is requested

◆ registerSingletonSubclassInstance()

template<int DIM>
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.

Member Data Documentation

◆ s_pdat_op_manager_instance

template<int DIM>
HierarchyDataOpsManager<DIM>* SAMRAI::math::HierarchyDataOpsManager< DIM >::s_pdat_op_manager_instance
staticprivate

◆ s_registered_callback

template<int DIM>
bool SAMRAI::math::HierarchyDataOpsManager< DIM >::s_registered_callback
staticprivate

◆ d_cell_ops_double

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsReal<DIM,double> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_cell_ops_double
private

◆ d_face_ops_double

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsReal<DIM,double> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_face_ops_double
private

◆ d_node_ops_double

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsReal<DIM,double> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_node_ops_double
private

◆ d_side_ops_double

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsReal<DIM,double> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_side_ops_double
private

◆ d_edge_ops_double

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsReal<DIM,double> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_edge_ops_double
private

◆ d_cell_ops_complex

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsComplex<DIM> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_cell_ops_complex
private

◆ d_face_ops_complex

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsComplex<DIM> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_face_ops_complex
private

◆ d_side_ops_complex

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsComplex<DIM> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_side_ops_complex
private

◆ d_node_ops_complex

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsComplex<DIM> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_node_ops_complex
private

◆ d_edge_ops_complex

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsComplex<DIM> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_edge_ops_complex
private

◆ d_cell_ops_int

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsInteger<DIM> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_cell_ops_int
private

◆ d_face_ops_int

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsInteger<DIM> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_face_ops_int
private

◆ d_side_ops_int

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsInteger<DIM> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_side_ops_int
private

◆ d_node_ops_int

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsInteger<DIM> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_node_ops_int
private

◆ d_edge_ops_int

template<int DIM>
tbox::Array< tbox::Pointer< HierarchyDataOpsInteger<DIM> > > SAMRAI::math::HierarchyDataOpsManager< DIM >::d_edge_ops_int
private

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