#include <LOCA_StepSize_AbstractStrategy.H>
Public Member Functions | |
AbstractStrategy () | |
Constructor. | |
virtual | ~AbstractStrategy () |
Destructor. | |
virtual NOX::Abstract::Group::ReturnType | computeStepSize (LOCA::MultiContinuation::AbstractStrategy &curGroup, const LOCA::MultiContinuation::ExtendedVector &predictor, const NOX::Solver::Generic &solver, const LOCA::Abstract::Iterator::StepStatus &stepStatus, const LOCA::Stepper &stepper, double &stepSize)=0 |
Compute step size. | |
virtual double | getPrevStepSize () const =0 |
Return the previous step size. | |
virtual double | getStartStepSize () const =0 |
Return the initial step size. | |
Private Member Functions | |
AbstractStrategy (const AbstractStrategy &) | |
Private to prohibit copying. | |
AbstractStrategy & | operator= (const AbstractStrategy &) |
Private to prohibit copying. |
AbstractStrategy defines an abstract interface for step size control strategies. It is used by LOCA::Stepper to the step size for each continuation step.
The interface currently defines three pure virtual methods, computeStepSize() to compute the step size, getPrevSteSize() to get the step size from the previous step, and getStartStepSize() to get the initial step size. Derived classes should implement this method for a particular strategy. Constructors for derived classes should be of the form:
class Derived : public AbstractStrategy { public: Derived( const Teuchos::RCP<LOCA::GlobalData>& global_data, const Teuchos::RCP<LOCA::Parameter::SublistParser>& topParams, const Teuchos::RCP<Teuchos::ParameterList>& stepsizeParams); ... };
where global_data
is the LOCA global data object, topParams
is the parsed top-level parameter list, and stepsizeParams
is a parameter list of step size control parameters.
This class and its children follow the Strategy pattern as defined in Erich Gamma, et al. "Design Patterns: Elements of Reusable Object-Oriented Software." Addison Wesley, Boston, MA, 1995.
Definition at line 99 of file LOCA_StepSize_AbstractStrategy.H.
LOCA::StepSize::AbstractStrategy::AbstractStrategy | ( | ) | [inline] |
virtual LOCA::StepSize::AbstractStrategy::~AbstractStrategy | ( | ) | [inline, virtual] |
LOCA::StepSize::AbstractStrategy::AbstractStrategy | ( | const AbstractStrategy & | ) | [private] |
Private to prohibit copying.
virtual NOX::Abstract::Group::ReturnType LOCA::StepSize::AbstractStrategy::computeStepSize | ( | LOCA::MultiContinuation::AbstractStrategy & | curGroup, | |
const LOCA::MultiContinuation::ExtendedVector & | predictor, | |||
const NOX::Solver::Generic & | solver, | |||
const LOCA::Abstract::Iterator::StepStatus & | stepStatus, | |||
const LOCA::Stepper & | stepper, | |||
double & | stepSize | |||
) | [pure virtual] |
Compute step size.
curGroup | [in] Current continuation group | |
predictor | [in] Current predictor direction | |
solver | [in] Solver from previous step | |
stepStatus | [in] Status of previous step | |
stepper | [in] Stepper | |
stepSize | [out] Computed step size |
Implemented in LOCA::StepSize::Adaptive, and LOCA::StepSize::Constant.
virtual double LOCA::StepSize::AbstractStrategy::getPrevStepSize | ( | ) | const [pure virtual] |
virtual double LOCA::StepSize::AbstractStrategy::getStartStepSize | ( | ) | const [pure virtual] |
AbstractStrategy& LOCA::StepSize::AbstractStrategy::operator= | ( | const AbstractStrategy & | ) | [private] |
Private to prohibit copying.