#include <NOX_Solver_LineSearchBased.H>
Public Member Functions | |
LineSearchBased (const Teuchos::RCP< NOX::Abstract::Group > &grp, const Teuchos::RCP< NOX::StatusTest::Generic > &tests, const Teuchos::RCP< Teuchos::ParameterList > ¶ms) | |
Constructor. | |
virtual | ~LineSearchBased () |
Destructor. | |
virtual void | reset (const NOX::Abstract::Vector &initialGuess, const Teuchos::RCP< NOX::StatusTest::Generic > &tests) |
Resets the solver, sets a new status test, and sets a new initial guess. | |
virtual void | reset (const NOX::Abstract::Vector &initialGuess) |
Resets the solver and sets a new initial guess. | |
virtual NOX::StatusTest::StatusType | getStatus () |
Check current convergence and failure status. | |
virtual NOX::StatusTest::StatusType | step () |
Do one nonlinear step in the iteration sequence and return status. | |
virtual NOX::StatusTest::StatusType | solve () |
Solve the nonlinear problem and return final status. | |
virtual const NOX::Abstract::Group & | getSolutionGroup () const |
Return a reference to the current solution group. | |
virtual const NOX::Abstract::Group & | getPreviousSolutionGroup () const |
Return a reference to the previous solution group. | |
virtual int | getNumIterations () const |
Get number of iterations. | |
virtual const Teuchos::ParameterList & | getList () const |
Return a refernece to the solver parameters. | |
virtual double | getStepSize () const |
Return the line search step size from the current iteration. | |
Protected Member Functions | |
virtual void | init () |
Print out initialization information and calcuation the RHS. | |
virtual void | printUpdate () |
Prints the current iteration information. | |
Protected Attributes | |
Teuchos::RCP< NOX::GlobalData > | globalDataPtr |
Pointer to the global data object. | |
Teuchos::RCP< NOX::Utils > | utilsPtr |
Utils. | |
Teuchos::RCP < NOX::Abstract::Group > | solnPtr |
Current solution. | |
Teuchos::RCP < NOX::Abstract::Group > | oldSolnPtr |
Previous solution pointer. | |
Teuchos::RCP < NOX::Abstract::Vector > | dirPtr |
Current search direction pointer. | |
Teuchos::RCP < NOX::StatusTest::Generic > | testPtr |
Stopping test. | |
Teuchos::RCP < Teuchos::ParameterList > | paramsPtr |
Input parameters. | |
Teuchos::RCP < NOX::LineSearch::Generic > | lineSearchPtr |
Linesearch. | |
Teuchos::RCP < NOX::Direction::Generic > | directionPtr |
Search Direction. | |
double | stepSize |
Current step. | |
int | nIter |
Number of nonlinear iterations. | |
NOX::StatusTest::StatusType | status |
Status of nonlinear solver. | |
NOX::StatusTest::CheckType | checkType |
Type of check to use for status tests. See NOX::StatusTest for more details. | |
NOX::Solver::PrePostOperator | prePostOperator |
Pointer to a user defined NOX::Abstract::PrePostOperator object. |
Solves using an iterative line-search-based method.
Each iteration, the solver does the following.
The iterations progress until the status tests (see NOX::StatusTest) determine either failure or convergence.
The following parameter list entries are valid for this solver:
Output Parameters
Every time solve() is called, a sublist for output parameters called "Output" will be created and contain the following parameters.
"Output":
Definition at line 117 of file NOX_Solver_LineSearchBased.H.
NOX::Solver::LineSearchBased::LineSearchBased | ( | const Teuchos::RCP< NOX::Abstract::Group > & | grp, | |
const Teuchos::RCP< NOX::StatusTest::Generic > & | tests, | |||
const Teuchos::RCP< Teuchos::ParameterList > & | params | |||
) |
Constructor.
See reset(NOX::Abstract::Group&, NOX::StatusTest::Generic&, Teuchos::ParameterList&) for description
Definition at line 56 of file NOX_Solver_LineSearchBased.C.
References NOX::DeepCopy, init(), and NOX::ShapeCopy.
NOX::Solver::LineSearchBased::~LineSearchBased | ( | ) | [virtual] |
void NOX::Solver::LineSearchBased::reset | ( | const NOX::Abstract::Vector & | initial_guess, | |
const Teuchos::RCP< NOX::StatusTest::Generic > & | test | |||
) | [virtual] |
Resets the solver, sets a new status test, and sets a new initial guess.
Implements NOX::Solver::Generic.
Definition at line 97 of file NOX_Solver_LineSearchBased.C.
void NOX::Solver::LineSearchBased::reset | ( | const NOX::Abstract::Vector & | initial_guess | ) | [virtual] |
Resets the solver and sets a new initial guess.
Implements NOX::Solver::Generic.
Definition at line 106 of file NOX_Solver_LineSearchBased.C.
NOX::StatusTest::StatusType NOX::Solver::LineSearchBased::getStatus | ( | ) | [virtual] |
Check current convergence and failure status.
Implements NOX::Solver::Generic.
Definition at line 118 of file NOX_Solver_LineSearchBased.C.
References status.
NOX::StatusTest::StatusType NOX::Solver::LineSearchBased::step | ( | ) | [virtual] |
Do one nonlinear step in the iteration sequence and return status.
Implements NOX::Solver::Generic.
Definition at line 123 of file NOX_Solver_LineSearchBased.C.
References NOX::StatusTest::Generic::checkStatus(), checkType, NOX::Abstract::Group::computeF(), NOX::StatusTest::Converged, directionPtr, dirPtr, NOX::StatusTest::Failed, lineSearchPtr, nIter, NOX::Abstract::Group::Ok, oldSolnPtr, prePostOperator, printUpdate(), NOX::Solver::PrePostOperator::runPostIterate(), NOX::Solver::PrePostOperator::runPreIterate(), solnPtr, status, stepSize, testPtr, NOX::StatusTest::Unconverged, utilsPtr, and NOX::Utils::Warning.
Referenced by solve().
NOX::StatusTest::StatusType NOX::Solver::LineSearchBased::solve | ( | ) | [virtual] |
Solve the nonlinear problem and return final status.
By "solve", we call iterate() until the NOX::StatusTest value is either NOX::StatusTest::Converged or NOX::StatusTest::Failed.
Implements NOX::Solver::Generic.
Definition at line 218 of file NOX_Solver_LineSearchBased.C.
References nIter, paramsPtr, prePostOperator, NOX::Solver::PrePostOperator::runPostSolve(), NOX::Solver::PrePostOperator::runPreSolve(), solnPtr, status, step(), and NOX::StatusTest::Unconverged.
const NOX::Abstract::Group & NOX::Solver::LineSearchBased::getSolutionGroup | ( | ) | const [virtual] |
Return a reference to the current solution group.
Implements NOX::Solver::Generic.
Definition at line 236 of file NOX_Solver_LineSearchBased.C.
References solnPtr.
const NOX::Abstract::Group & NOX::Solver::LineSearchBased::getPreviousSolutionGroup | ( | ) | const [virtual] |
Return a reference to the previous solution group.
Implements NOX::Solver::Generic.
Definition at line 242 of file NOX_Solver_LineSearchBased.C.
References oldSolnPtr.
Referenced by NOX::Direction::Broyden::compute(), and NOX::Direction::Broyden::doRestart().
int NOX::Solver::LineSearchBased::getNumIterations | ( | ) | const [virtual] |
Get number of iterations.
Implements NOX::Solver::Generic.
Definition at line 247 of file NOX_Solver_LineSearchBased.C.
References nIter.
Referenced by NOX::Direction::Broyden::compute(), and NOX::Direction::Broyden::doRestart().
const Teuchos::ParameterList & NOX::Solver::LineSearchBased::getList | ( | ) | const [virtual] |
Return a refernece to the solver parameters.
Implements NOX::Solver::Generic.
Definition at line 253 of file NOX_Solver_LineSearchBased.C.
References paramsPtr.
double NOX::Solver::LineSearchBased::getStepSize | ( | ) | const [virtual] |
Return the line search step size from the current iteration.
Definition at line 307 of file NOX_Solver_LineSearchBased.C.
References stepSize.
Referenced by NOX::Direction::Broyden::compute(), NOX::Direction::Utils::InexactNewton::computeForcingTerm(), NOX::Direction::Broyden::doRestart(), and NOX::Direction::Newton::resetForcingTerm().
void NOX::Solver::LineSearchBased::init | ( | ) | [protected, virtual] |
Print out initialization information and calcuation the RHS.
Definition at line 72 of file NOX_Solver_LineSearchBased.C.
References checkType, directionPtr, NOX::Utils::fill(), globalDataPtr, lineSearchPtr, nIter, NOX::Utils::Parameters, paramsPtr, NOX::Solver::parseStatusTestCheckType(), status, stepSize, NOX::StatusTest::Unconverged, and utilsPtr.
Referenced by LineSearchBased(), and reset().
void NOX::Solver::LineSearchBased::printUpdate | ( | ) | [protected, virtual] |
Prints the current iteration information.
Definition at line 259 of file NOX_Solver_LineSearchBased.C.
References NOX::StatusTest::Converged, dirPtr, NOX::StatusTest::Failed, NOX::Utils::fill(), nIter, NOX::Utils::OuterIteration, NOX::Utils::OuterIterationStatusTest, solnPtr, status, stepSize, testPtr, NOX::StatusTest::Unconverged, and utilsPtr.
Referenced by step().
Teuchos::RCP<NOX::GlobalData> NOX::Solver::LineSearchBased::globalDataPtr [protected] |
Pointer to the global data object.
Definition at line 157 of file NOX_Solver_LineSearchBased.H.
Referenced by init().
Teuchos::RCP<NOX::Utils> NOX::Solver::LineSearchBased::utilsPtr [protected] |
Definition at line 160 of file NOX_Solver_LineSearchBased.H.
Referenced by init(), printUpdate(), and step().
Teuchos::RCP<NOX::Abstract::Group> NOX::Solver::LineSearchBased::solnPtr [protected] |
Current solution.
Definition at line 163 of file NOX_Solver_LineSearchBased.H.
Referenced by getSolutionGroup(), printUpdate(), reset(), solve(), and step().
Teuchos::RCP<NOX::Abstract::Group> NOX::Solver::LineSearchBased::oldSolnPtr [protected] |
Previous solution pointer.
Definition at line 166 of file NOX_Solver_LineSearchBased.H.
Referenced by getPreviousSolutionGroup(), and step().
Teuchos::RCP<NOX::Abstract::Vector> NOX::Solver::LineSearchBased::dirPtr [protected] |
Current search direction pointer.
Definition at line 169 of file NOX_Solver_LineSearchBased.H.
Referenced by printUpdate(), and step().
Teuchos::RCP<NOX::StatusTest::Generic> NOX::Solver::LineSearchBased::testPtr [protected] |
Stopping test.
Definition at line 172 of file NOX_Solver_LineSearchBased.H.
Referenced by printUpdate(), reset(), and step().
Teuchos::RCP<Teuchos::ParameterList> NOX::Solver::LineSearchBased::paramsPtr [protected] |
Teuchos::RCP<NOX::LineSearch::Generic> NOX::Solver::LineSearchBased::lineSearchPtr [protected] |
Teuchos::RCP<NOX::Direction::Generic> NOX::Solver::LineSearchBased::directionPtr [protected] |
double NOX::Solver::LineSearchBased::stepSize [protected] |
Current step.
Definition at line 184 of file NOX_Solver_LineSearchBased.H.
Referenced by getStepSize(), init(), printUpdate(), and step().
int NOX::Solver::LineSearchBased::nIter [protected] |
Number of nonlinear iterations.
Definition at line 187 of file NOX_Solver_LineSearchBased.H.
Referenced by getNumIterations(), init(), printUpdate(), solve(), and step().
Status of nonlinear solver.
Definition at line 190 of file NOX_Solver_LineSearchBased.H.
Referenced by getStatus(), init(), printUpdate(), solve(), and step().
Type of check to use for status tests. See NOX::StatusTest for more details.
Definition at line 193 of file NOX_Solver_LineSearchBased.H.
Pointer to a user defined NOX::Abstract::PrePostOperator object.
Definition at line 196 of file NOX_Solver_LineSearchBased.H.