#include <NOX_LineSearch_Polynomial.H>
Inheritance diagram for NOX::LineSearch::Polynomial:
Public Member Functions | |
| Polynomial (const NOX::Utils &u, NOX::Parameter::List ¶ms) | |
| Constructor. | |
| ~Polynomial () | |
| Destructor. | |
| bool | reset (NOX::Parameter::List ¶ms) |
| Reset parameters. | |
| bool | compute (NOX::Abstract::Group &newgrp, double &step, const NOX::Abstract::Vector &dir, const NOX::Solver::Generic &s) |
| Perform a line search. | |
Protected Types | |
| enum | SufficientDecreaseType { ArmijoGoldstein, AredPred, None } |
| Types of sufficient decrease conditions used by checkConvergence(). More... | |
| enum | InterpolationType { Quadratic, Cubic, Quadratic3 } |
| Interpolation types used by compute(). More... | |
| enum | RecoveryStepType { Constant, LastComputedStep } |
| Type of recovery step to use. More... | |
Protected Member Functions | |
| bool | checkConvergence (double newValue, double oldValue, double oldSlope, double step, double eta, int nIters, int nNonlinearIters) const |
| Returns true if converged. | |
| bool | updateGrp (NOX::Abstract::Group &newGrp, const NOX::Abstract::Group &oldGrp, const NOX::Abstract::Vector &dir, double step) const |
| Updates the newGrp by computing a new x and a new F(x). | |
| double | computePhi (const NOX::Abstract::Group &grp) |
| Computes the value of the merit function. | |
| double | computeValue (const NOX::Abstract::Group &grp, double phi) |
| Compute the value used to determine sufficient decrease. | |
| double | computeSlope (const NOX::Abstract::Vector &dir, const NOX::Abstract::Group &grp) |
Compute . | |
| void | printOpeningRemarks () const |
| Used to print opening remarks for each call to compute(). | |
| void | printBadSlopeWarning (double slope) const |
| Prints a warning message saying that the slope is negative. | |
Protected Attributes | |
| SufficientDecreaseType | suffDecrCond |
| Choice for sufficient decrease condition; uses "Sufficient Decrease Condition" parameter. | |
| InterpolationType | interpolationType |
| Choice of interpolation type; uses "Interpolation Type" parameter. | |
| RecoveryStepType | recoveryStepType |
| Choice of the recovery step type; uses "Recovery Step Type" parameter. | |
| double | minStep |
| Minimum step length (i.e., when we give up); uses "Mimimum Step" parameter. | |
| double | defaultStep |
| Default step; uses "Default Step" parameter. | |
| double | recoveryStep |
| Default step for linesearch failure; uses "Recovery Step" parameter. | |
| int | maxIters |
| Maximum iterations; uses "Max Iters" parameter. | |
| double | alpha |
The for the Armijo-Goldstein condition, or the for the Ared/Pred condition; see checkConvergence(). Uses "Alpha" parameter. | |
| double | minBoundFactor |
| Factor that limits the minimum size of the new step based on the previous step; uses "Min Bounds Factor" parameter. | |
| double | maxBoundFactor |
| Factor that limits the maximum size of the new step based on the previous step; uses "Max Bounds Factor" parameter. | |
| bool | doForceInterpolation |
| True is we should force at least one interpolation step; uses "Force Interpolation" parameter. | |
| int | maxIncreaseIter |
| No increases are allowed if the number of nonlinear iterations is greater than this value; uses "Maximum Iterations for Increase". | |
| bool | doAllowIncrease |
| True if we sometimes allow an increase(!) in the decrease measure, i.e., maxIncreaseIter > 0. | |
| double | maxRelativeIncrease |
| Maximum allowable relative increase for decrease meausre (if allowIncrease is true); uses "Allowed Relative Increase" parameter. | |
| bool | useCounter |
| True if we should use #counterUtil and output the results; uses "Use Counters" parameter. | |
| NOX::Parameter::List * | paramsPtr |
| Pointer to the input parameter list. | |
| NOX::LineSearch::Utils::Printing | |
| Common line search printing utilities. | |
| NOX::LineSearch::Utils::Counters | counter |
| Common common counters for line searches. | |
| NOX::LineSearch::Utils::Slope | slopeUtil |
| Common slope calculations for line searches. | |
| NOX::Parameter::UserNorm * | userNormPtr |
| Pointer to a user supplied norm. | |
| NOX::Parameter::MeritFunction * | meritFuncPtr |
| Pointer to a user supplied merit function. | |
This line search can be called via NOX::LineSearch::Manager.
The goal of the line search is to find a step
for the calculation
, given
and
. To accomplish this goal, we minimize a merit function
that measures the "goodness" of the step
. The standard merit function is
but a user defined merit function can be used instead (see computePhi() for details). Our first attempt is always to try a step
, and then check the stopping criteria. The value of
is the specified by the "Default Step" parameter. If the first try doesn't work, then we successively minimize polynomial approximations,
.
Stopping Criteria
The inner iterations continue until:
Polynomial Models of the Merit Function
We compute
by interpolating
. For the quadratic fit, we interpolate
,
, and
where
is the
st approximation to the step. For the cubit fit, we additionally include
.
The steps are calculated iteratively as follows, depending on the choice of "Interpolation Type".
, and solve for
to get
, and solve for
. We use the quadratic model to solve for
; otherwise,
where
using
,
, and
. No derivative information for
is used. We let
, and otherwise
For "Quadratic" and "Cubic", see computeSlope() for details on how
is calculated.
Bounds on the step length
We do not allow the step to grow or shrink too quickly by enforcing the following bounds:
Here
and
are defined by parameters "Min Bounds Factor" and "Max Bounds Factor".
Input Parameters
"Line Search":
"Line Search"/"Polynomial":
. Defaults to 1.0.
is less than this value. Defaults to 1.0e-12.
, i.e., the factor that limits the minimum size of the new step based on the previous step. Defaults to 0.1.
, i.e., the factor that limits the maximum size of the new step based on the previous step. Defaults to 0.5.
If the "Use Counters" parameter is set to true, then a sublist for output parameters called "Output" will be created in the parameter list used to instantiate or reset the class. Valid output parameters are:
References
This line search is based on materials in the following:
|
|
Interpolation types used by compute().
|
|
|
Type of recovery step to use.
|
|
|
Types of sufficient decrease conditions used by checkConvergence().
|
|
||||||||||||||||||||||||||||||||
|
Returns true if converged. We go through the following checks for convergence.
|
|
||||||||||||||||||||
|
Perform a line search. Let
In the end, we should have computed
Ideally, Implements NOX::LineSearch::Generic. |
|
|
Computes the value of the merit function. If a "User Defined Merit Function" parameter is specified, then the NOX::Parameter::MeritFunction::computeF function on the user-supplied merit function is used. Otherwise, we compute and return
|
|
||||||||||||
|
Compute If a "User Defined Merit Function" is provided, then we use NOX::Parameter::MeritFunction::computeSlope to compute this value. Otherwise, we are using the standard merit function, so we want to compute
To do this, we use NOX::LineSearch::Utils::Slope.
|
|
||||||||||||
|
Compute the value used to determine sufficient decrease.
If the "Sufficient Decrease Condition" is set to "Ared/Pred", then we do the following. If a "User Defined Norm" parameter is specified, then the NOX::Parameter::UserNorm::norm function on the user-supplied merit function is used. If the user does not provide a norm, we return If the "Sufficient Decrease Condition" is not set to "Ared/Pred", then we simply return phi.
|
|
||||||||||||||||||||
|
Updates the newGrp by computing a new x and a new F(x). Let
We compute
and |
|
|
Pointer to a user supplied merit function. This should not be deleted in the destructor |
|
|
Pointer to the input parameter list. We need this to later create an "Output" sublist to store output parameters from #counterUtil. This should not be deleted in the destructor |
|
|
Pointer to a user supplied norm. This should not be deleted in the destructor |
1.3.9.1