#include <NOX_Direction_Utils_InexactNewton.H>
Public Member Functions | |
InexactNewton (const Teuchos::RCP< NOX::GlobalData > &gd, Teuchos::ParameterList &directionSublist) | |
Constructor. | |
virtual | ~InexactNewton () |
Destructor. | |
virtual bool | reset (const Teuchos::RCP< NOX::GlobalData > &gd, Teuchos::ParameterList &directionSublist) |
Reset the utilities. | |
virtual double | computeForcingTerm (const NOX::Abstract::Group &soln, const NOX::Abstract::Group &oldSoln, int niter, const NOX::Solver::Generic &solver, double eta_last=-1.0) |
Private Types | |
enum | ForcingTermType { Constant, Type1, Type2 } |
Type of forcing term calculations available. More... | |
Private Member Functions | |
void | throwError (const string &functionName, const string &errorMsg) |
Print an error message. | |
Private Attributes | |
Teuchos::RCP< NOX::GlobalData > | globalDataPtr |
Global data pointer. Keep this so the parameter list remains valid. | |
Teuchos::RCP< NOX::Utils > | printing |
Printing Utilities. | |
ForcingTermType | forcingTermMethod |
Type of forcing term calculation to use. | |
Teuchos::ParameterList * | paramsPtr |
"Inexact Newton" sublist with parameters for the direction vector | |
Teuchos::RCP < NOX::Abstract::Vector > | predRhs |
Vector containing the predicted RHS. | |
Teuchos::RCP < NOX::Abstract::Vector > | stepDir |
Vector containing the step direction. | |
double | eta_k |
Current linear solve tolerance. | |
double | eta_min |
Minimum linear solve tolerance. | |
double | eta_max |
Maximum linear solve tolerance. | |
double | eta_initial |
Initial linear solve tolerance. | |
string | method |
Name of the method used for calculating the inexact forcing term. | |
string | directionMethod |
Name of the direction method that forcing terms will be used by. | |
double | alpha |
Parameter used for Type 2 forcing term calculation. | |
double | gamma |
Parameter used for Type 2 forcing term calculation. | |
bool | setTolerance |
Determines whether to set the "Tolerance" in the parameter list. |
If we use an iterative linear solver for a Newton-based solve, then this is called an inexact Newton method. The tolerance used to terminate the linear solve is called the forcing term. The forcing term may be constant, or it may be adjustable. In either case, at iteration we require,
Here is the forcing term for iteration
.
With the following safeguards imposed:
With the following safeguards imposed:
Parameters
Definition at line 178 of file NOX_Direction_Utils_InexactNewton.H.
enum NOX::Direction::Utils::InexactNewton::ForcingTermType [private] |
Type of forcing term calculations available.
Definition at line 218 of file NOX_Direction_Utils_InexactNewton.H.
NOX::Direction::Utils::InexactNewton::InexactNewton | ( | const Teuchos::RCP< NOX::GlobalData > & | gd, | |
Teuchos::ParameterList & | directionSublist | |||
) |
NOX::Direction::Utils::InexactNewton::~InexactNewton | ( | ) | [virtual] |
bool NOX::Direction::Utils::InexactNewton::reset | ( | const Teuchos::RCP< NOX::GlobalData > & | gd, | |
Teuchos::ParameterList & | directionSublist | |||
) | [virtual] |
Reset the utilities.
Definition at line 75 of file NOX_Direction_Utils_InexactNewton.C.
References alpha, Constant, directionMethod, eta_initial, eta_k, eta_max, eta_min, forcingTermMethod, gamma, globalDataPtr, method, paramsPtr, printing, setTolerance, throwError(), Type1, and Type2.
Referenced by InexactNewton(), NOX::Solver::InexactTrustRegionBased::init(), and NOX::Direction::Broyden::reset().
double NOX::Direction::Utils::InexactNewton::computeForcingTerm | ( | const NOX::Abstract::Group & | soln, | |
const NOX::Abstract::Group & | oldSoln, | |||
int | niter, | |||
const NOX::Solver::Generic & | solver, | |||
double | eta_last = -1.0 | |||
) | [virtual] |
Called each iteration to reset the forcing term (ie, the convergence tolerance for the linear solver).
if the user supplied eta_last then it will use this value for eta_km1 instead of looking for it in the "Linear Solver" sublist.
Definition at line 122 of file NOX_Direction_Utils_InexactNewton.C.
References alpha, NOX::Abstract::Group::applyJacobian(), NOX::Abstract::Vector::clone(), Constant, NOX::Utils::Details, directionMethod, eta_initial, eta_k, eta_max, eta_min, forcingTermMethod, gamma, NOX::Abstract::Group::getF(), NOX::Abstract::Group::getNormF(), NOX::Solver::LineSearchBased::getStepSize(), NOX::Abstract::Group::getX(), NOX::Abstract::Group::isJacobian(), method, paramsPtr, predRhs, printing, setTolerance, NOX::ShapeCopy, stepDir, Type1, and Type2.
Referenced by NOX::Direction::Broyden::compute(), and NOX::Solver::InexactTrustRegionBased::iterateInexact().
void NOX::Direction::Utils::InexactNewton::throwError | ( | const string & | functionName, | |
const string & | errorMsg | |||
) | [private] |
Print an error message.
Definition at line 297 of file NOX_Direction_Utils_InexactNewton.C.
References NOX::Utils::Error, and printing.
Referenced by reset().
Teuchos::RCP<NOX::GlobalData> NOX::Direction::Utils::InexactNewton::globalDataPtr [private] |
Global data pointer. Keep this so the parameter list remains valid.
Definition at line 212 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by reset().
Teuchos::RCP<NOX::Utils> NOX::Direction::Utils::InexactNewton::printing [private] |
Printing Utilities.
Definition at line 215 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by computeForcingTerm(), reset(), and throwError().
Type of forcing term calculation to use.
Definition at line 228 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by computeForcingTerm(), and reset().
Teuchos::ParameterList* NOX::Direction::Utils::InexactNewton::paramsPtr [private] |
"Inexact Newton" sublist with parameters for the direction vector
Definition at line 235 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by computeForcingTerm(), and reset().
Teuchos::RCP<NOX::Abstract::Vector> NOX::Direction::Utils::InexactNewton::predRhs [private] |
Vector containing the predicted RHS.
Definition at line 238 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by computeForcingTerm().
Teuchos::RCP<NOX::Abstract::Vector> NOX::Direction::Utils::InexactNewton::stepDir [private] |
Vector containing the step direction.
Definition at line 241 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by computeForcingTerm().
double NOX::Direction::Utils::InexactNewton::eta_k [private] |
Current linear solve tolerance.
Definition at line 244 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by computeForcingTerm(), and reset().
double NOX::Direction::Utils::InexactNewton::eta_min [private] |
Minimum linear solve tolerance.
Definition at line 247 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by computeForcingTerm(), and reset().
double NOX::Direction::Utils::InexactNewton::eta_max [private] |
Maximum linear solve tolerance.
Definition at line 250 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by computeForcingTerm(), and reset().
double NOX::Direction::Utils::InexactNewton::eta_initial [private] |
Initial linear solve tolerance.
Definition at line 253 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by computeForcingTerm(), and reset().
string NOX::Direction::Utils::InexactNewton::method [private] |
Name of the method used for calculating the inexact forcing term.
Definition at line 256 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by computeForcingTerm(), and reset().
string NOX::Direction::Utils::InexactNewton::directionMethod [private] |
Name of the direction method that forcing terms will be used by.
Definition at line 259 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by computeForcingTerm(), and reset().
double NOX::Direction::Utils::InexactNewton::alpha [private] |
Parameter used for Type 2 forcing term calculation.
Definition at line 262 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by computeForcingTerm(), and reset().
double NOX::Direction::Utils::InexactNewton::gamma [private] |
Parameter used for Type 2 forcing term calculation.
Definition at line 265 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by computeForcingTerm(), and reset().
bool NOX::Direction::Utils::InexactNewton::setTolerance [private] |
Determines whether to set the "Tolerance" in the parameter list.
Definition at line 268 of file NOX_Direction_Utils_InexactNewton.H.
Referenced by computeForcingTerm(), and reset().