NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LOCA::AdaptiveStepper Class Reference

Implementation of LOCA::Abstract::Iterator for computing points along a continuation curve. More...

#include <LOCA_AdaptiveStepper.H>

Inheritance diagram for LOCA::AdaptiveStepper:
Inheritance graph
[legend]
Collaboration diagram for LOCA::AdaptiveStepper:
Collaboration graph
[legend]

Public Member Functions

 AdaptiveStepper (const Teuchos::RCP< Teuchos::ParameterList > &pList, const Teuchos::RCP< ::Thyra::AdaptiveSolutionManager > &mgr, const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< NOX::StatusTest::Generic > &nt)
 
virtual ~AdaptiveStepper ()
 Destructor.
 
bool eigensolverReset (Teuchos::RCP< Teuchos::ParameterList > &newEigensolverList)
 Replaces the eigensolver parameter list.
 
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. More...
 
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. More...
 
virtual double getContinuationParameter () const
 Return the current continuation parameter from the underlying LOCA::MultiContinuation::AbstractStrategy. More...
 
virtual
LOCA::Abstract::Iterator::IteratorStatus 
run ()
 Run the iterator.
 
- Public Member Functions inherited from LOCA::Abstract::Iterator
 Iterator (Teuchos::ParameterList &p)
 Constructor.
 
 Iterator (const Iterator &it)
 Copy Constructor.
 
virtual ~Iterator ()
 Destructor.
 
virtual bool resetIterator (Teuchos::ParameterList &p)
 Reset the iterator to start a new iteration.
 
virtual IteratorStatus getIteratorStatus () const
 Return the status of the iterator.
 
virtual int getStepNumber () const
 Returns the number of accepted steps.
 
virtual int getNumFailedSteps () const
 Returns the number of failed steps.
 
virtual int getNumTotalSteps () const
 Returns the total number of steps attempted.
 

Protected Member Functions

void setSolutionGroup (const Teuchos::RCP< LOCA::MultiContinuation::AbstractGroup > &initialGuess, const double value)
 
void buildLOCAFactory ()
 Build LOCA Factory needed to support stepping strategy.
 
virtual
LOCA::Abstract::Iterator::IteratorStatus 
start ()
 Initialize 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 
adapt (LOCA::Abstract::Iterator::StepStatus stepStatus)
 Adaptation 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.
 
LOCA::Abstract::Iterator::IteratorStatus stop (LOCA::Abstract::Iterator::StepStatus stepStatus)
 Check stopping criteria.
 
virtual
LOCA::Abstract::Iterator::IteratorStatus 
iterate ()
 Perform iteration.
 
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 printRelaxationStep ()
 Print to the screen information for the beginning of a restart relaxation step.
 
virtual void printEndStep (LOCA::Abstract::Iterator::StepStatus stepStatus)
 Print to the screen information for the end of a successful continuation step.
 
virtual void printRelaxationEndStep (LOCA::Abstract::Iterator::StepStatus stepStatus)
 Print to the screen information for the end of a relaxation 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 Member Functions inherited from LOCA::Abstract::Iterator
 Iterator ()
 Constructor.
 
virtual void setLastIteration ()
 Set iterator status as LastIteration.
 
virtual bool isLastIteration ()
 Returns true of the iteratorStatus is LastIteration.
 
virtual StepStatus computeStepStatus (StepStatus preStatus, StepStatus compStatus, StepStatus postStatus)
 Compute step, iterator status from status of each component of step.
 

Protected Attributes

Teuchos::RCP
< ::Thyra::AdaptiveSolutionManager
mgr
 Adaptive solution manager provides interface to remesh/resize functions.
 
Teuchos::RCP< LOCA::GlobalDataglobalData
 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
noxStatusTestPtr
 Pointer to the NOX 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.
 
Teuchos::RCP
< Teuchos::ParameterList
bifurcationParams
 Other parameter lists.
 
Teuchos::RCP
< Teuchos::ParameterList
firstStepperParams
 
std::string conParamName
 Name of continuation parameter.
 
std::vector< int > conParamIDs
 Index of continuation parameter.
 
double startValue
 Starting value of continuation parameter, $\lambda_b $.
 
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), $\Delta \lambda_i $.
 
int maxNonlinearSteps
 Maximum number of Newton iterations per continuation step, $ N_{max} $. Defaults to 15.
 
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.
 
bool max_steps_exceeded
 Flag indicating that the failed step is only due to the maximum number of steps being exceeded.
 
- Protected Attributes inherited from LOCA::Abstract::Iterator
int stepNumber
 Current step number of continuation algorithm (does not include failed steps).
 
int numFailedSteps
 Number of continuation steps that have failed.
 
int numTotalSteps
 Total number of steps attempeted (includes failed and successful steps).
 
int maxSteps
 Maximum number of continuation steps to take. Defaults to 100.
 
IteratorStatus iteratorStatus
 Current status of the iterator.
 

Additional Inherited Members

- Public Types inherited from LOCA::Abstract::Iterator
enum  IteratorStatus { LastIteration = 2, Finished = 1, Failed = 0, NotFinished = -1 }
 Enumerated type for status of the iterator. More...
 
enum  StepStatus { Successful = 1, Unsuccessful = 0, Provisional = -1 }
 Enumerated type for status of each step of iterator. More...
 

Detailed Description

Implementation of LOCA::Abstract::Iterator for computing points along a continuation curve.

The AdaptiveStepper class implements the pure virtual methods of the LOCA::Abstract::Iterator for iteratively computing points along a continuation curve.

Member Function Documentation

Teuchos::RCP< const LOCA::MultiContinuation::AbstractGroup > LOCA::AdaptiveStepper::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).

double LOCA::AdaptiveStepper::getContinuationParameter ( ) const
virtual

Return the current continuation parameter from the underlying LOCA::MultiContinuation::AbstractStrategy.

Teuchos::RCP< const NOX::Solver::Generic > LOCA::AdaptiveStepper::getSolver ( ) const
virtual

Return the current nonlinear solver pointer.

Will throw an error if the solver does not exist yet.


The documentation for this class was generated from the following files: