NOX Development
|
Secant predictor strategy More...
#include <LOCA_MultiPredictor_Secant.H>
Public Member Functions | |
Secant (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< LOCA::Parameter::SublistParser > &topParams, const Teuchos::RCP< Teuchos::ParameterList > &predParams) | |
Constructor. | |
virtual | ~Secant () |
Destructor. | |
Secant (const Secant &source, NOX::CopyType type=NOX::DeepCopy) | |
Copy constructor. | |
virtual LOCA::MultiPredictor::AbstractStrategy & | operator= (const LOCA::MultiPredictor::AbstractStrategy &source) |
Assignment operator. | |
virtual Teuchos::RCP< LOCA::MultiPredictor::AbstractStrategy > | clone (NOX::CopyType type=NOX::DeepCopy) const |
Clone function. | |
virtual NOX::Abstract::Group::ReturnType | compute (bool baseOnSecant, const std::vector< double > &stepSize, LOCA::MultiContinuation::ExtendedGroup &grp, const LOCA::MultiContinuation::ExtendedVector &prevXVec, const LOCA::MultiContinuation::ExtendedVector &xVec) |
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 std::vector< double > &stepSize, const LOCA::MultiContinuation::ExtendedVector &xVec, LOCA::MultiContinuation::ExtendedMultiVector &result) const |
Evaluate predictor with step size stepSize . | |
virtual NOX::Abstract::Group::ReturnType | computeTangent (LOCA::MultiContinuation::ExtendedMultiVector &tangent) |
Compute tangent to predictor and store in tangent . | |
virtual bool | isTangentScalable () const |
Is the tangent vector for this predictor scalable. | |
![]() | |
AbstractStrategy () | |
Constructor. | |
virtual | ~AbstractStrategy () |
Destructor. | |
virtual LOCA::MultiPredictor::AbstractStrategy & | operator= (const LOCA::MultiPredictor::AbstractStrategy &source)=0 |
Assignment operator. | |
virtual Teuchos::RCP< LOCA::MultiPredictor::AbstractStrategy > | clone (NOX::CopyType type=NOX::DeepCopy) const =0 |
Clone function. | |
virtual NOX::Abstract::Group::ReturnType | compute (bool baseOnSecant, const std::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 std::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 Attributes | |
Teuchos::RCP< LOCA::GlobalData > | globalData |
LOCA global data object. | |
Teuchos::RCP< LOCA::MultiPredictor::AbstractStrategy > | firstStepPredictor |
First step predictor. | |
bool | isFirstStep |
Flag indicating whether this is the first step. | |
bool | isFirstStepComputed |
Flag indicating whether first step predictor has been computed. | |
Teuchos::RCP< LOCA::MultiContinuation::ExtendedMultiVector > | predictor |
Stores predictor vector. | |
Teuchos::RCP< LOCA::MultiContinuation::ExtendedVector > | secant |
Stores secant vector for setting orientation. | |
bool | initialized |
Flag indicating whether vectors have been initialized. | |
Additional Inherited Members | |
![]() | |
virtual void | setPredictorOrientation (bool baseOnSecant, const std::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. | |
Secant predictor strategy
This class implements a predictor strategy based on computing the secant vector
where
For the first step of a continuation run,
The parameters used by this class supplied in the constructor are:
LOCA::MultiPredictor::Secant::Secant | ( | const Teuchos::RCP< LOCA::GlobalData > & | global_data, |
const Teuchos::RCP< LOCA::Parameter::SublistParser > & | topParams, | ||
const Teuchos::RCP< Teuchos::ParameterList > & | predParams | ||
) |
Constructor.
global_data | [in] Global data object used for LOCA::Factory |
topParams | [in] Parsed top-level parameter list used when creating first step predictor |
predParams | [in] Predictor parameters used to obtain "First Step Predictor" as described above. |
References firstStepPredictor, and globalData.
|
virtual |
Clone function.
Implements LOCA::MultiPredictor::AbstractStrategy.
|
virtual |
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).
This method actually implements the secant calculation described above
Implements LOCA::MultiPredictor::AbstractStrategy.
References LOCA::MultiContinuation::ExtendedVector::clone(), LOCA::Extended::Vector::createMultiVector(), NOX::Abstract::Group::Ok, NOX::ShapeCopy, and NOX::Utils::StepperDetails.
|
virtual |
Compute tangent to predictor and store in tangent
.
Implements LOCA::MultiPredictor::AbstractStrategy.
References NOX::Abstract::Group::Ok.
|
virtual |
Evaluate predictor with step size stepSize
.
This method computes result
[i] = xVec
[i] + stepSize
[i] * v[i] for each i, where v
[i] is the ith predictor direction.
Implements LOCA::MultiPredictor::AbstractStrategy.
References NOX::Abstract::Group::Ok.
|
virtual |
Is the tangent vector for this predictor scalable.
For the secant predictor, this always returns true.
Implements LOCA::MultiPredictor::AbstractStrategy.
|
virtual |
Assignment operator.
Implements LOCA::MultiPredictor::AbstractStrategy.
References NOX::DeepCopy, firstStepPredictor, globalData, initialized, isFirstStep, isFirstStepComputed, predictor, and secant.