NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
NOX::GlobalData Class Reference

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

#include <NOX_GlobalData.H>

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.
 
void initialize (const Teuchos::RCP< Teuchos::ParameterList > &noxParams)
 
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. More...
 
Teuchos::RCP< const
NOX::SolverStats
getSolverStatistics () const
 Returns const version of solver statistics.
 
Teuchos::RCP< NOX::SolverStatsgetNonConstSolverStatistics ()
 Returns non-const version of solver statistics.
 

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 not safe in many contexts (threading). In particular, this approach allows multiple NOX "invocations" to be in memory at the same time.

Member Function Documentation

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.

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

Initiialize the global data from a top level (validated) nox parameter list.

References Teuchos::ParameterList::get(), is_null(), Teuchos::ParameterList::isType(), Teuchos::rcp(), and Teuchos::ParameterList::sublist().

Referenced by GlobalData().


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