#include <NOX_Direction_UserDefinedFactoryT.H>
Public Member Functions | |
UserDefinedFactoryT () | |
Constructor. | |
~UserDefinedFactoryT () | |
Destructor. | |
Teuchos::RCP < NOX::Direction::Generic > | buildDirection (const Teuchos::RCP< NOX::GlobalData > &gd, Teuchos::ParameterList ¶ms) const |
Builds a user defined direction object. |
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.
NOX::Direction::UserDefinedFactoryT< T >::UserDefinedFactoryT | ( | ) | [inline] |
NOX::Direction::UserDefinedFactoryT< T >::~UserDefinedFactoryT | ( | ) | [inline] |
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.
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.