NOX Development
Public Member Functions
NOX::LineSearch::UserDefinedFactoryT< T > Class Template Reference

Concrete instantiation of a NOX::LineSearch::UserDefinedFactory object that uses the base objects only for constuction. More...

#include <NOX_LineSearch_UserDefinedFactoryT.H>

Inheritance diagram for NOX::LineSearch::UserDefinedFactoryT< T >:
Inheritance graph
[legend]
Collaboration diagram for NOX::LineSearch::UserDefinedFactoryT< T >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 UserDefinedFactoryT ()
 Constructor.
 ~UserDefinedFactoryT ()
 Destructor.
Teuchos::RCP
< NOX::LineSearch::Generic
buildLineSearch (const Teuchos::RCP< NOX::GlobalData > &gd, Teuchos::ParameterList &params) const
 Builds a user defined line search object.

Detailed Description

template<typename T>
class NOX::LineSearch::UserDefinedFactoryT< T >

Concrete instantiation of a NOX::LineSearch::UserDefinedFactory object that uses the base objects only for constuction.

If the user writes their own line search and that object has the same constructor arguments as the nox line searches (the gd and params as in the buildDirection method), then users can use this object instead of having to write their own factory.

For example, if a user writes their own line search object:

   class MyLineSearch : public NOX::LineSearch::Generic {
   
     // Ctor that takes the standard line search arguments.
     MyLineSearch(const Teuchos::RCP<NOX::GlobalData>& gd, 
                  Teuchos::ParameterList& params);

     .
     .
     .

   }

They can build that object using this factory and do not have to write their own factory

   ParameterList dl& = nox_params.sublist("Line Search");
   RCP<NOX::LineSearch::UserDefinedFactory> udlsf =
     rcp(new NOX::LineSearch::UserDefinedFactoryT<MyLineSearch>);
   dl.set("User Defined LineSearch Factory", udlsf);

It is critical that the user defined factory be set in the parameter list as a base class type object: NOX::LineSearch::UserDefinedFactory.


Member Function Documentation

template<typename T >
Teuchos::RCP<NOX::LineSearch::Generic> NOX::LineSearch::UserDefinedFactoryT< T >::buildLineSearch ( const Teuchos::RCP< NOX::GlobalData > &  gd,
Teuchos::ParameterList params 
) const [inline, virtual]

Builds a user defined line search object.

Parameters:
gdA global data pointer that contains the top level parameter list. Without storing this inside the line searchobject, there is no guarantee that the second parameter params will still exist. It can be deleted by the top level RCP.
paramsSublist with line search construction parameters.

Implements NOX::LineSearch::UserDefinedFactory.

References rcp().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends