NOX Development
Loading...
Searching...
No Matches
NOX::SharedObject< Object, Owner > Class Template Reference

Holder for objects that are shared between NOX::Abstract::Groups. More...

#include <NOX_SharedObjectTemplate.H>

Inheritance diagram for NOX::SharedObject< Object, Owner >:

Public Member Functions

 SharedObject (const Teuchos::RCP< Object > &newObject)
 Constructor.
 ~SharedObject ()
 Destructor.
Teuchos::RCP< Object > getObject (const Owner *newOwner)
 Get a non-const reference to the underlying object.
Teuchos::RCP< const Object > getObject () const
 Return a const reference to the underlying object.
bool isOwner (const Owner *checkOwner) const
 Return true if testOwner is the owner of the Jacobian.

Protected Attributes

Teuchos::RCP< Object > object
 Pointer to the shared object.
const Owner * owner
 Pointer to const object that owns the shared object.

Detailed Description

template<class Object, class Owner>
class NOX::SharedObject< Object, Owner >

Holder for objects that are shared between NOX::Abstract::Groups.

Due to the size of certain operators (i.e. the Jacobian and Preconditioning Matrices), we cannot afford to have multiple copies. Instead we implement a shared object class that that all groups use.

Constructor & Destructor Documentation

◆ SharedObject()

template<class Object, class Owner>
NOX::SharedObject< Object, Owner >::SharedObject ( const Teuchos::RCP< Object > & newObject)
inline

Constructor.

References object, and owner.

Member Function Documentation

◆ getObject() [1/2]

template<class Object, class Owner>
Teuchos::RCP< const Object > NOX::SharedObject< Object, Owner >::getObject ( ) const
inline

Return a const reference to the underlying object.

References object.

◆ getObject() [2/2]

◆ isOwner()

template<class Object, class Owner>
bool NOX::SharedObject< Object, Owner >::isOwner ( const Owner * checkOwner) const
inline

Return true if testOwner is the owner of the Jacobian.

References owner.

Referenced by NOX::Epetra::Group::isJacobian(), and NOX::Epetra::Group::isPreconditioner().

Member Data Documentation

◆ object

template<class Object, class Owner>
Teuchos::RCP<Object> NOX::SharedObject< Object, Owner >::object
protected

Pointer to the shared object.

Referenced by getObject(), getObject(), and SharedObject().

◆ owner

template<class Object, class Owner>
const Owner* NOX::SharedObject< Object, Owner >::owner
protected

Pointer to const object that owns the shared object.

Referenced by getObject(), isOwner(), and SharedObject().


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