#include <LOCA_MultiPredictor_AbstractStrategy.H>
Inheritance diagram for LOCA::MultiPredictor::AbstractStrategy:
Public Member Functions | |
| AbstractStrategy () | |
| Constructor. | |
| virtual | ~AbstractStrategy () |
| Destructor. | |
| virtual LOCA::MultiPredictor::AbstractStrategy & | operator= (const LOCA::MultiPredictor::AbstractStrategy &source)=0 |
| Assignment operator. | |
|
virtual Teuchos::RefCountPtr< LOCA::MultiPredictor::AbstractStrategy > | clone (NOX::CopyType type=NOX::DeepCopy) const =0 |
| Clone function. | |
| virtual NOX::Abstract::Group::ReturnType | compute (bool baseOnSecant, const vector< double > &stepSize, LOCA::MultiContinuation::ExtendedGroup &grp, const LOCA::MultiContinuation::ExtendedVector &prevXVec, const LOCA::MultiContinuation::ExtendedVector &xVec)=0 |
| Compute the predictor given the current and previous solution vectors. Set baseOnSecant to false if the predictor orientation should not be based on the secant vector (first or last steps of a continuation run). | |
| virtual NOX::Abstract::Group::ReturnType | evaluate (const vector< double > &stepSize, const LOCA::MultiContinuation::ExtendedVector &xVec, LOCA::MultiContinuation::ExtendedMultiVector &result) const =0 |
Evaluate predictor with step size stepSize. | |
| virtual NOX::Abstract::Group::ReturnType | computeTangent (LOCA::MultiContinuation::ExtendedMultiVector &tangent)=0 |
Compute tangent to predictor and store in tangent. | |
| virtual bool | isTangentScalable () const =0 |
| Is the tangent vector for this predictor scalable. | |
Protected Member Functions | |
| virtual void | setPredictorOrientation (bool baseOnSecant, const vector< double > &stepSize, const LOCA::MultiContinuation::ExtendedGroup &grp, const LOCA::MultiContinuation::ExtendedVector &prevXVec, const LOCA::MultiContinuation::ExtendedVector &xVec, LOCA::MultiContinuation::ExtendedVector &secant, LOCA::MultiContinuation::ExtendedMultiVector &tangent) |
| Sets orientation of predictor based on parameter change from previous steps. | |
AbstractStrategy defines an abstract interface for predictor strategies. It is used by the LOCA::Stepper and LOCA::MultiContinuation groups to compute predictors and tangent approximations to continuation curves and surfaces.
The interface defines several pure virtual methods that derived classes should implement for a particular predictor strategy. Note that predictor strategies are assumed to have a state, and therefore need to define copy constructors, assignment operators, and a clone function. Constructors of derived classes should be of the form:
class Derived : public AbstractStrategy { public: Derived( const Teuchos::RefCountPtr<LOCA::GlobalData>& global_data, const Teuchos::RefCountPtr<LOCA::Parameter::SublistParser>& topParams, const Teuchos::RefCountPtr<Teuchos::ParameterList>& predictorParams); ... };
where global_data is the LOCA global data object, topParams is the parsed top-level parameter list, and predictorParams is a parameter list of predictor 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.
|
||||||||||||||||||||||||
|
Compute the predictor given the current and previous solution vectors. Set baseOnSecant to false if the predictor orientation should not be based on the secant vector (first or last steps of a continuation run). As an example for a first-order predictor, this method should compute the approximate tangent to the continuation curve. Implemented in LOCA::MultiPredictor::Constant, LOCA::MultiPredictor::Random, LOCA::MultiPredictor::Restart, LOCA::MultiPredictor::Secant, and LOCA::MultiPredictor::Tangent. |
|
|
Compute tangent to predictor and store in For a first-order predictor, this is the predictor direction itself. Implemented in LOCA::MultiPredictor::Constant, LOCA::MultiPredictor::Random, LOCA::MultiPredictor::Restart, LOCA::MultiPredictor::Secant, and LOCA::MultiPredictor::Tangent. |
|
||||||||||||||||
|
Evaluate predictor with step size
For a first-order predictor, this method should compute Implemented in LOCA::MultiPredictor::Constant, LOCA::MultiPredictor::Random, LOCA::MultiPredictor::Restart, LOCA::MultiPredictor::Secant, and LOCA::MultiPredictor::Tangent. |
|
|
Is the tangent vector for this predictor scalable. This method determines whether the approximate tangent computed by this strategy is appropriate for scaling. Implemented in LOCA::MultiPredictor::Constant, LOCA::MultiPredictor::Random, LOCA::MultiPredictor::Restart, LOCA::MultiPredictor::Secant, and LOCA::MultiPredictor::Tangent. |
|
||||||||||||||||||||||||||||||||
|
Sets orientation of predictor based on parameter change from previous steps. The implementation here looks at the sign of the scaled dot product between the secant vector and the predictor and changes the sign of the predictor if this scaled dot product is a different sign than the step size. If baseOnSecant is false, then the sign is chosen so the parameter component of the predictor is positive for cases when a secant vector is not available (first step in a continuation run) or may give incorrect information (last step of a continuation run). |
1.3.9.1