NOX
Development
|
Factory to build direction objects derived from NOX::Direction::Generic. More...
#include <NOX_Direction_Factory.H>
Public Member Functions | |
Factory () | |
Constructor. | |
~Factory () | |
Destructor. | |
Teuchos::RCP < NOX::Direction::Generic > | buildDirection (const Teuchos::RCP< NOX::GlobalData > &gd, Teuchos::ParameterList ¶ms) |
Factory to build a direction object. More... | |
Related Functions | |
(Note that these are not member functions.) | |
Teuchos::RCP < NOX::Direction::Generic > | buildDirection (const Teuchos::RCP< NOX::GlobalData > &gd, Teuchos::ParameterList ¶ms) |
Factory to build direction objects derived from NOX::Direction::Generic.
Parameters
"Method" <std::string> Name of the direction. Valid choices are:
"User Defined Constructor" - see below
Using a User-Defined Direction
The user has the option of passing in a user-defined direction. First, they must implement their own direction, deriving from the base class interface NOX::Direction::Generic:
Next they must write a factory to build their object, deriving from the NOX::Direction::UserDefinedFactory base class interface:
Then under the "Direction" parameter sublist, they need to set the method to "User Defined" and register the factory:
It is critical that the user defined factory be set in the parameter list as a base class type object: NOX::Direction::UserDefinedFactory.
Teuchos::RCP< NOX::Direction::Generic > NOX::Direction::Factory::buildDirection | ( | const Teuchos::RCP< NOX::GlobalData > & | gd, |
Teuchos::ParameterList & | params | ||
) |
Factory to build a 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. |
References NOX::Direction::UserDefinedFactory::buildDirection(), Teuchos::ParameterList::get(), Teuchos::rcp(), and TEUCHOS_TEST_FOR_EXCEPTION.
|
related |
Nonmember function to build a direction object.