NOX::Direction::UserDefinedFactoryT< T > Class Template Reference

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

#include <NOX_Direction_UserDefinedFactoryT.H>

Inheritance diagram for NOX::Direction::UserDefinedFactoryT< T >:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 UserDefinedFactoryT ()
 Constructor.
 ~UserDefinedFactoryT ()
 Destructor.
Teuchos::RCP
< NOX::Direction::Generic
buildDirection (const Teuchos::RCP< NOX::GlobalData > &gd, Teuchos::ParameterList &params) const
 Builds a user defined direction object.


Detailed Description

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

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

If the user writes their own direction and that object has the same constructor arguments as the nox directions (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 direction object:

   class MyDirection : public NOX::Direction::Generic {
   
     // Ctor that takes the standard direction arguments.
     MyDirection(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("Direction");
   RCP<NOX::Direction::UserDefinedFactory> uddf =
     rcp(new NOX::Direction::UserDefinedFactoryT<MyDirection>);
   dl.set("User Defined Direction Factory", uddf);

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

Definition at line 90 of file NOX_Direction_UserDefinedFactoryT.H.


Constructor & Destructor Documentation

template<typename T >
NOX::Direction::UserDefinedFactoryT< T >::UserDefinedFactoryT (  )  [inline]

Constructor.

Definition at line 95 of file NOX_Direction_UserDefinedFactoryT.H.

template<typename T >
NOX::Direction::UserDefinedFactoryT< T >::~UserDefinedFactoryT (  )  [inline]

Destructor.

Definition at line 98 of file NOX_Direction_UserDefinedFactoryT.H.


Member Function Documentation

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

Builds a user defined direction object.

Parameters:
gd A global data pointer that contains the top level parameter list. Without storing this inside the direction object, there is no guarantee that the second parameter params will still exist. It can be deleted by the top level RCP.
params Sublist with direction construction parameters.

Implements NOX::Direction::UserDefinedFactory.

Definition at line 101 of file NOX_Direction_UserDefinedFactoryT.H.


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

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