NOX::GlobalData Class Reference

Container class to hold "global" NOX objects. More...

#include <NOX_GlobalData.H>

List of all members.

Public Member Functions

 GlobalData (const Teuchos::RCP< Teuchos::ParameterList > &noxParams)
 Consturctor using the top level NOX parameter list.
 GlobalData (const Teuchos::RCP< NOX::Utils > &utils, const Teuchos::RCP< NOX::MeritFunction::Generic > &mf)
 Constructor taking a ref-count pointer to each global object.
virtual ~GlobalData ()
 Destructor.
Teuchos::RCP< NOX::UtilsgetUtils () const
 Returns the print utils object.
Teuchos::RCP
< NOX::MeritFunction::Generic
getMeritFunction () const
 Returns the merit function object.
Teuchos::RCP
< Teuchos::ParameterList > 
getNoxParameterList () const
 Returns the top-level nox parameter list input by the user.

Private Member Functions

 GlobalData (const GlobalData &)
 Copy constructor is private to preclude copying.
GlobalDataoperator= (const GlobalData &)
 Assignment operator is private to preclude copying.

Private Attributes

Teuchos::RCP< NOX::UtilsutilsPtr
 Ref-count pointer to NOX::Utils object.
Teuchos::RCP
< NOX::MeritFunction::Generic
meritFunctionPtr
 Ref-count pointer to a NOX::MeritFunction::Generic object.
Teuchos::RCP
< Teuchos::ParameterList > 
paramListPtr
 The top-level nox parameter list input by the user.


Detailed Description

Container class to hold "global" NOX objects.

GlobalData is a container class that holds ref-count pointers to "global" objects, i.e., objects that nearly every NOX object will need access to. By putting them all in one container class, the container class can be stored in each NOX object, and if a new global object is needed, it can be added here without modifying the rest of the code. This is an alternative to true global or static objects which are note safe in many contexts (threading). In particular, this approach allows multiple NOX "invocations" to be in memory at the same time.

Definition at line 71 of file NOX_GlobalData.H.


Constructor & Destructor Documentation

NOX::GlobalData::GlobalData ( const Teuchos::RCP< Teuchos::ParameterList > &  noxParams  ) 

Consturctor using the top level NOX parameter list.

Definition at line 47 of file NOX_GlobalData.C.

References meritFunctionPtr, paramListPtr, and utilsPtr.

NOX::GlobalData::GlobalData ( const Teuchos::RCP< NOX::Utils > &  utils,
const Teuchos::RCP< NOX::MeritFunction::Generic > &  mf 
)

Constructor taking a ref-count pointer to each global object.

Definition at line 72 of file NOX_GlobalData.C.

NOX::GlobalData::~GlobalData (  )  [virtual]

Destructor.

Definition at line 80 of file NOX_GlobalData.C.

NOX::GlobalData::GlobalData ( const GlobalData  )  [private]

Copy constructor is private to preclude copying.


Member Function Documentation

Teuchos::RCP< NOX::Utils > NOX::GlobalData::getUtils (  )  const

Returns the print utils object.

Definition at line 86 of file NOX_GlobalData.C.

References utilsPtr.

Teuchos::RCP< NOX::MeritFunction::Generic > NOX::GlobalData::getMeritFunction (  )  const

Returns the merit function object.

Definition at line 92 of file NOX_GlobalData.C.

References meritFunctionPtr.

Teuchos::RCP< Teuchos::ParameterList > NOX::GlobalData::getNoxParameterList (  )  const

Returns the top-level nox parameter list input by the user.

This list is kept in global data so that any sublists of the main parameters list that objects may keep a refernece to is still valid. The line searches and directions usually store data in an output sublist for the users to query. These sublists are NOT wrapped in reference counted smart pointers, so if the base list is deleted, the references to the sublist will no longer be valid. To remedy this, any object that stores a reference to a sublist should also store the global data object.

Definition at line 98 of file NOX_GlobalData.C.

References paramListPtr.

GlobalData& NOX::GlobalData::operator= ( const GlobalData  )  [private]

Assignment operator is private to preclude copying.


Member Data Documentation

Teuchos::RCP<NOX::Utils> NOX::GlobalData::utilsPtr [private]

Ref-count pointer to NOX::Utils object.

Definition at line 120 of file NOX_GlobalData.H.

Referenced by getUtils(), and GlobalData().

Ref-count pointer to a NOX::MeritFunction::Generic object.

Definition at line 130 of file NOX_GlobalData.H.

Referenced by getMeritFunction(), and GlobalData().

Teuchos::RCP<Teuchos::ParameterList> NOX::GlobalData::paramListPtr [private]

The top-level nox parameter list input by the user.

This list is kept in global data so that any sublists of the main parameters list that objects may keep a refernece to is still valid. The line searches and directions usually store data in an output sublist for the users to query. These sublists are NOT wrapped in reference counted smart pointers, so if the base list is deleted, the references to the sublist will no longer be valid. To remedy this, any object that stores a reference to a sublist should also store the global data object.

Definition at line 144 of file NOX_GlobalData.H.

Referenced by getNoxParameterList(), and GlobalData().


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

Generated on Wed Oct 21 14:28:43 2009 for Nonlinear Solver Project by  doxygen 1.5.9