#include <LOCA_Stepper.H>
Public Member Functions | |
Stepper (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< LOCA::MultiContinuation::AbstractGroup > &initialGuess, const Teuchos::RCP< NOX::StatusTest::Generic > &t, const Teuchos::RCP< Teuchos::ParameterList > &p) | |
Constructor. | |
virtual | ~Stepper () |
Destructor. | |
virtual bool | reset (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< LOCA::MultiContinuation::AbstractGroup > &initialGuess, const Teuchos::RCP< NOX::StatusTest::Generic > &t, const Teuchos::RCP< Teuchos::ParameterList > &p) |
Reset the Stepper to start a new continuation run. | |
virtual Teuchos::RCP< const LOCA::MultiContinuation::AbstractGroup > | getSolutionGroup () const |
Return the current solution group. | |
virtual Teuchos::RCP< const LOCA::MultiContinuation::AbstractGroup > | getBifurcationGroup () const |
Return the current bifurcation group. | |
virtual Teuchos::RCP< const Teuchos::ParameterList > | getList () const |
Return the output parameters from the stepper algorithm. | |
virtual Teuchos::RCP< const NOX::Solver::Generic > | getSolver () const |
Return the current nonlinear solver pointer. | |
Protected Member Functions | |
virtual LOCA::Abstract::Iterator::IteratorStatus | start () |
Intialize iterator. | |
virtual LOCA::Abstract::Iterator::IteratorStatus | finish (LOCA::Abstract::Iterator::IteratorStatus iteratorStatus) |
Finalize iterator. | |
virtual LOCA::Abstract::Iterator::StepStatus | preprocess (LOCA::Abstract::Iterator::StepStatus stepStatus) |
Preprocess step. | |
virtual LOCA::Abstract::Iterator::StepStatus | compute (LOCA::Abstract::Iterator::StepStatus stepStatus) |
Compute step. | |
virtual LOCA::Abstract::Iterator::StepStatus | postprocess (LOCA::Abstract::Iterator::StepStatus stepStatus) |
Postprocess step. | |
virtual LOCA::Abstract::Iterator::IteratorStatus | stop (LOCA::Abstract::Iterator::StepStatus stepStatus) |
Check stopping criteria. | |
Teuchos::RCP < LOCA::MultiContinuation::AbstractGroup > | buildConstrainedGroup (const Teuchos::RCP< LOCA::MultiContinuation::AbstractGroup > &grp) |
Builds a constrained group is specified through parameter lists. | |
LOCA::Abstract::Iterator::StepStatus | computeStepSize (LOCA::Abstract::Iterator::StepStatus stepStatus, double &stepSize) |
Compute a new step size based on results from the previous step. | |
virtual void | printInitializationInfo () |
Print to the screen the initialization information. | |
virtual void | printStartStep () |
Print to the screen information for the beginning of a new continuation step. | |
virtual void | printEndStep (LOCA::Abstract::Iterator::StepStatus stepStatus) |
Print to the screen information for the end of a successful continuation step. | |
virtual void | printEndInfo () |
Print to the screen the concluding information. | |
virtual bool | withinThreshold () |
Checks to see if continuation parameter is within threshold of bound. | |
Protected Attributes | |
Teuchos::RCP< LOCA::GlobalData > | globalData |
Global data. | |
Teuchos::RCP < LOCA::Parameter::SublistParser > | parsedParams |
Parsed parameter list. | |
Teuchos::RCP < LOCA::MultiPredictor::AbstractStrategy > | predictor |
Predictor strategy. | |
Teuchos::RCP < LOCA::MultiContinuation::AbstractStrategy > | curGroupPtr |
Current continuation group. | |
Teuchos::RCP < LOCA::MultiContinuation::AbstractStrategy > | prevGroupPtr |
Continuation group from previous step. | |
Teuchos::RCP < LOCA::Eigensolver::AbstractStrategy > | eigensolver |
Eigensolver for computing eigenvalues after each continuation step. | |
Teuchos::RCP < LOCA::SaveEigenData::AbstractStrategy > | saveEigenData |
Strategy for saving eigenvectors/values. | |
Teuchos::RCP < LOCA::MultiContinuation::AbstractGroup > | bifGroupPtr |
Pointer to bifurcation group. | |
Teuchos::RCP < NOX::StatusTest::Generic > | statusTestPtr |
Pointer to the status test. | |
Teuchos::RCP < Teuchos::ParameterList > | paramListPtr |
Pointer to parameter list passed in constructor/reset method. | |
Teuchos::RCP < Teuchos::ParameterList > | stepperList |
Pointer to stepper parameters. | |
Teuchos::RCP < NOX::Solver::Generic > | solverPtr |
Solver (a.k.a corrector). | |
Teuchos::RCP < LOCA::MultiContinuation::ExtendedVector > | curPredictorPtr |
Current predictor direction. | |
Teuchos::RCP < LOCA::MultiContinuation::ExtendedVector > | prevPredictorPtr |
previous predictor direction | |
Teuchos::RCP < LOCA::StepSize::AbstractStrategy > | stepSizeStrategyPtr |
Step size control strategy. | |
string | conParamName |
Name of continuation parameter. | |
vector< int > | conParamIDs |
Index of continuation parameter. | |
double | startValue |
Starting value of continuation parameter, ![]() | |
double | maxValue |
Largest allowable value of continuation parameter. | |
double | minValue |
Smallest allowable value of continuation parameter. | |
double | stepSize |
Current step size (change in the continuation parameter), ![]() | |
int | maxNonlinearSteps |
Maximum number of newton iterations per continuation step,![]() | |
double | targetValue |
Target parameter value for last step (either maxValue or minValue). | |
bool | isTargetStep |
Flag indicating if this is an extra step to hit target value. | |
bool | doTangentFactorScaling |
Flag indicating whether to do tangent factor step size scaling. | |
double | tangentFactor |
Tangent factor. | |
double | minTangentFactor |
Minimum tangent factor. | |
double | tangentFactorExponent |
Tangent factor exponent. | |
bool | calcEigenvalues |
Flag indicating whether to compute eigenvalues after each step. | |
bool | return_failed_on_max_steps |
Flag indicating whether to return failed upon reaching max steps. | |
Private Member Functions | |
Stepper (const Stepper &) | |
Private to prohibit copying. | |
Stepper & | operator= (const Stepper &) |
Private to prohibit copying. |
The Stepper class implements the pure virtual methods of the LOCA::Abstract::Iterator for iteratively computing points along a continuation curve.
Definition at line 90 of file LOCA_Stepper.H.
LOCA::Stepper::Stepper | ( | const Teuchos::RCP< LOCA::GlobalData > & | global_data, | |
const Teuchos::RCP< LOCA::MultiContinuation::AbstractGroup > & | initialGuess, | |||
const Teuchos::RCP< NOX::StatusTest::Generic > & | t, | |||
const Teuchos::RCP< Teuchos::ParameterList > & | p | |||
) |
LOCA::Stepper::~Stepper | ( | ) | [virtual] |
LOCA::Stepper::Stepper | ( | const Stepper & | ) | [private] |
Private to prohibit copying.
bool LOCA::Stepper::reset | ( | const Teuchos::RCP< LOCA::GlobalData > & | global_data, | |
const Teuchos::RCP< LOCA::MultiContinuation::AbstractGroup > & | initialGuess, | |||
const Teuchos::RCP< NOX::StatusTest::Generic > & | t, | |||
const Teuchos::RCP< Teuchos::ParameterList > & | p | |||
) | [virtual] |
Reset the Stepper to start a new continuation run.
Definition at line 108 of file LOCA_Stepper.C.
References bifGroupPtr, buildConstrainedGroup(), calcEigenvalues, conParamIDs, conParamName, curGroupPtr, doTangentFactorScaling, eigensolver, LOCA::ParameterVector::getIndex(), globalData, isTargetStep, maxNonlinearSteps, maxValue, minTangentFactor, minValue, paramListPtr, parsedParams, predictor, printInitializationInfo(), LOCA::Abstract::Iterator::resetIterator(), return_failed_on_max_steps, saveEigenData, solverPtr, startValue, statusTestPtr, stepperList, NOX::Utils::StepperParameters, stepSize, stepSizeStrategyPtr, tangentFactor, tangentFactorExponent, and targetValue.
Referenced by Stepper().
Teuchos::RCP< const LOCA::MultiContinuation::AbstractGroup > LOCA::Stepper::getSolutionGroup | ( | ) | const [virtual] |
Return the current solution group.
Definition at line 732 of file LOCA_Stepper.C.
References curGroupPtr.
Teuchos::RCP< const LOCA::MultiContinuation::AbstractGroup > LOCA::Stepper::getBifurcationGroup | ( | ) | const [virtual] |
Return the current bifurcation group.
If the current bifurcation method is "None", then the returned group is the same as getSolutionGroup(), otherwise this method returns the current bifurcation group (e.g., a turning point group).
Definition at line 738 of file LOCA_Stepper.C.
References curGroupPtr.
Teuchos::RCP< const Teuchos::ParameterList > LOCA::Stepper::getList | ( | ) | const [virtual] |
Return the output parameters from the stepper algorithm.
Definition at line 744 of file LOCA_Stepper.C.
References paramListPtr.
Teuchos::RCP< const NOX::Solver::Generic > LOCA::Stepper::getSolver | ( | ) | const [virtual] |
Return the current nonlinear solver pointer.
Will throw an error if the solver does not exist yet.
Definition at line 750 of file LOCA_Stepper.C.
References globalData, and solverPtr.
LOCA::Abstract::Iterator::IteratorStatus LOCA::Stepper::start | ( | ) | [protected, virtual] |
Intialize iterator.
Implements LOCA::Abstract::Iterator.
Definition at line 257 of file LOCA_Stepper.C.
References calcEigenvalues, conParamIDs, NOX::StatusTest::Converged, curGroupPtr, curPredictorPtr, NOX::DeepCopy, eigensolver, LOCA::Abstract::Iterator::Failed, NOX::StatusTest::Failed, LOCA::MultiContinuation::ExtendedGroup::getUnderlyingGroup(), globalData, LOCA::Abstract::Iterator::NotFinished, parsedParams, predictor, prevGroupPtr, prevPredictorPtr, printEndStep(), printStartStep(), saveEigenData, NOX::ShapeCopy, solverPtr, statusTestPtr, stepperList, stepSize, LOCA::Abstract::Iterator::Successful, and LOCA::Abstract::Iterator::Unsuccessful.
LOCA::Abstract::Iterator::IteratorStatus LOCA::Stepper::finish | ( | LOCA::Abstract::Iterator::IteratorStatus | iteratorStatus | ) | [protected, virtual] |
Finalize iterator.
Implements LOCA::Abstract::Iterator.
Definition at line 342 of file LOCA_Stepper.C.
References conParamIDs, NOX::StatusTest::Converged, curGroupPtr, curPredictorPtr, LOCA::Abstract::Iterator::Failed, LOCA::Abstract::Iterator::Finished, globalData, isTargetStep, parsedParams, predictor, prevGroupPtr, printEndStep(), printStartStep(), solverPtr, statusTestPtr, stepperList, stepSize, LOCA::Abstract::Iterator::Successful, targetValue, and LOCA::Abstract::Iterator::Unsuccessful.
LOCA::Abstract::Iterator::StepStatus LOCA::Stepper::preprocess | ( | LOCA::Abstract::Iterator::StepStatus | stepStatus | ) | [protected, virtual] |
Preprocess step.
Implements LOCA::Abstract::Iterator.
Definition at line 453 of file LOCA_Stepper.C.
References computeStepSize(), curGroupPtr, curPredictorPtr, parsedParams, prevGroupPtr, solverPtr, statusTestPtr, stepSize, and LOCA::Abstract::Iterator::Unsuccessful.
LOCA::Abstract::Iterator::StepStatus LOCA::Stepper::compute | ( | LOCA::Abstract::Iterator::StepStatus | stepStatus | ) | [protected, virtual] |
Compute step.
Implements LOCA::Abstract::Iterator.
Definition at line 489 of file LOCA_Stepper.C.
References curGroupPtr, NOX::StatusTest::Failed, printEndStep(), printStartStep(), solverPtr, LOCA::Abstract::Iterator::Successful, and LOCA::Abstract::Iterator::Unsuccessful.
LOCA::Abstract::Iterator::StepStatus LOCA::Stepper::postprocess | ( | LOCA::Abstract::Iterator::StepStatus | stepStatus | ) | [protected, virtual] |
Postprocess step.
Implements LOCA::Abstract::Iterator.
Definition at line 515 of file LOCA_Stepper.C.
References calcEigenvalues, curGroupPtr, curPredictorPtr, doTangentFactorScaling, eigensolver, LOCA::Abstract::Iterator::getStepNumber(), globalData, minTangentFactor, prevPredictorPtr, saveEigenData, NOX::Utils::StepperDetails, tangentFactor, and LOCA::Abstract::Iterator::Unsuccessful.
LOCA::Abstract::Iterator::IteratorStatus LOCA::Stepper::stop | ( | LOCA::Abstract::Iterator::StepStatus | stepStatus | ) | [protected, virtual] |
Check stopping criteria.
Reimplemented from LOCA::Abstract::Iterator.
Definition at line 573 of file LOCA_Stepper.C.
References curGroupPtr, LOCA::Abstract::Iterator::Failed, LOCA::Abstract::Iterator::Finished, globalData, LOCA::Abstract::Iterator::isLastIteration(), LOCA::Abstract::Iterator::maxSteps, maxValue, minValue, LOCA::Abstract::Iterator::NotFinished, LOCA::Abstract::Iterator::numTotalSteps, prevGroupPtr, return_failed_on_max_steps, NOX::Utils::StepperIteration, LOCA::Abstract::Iterator::Successful, targetValue, and withinThreshold().
Teuchos::RCP< LOCA::MultiContinuation::AbstractGroup > LOCA::Stepper::buildConstrainedGroup | ( | const Teuchos::RCP< LOCA::MultiContinuation::AbstractGroup > & | grp | ) | [protected] |
Builds a constrained group is specified through parameter lists.
Definition at line 639 of file LOCA_Stepper.C.
References globalData, and parsedParams.
Referenced by reset().
LOCA::Abstract::Iterator::StepStatus LOCA::Stepper::computeStepSize | ( | LOCA::Abstract::Iterator::StepStatus | stepStatus, | |
double & | stepSize | |||
) | [protected] |
Compute a new step size based on results from the previous step.
Definition at line 691 of file LOCA_Stepper.C.
References curGroupPtr, curPredictorPtr, doTangentFactorScaling, NOX::Abstract::Group::Failed, globalData, maxValue, minValue, LOCA::Abstract::Iterator::Provisional, LOCA::Abstract::Iterator::setLastIteration(), solverPtr, NOX::Utils::StepperDetails, stepSizeStrategyPtr, LOCA::Abstract::Iterator::Successful, tangentFactor, tangentFactorExponent, and targetValue.
Referenced by preprocess().
void LOCA::Stepper::printInitializationInfo | ( | ) | [protected, virtual] |
Print to the screen the initialization information.
Definition at line 762 of file LOCA_Stepper.C.
References globalData, LOCA::Abstract::Iterator::maxSteps, maxValue, minValue, startValue, NOX::Utils::StepperIteration, and stepperList.
Referenced by reset().
void LOCA::Stepper::printStartStep | ( | ) | [protected, virtual] |
Print to the screen information for the beginning of a new continuation step.
Definition at line 791 of file LOCA_Stepper.C.
References conParamName, curGroupPtr, globalData, isTargetStep, prevGroupPtr, LOCA::Abstract::Iterator::stepNumber, NOX::Utils::StepperIteration, stepperList, stepSize, stepSizeStrategyPtr, and targetValue.
void LOCA::Stepper::printEndStep | ( | LOCA::Abstract::Iterator::StepStatus | stepStatus | ) | [protected, virtual] |
Print to the screen information for the end of a successful continuation step.
Definition at line 834 of file LOCA_Stepper.C.
References conParamName, curGroupPtr, globalData, prevGroupPtr, solverPtr, LOCA::Abstract::Iterator::stepNumber, NOX::Utils::StepperIteration, and LOCA::Abstract::Iterator::Successful.
void LOCA::Stepper::printEndInfo | ( | ) | [protected, virtual] |
bool LOCA::Stepper::withinThreshold | ( | ) | [protected, virtual] |
Checks to see if continuation parameter is within threshold of bound.
Definition at line 888 of file LOCA_Stepper.C.
References curGroupPtr, parsedParams, stepperList, and targetValue.
Referenced by stop().
Teuchos::RCP<LOCA::GlobalData> LOCA::Stepper::globalData [protected] |
Global data.
Definition at line 195 of file LOCA_Stepper.H.
Referenced by buildConstrainedGroup(), computeStepSize(), finish(), getSolver(), postprocess(), printEndStep(), printInitializationInfo(), printStartStep(), reset(), start(), and stop().
Teuchos::RCP<LOCA::Parameter::SublistParser> LOCA::Stepper::parsedParams [protected] |
Parsed parameter list.
Definition at line 198 of file LOCA_Stepper.H.
Referenced by buildConstrainedGroup(), finish(), preprocess(), reset(), start(), and withinThreshold().
Teuchos::RCP<LOCA::MultiPredictor::AbstractStrategy> LOCA::Stepper::predictor [protected] |
Teuchos::RCP<LOCA::MultiContinuation::AbstractStrategy> LOCA::Stepper::curGroupPtr [protected] |
Current continuation group.
Definition at line 204 of file LOCA_Stepper.H.
Referenced by compute(), computeStepSize(), finish(), getBifurcationGroup(), getSolutionGroup(), postprocess(), preprocess(), printEndStep(), printStartStep(), reset(), start(), stop(), and withinThreshold().
Teuchos::RCP<LOCA::MultiContinuation::AbstractStrategy> LOCA::Stepper::prevGroupPtr [protected] |
Continuation group from previous step.
Definition at line 207 of file LOCA_Stepper.H.
Referenced by finish(), preprocess(), printEndStep(), printStartStep(), start(), and stop().
Teuchos::RCP<LOCA::Eigensolver::AbstractStrategy> LOCA::Stepper::eigensolver [protected] |
Eigensolver for computing eigenvalues after each continuation step.
Definition at line 210 of file LOCA_Stepper.H.
Referenced by postprocess(), reset(), and start().
Teuchos::RCP<LOCA::SaveEigenData::AbstractStrategy> LOCA::Stepper::saveEigenData [protected] |
Strategy for saving eigenvectors/values.
Definition at line 213 of file LOCA_Stepper.H.
Referenced by postprocess(), reset(), and start().
Teuchos::RCP<LOCA::MultiContinuation::AbstractGroup> LOCA::Stepper::bifGroupPtr [protected] |
Teuchos::RCP<NOX::StatusTest::Generic> LOCA::Stepper::statusTestPtr [protected] |
Pointer to the status test.
Definition at line 219 of file LOCA_Stepper.H.
Referenced by finish(), preprocess(), reset(), and start().
Teuchos::RCP<Teuchos::ParameterList> LOCA::Stepper::paramListPtr [protected] |
Pointer to parameter list passed in constructor/reset method.
Definition at line 222 of file LOCA_Stepper.H.
Teuchos::RCP<Teuchos::ParameterList> LOCA::Stepper::stepperList [protected] |
Pointer to stepper parameters.
Definition at line 225 of file LOCA_Stepper.H.
Referenced by finish(), printInitializationInfo(), printStartStep(), reset(), start(), and withinThreshold().
Teuchos::RCP<NOX::Solver::Generic> LOCA::Stepper::solverPtr [protected] |
Solver (a.k.a corrector).
Definition at line 228 of file LOCA_Stepper.H.
Referenced by compute(), computeStepSize(), finish(), getSolver(), preprocess(), printEndStep(), reset(), and start().
Teuchos::RCP<LOCA::MultiContinuation::ExtendedVector> LOCA::Stepper::curPredictorPtr [protected] |
Current predictor direction.
Definition at line 231 of file LOCA_Stepper.H.
Referenced by computeStepSize(), finish(), postprocess(), preprocess(), and start().
Teuchos::RCP<LOCA::MultiContinuation::ExtendedVector> LOCA::Stepper::prevPredictorPtr [protected] |
previous predictor direction
Definition at line 234 of file LOCA_Stepper.H.
Referenced by postprocess(), and start().
Teuchos::RCP<LOCA::StepSize::AbstractStrategy> LOCA::Stepper::stepSizeStrategyPtr [protected] |
Step size control strategy.
Definition at line 237 of file LOCA_Stepper.H.
Referenced by computeStepSize(), printStartStep(), and reset().
string LOCA::Stepper::conParamName [protected] |
Name of continuation parameter.
Definition at line 240 of file LOCA_Stepper.H.
Referenced by printEndStep(), printStartStep(), and reset().
vector<int> LOCA::Stepper::conParamIDs [protected] |
double LOCA::Stepper::startValue [protected] |
Starting value of continuation parameter, .
Definition at line 246 of file LOCA_Stepper.H.
Referenced by printInitializationInfo(), and reset().
double LOCA::Stepper::maxValue [protected] |
Largest allowable value of continuation parameter.
Definition at line 249 of file LOCA_Stepper.H.
Referenced by computeStepSize(), printInitializationInfo(), reset(), and stop().
double LOCA::Stepper::minValue [protected] |
Smallest allowable value of continuation parameter.
Definition at line 252 of file LOCA_Stepper.H.
Referenced by computeStepSize(), printInitializationInfo(), reset(), and stop().
double LOCA::Stepper::stepSize [protected] |
Current step size (change in the continuation parameter), .
Definition at line 255 of file LOCA_Stepper.H.
Referenced by finish(), preprocess(), printStartStep(), reset(), and start().
int LOCA::Stepper::maxNonlinearSteps [protected] |
Maximum number of newton iterations per continuation step,. Defaults to 15.
Definition at line 258 of file LOCA_Stepper.H.
Referenced by reset().
double LOCA::Stepper::targetValue [protected] |
Target parameter value for last step (either maxValue or minValue).
Definition at line 261 of file LOCA_Stepper.H.
Referenced by computeStepSize(), finish(), printStartStep(), reset(), stop(), and withinThreshold().
bool LOCA::Stepper::isTargetStep [protected] |
Flag indicating if this is an extra step to hit target value.
Definition at line 264 of file LOCA_Stepper.H.
Referenced by finish(), printStartStep(), and reset().
bool LOCA::Stepper::doTangentFactorScaling [protected] |
Flag indicating whether to do tangent factor step size scaling.
Definition at line 267 of file LOCA_Stepper.H.
Referenced by computeStepSize(), postprocess(), and reset().
double LOCA::Stepper::tangentFactor [protected] |
Tangent factor.
Definition at line 270 of file LOCA_Stepper.H.
Referenced by computeStepSize(), postprocess(), and reset().
double LOCA::Stepper::minTangentFactor [protected] |
Minimum tangent factor.
Definition at line 273 of file LOCA_Stepper.H.
Referenced by postprocess(), and reset().
double LOCA::Stepper::tangentFactorExponent [protected] |
Tangent factor exponent.
Definition at line 276 of file LOCA_Stepper.H.
Referenced by computeStepSize(), and reset().
bool LOCA::Stepper::calcEigenvalues [protected] |
Flag indicating whether to compute eigenvalues after each step.
Definition at line 279 of file LOCA_Stepper.H.
Referenced by postprocess(), reset(), and start().
bool LOCA::Stepper::return_failed_on_max_steps [protected] |
Flag indicating whether to return failed upon reaching max steps.
Definition at line 282 of file LOCA_Stepper.H.