#include <LOCA_MultiPredictor_Constant.H>
Public Member Functions | |
Constant (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< Teuchos::ParameterList > &predParams) | |
Constructor. | |
virtual | ~Constant () |
Destructor. | |
Constant (const Constant &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 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 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. | |
Protected Attributes | |
Teuchos::RCP< LOCA::GlobalData > | globalData |
LOCA global data object. | |
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. |
This class computes the predictor direction given by a vector of zeros for the solution vector component and 1 for the parameter component. When used with natural continuation, this corresponds to what is commonly referred to as zero'th order continuation.
Definition at line 64 of file LOCA_MultiPredictor_Constant.H.
LOCA::MultiPredictor::Constant::Constant | ( | const Teuchos::RCP< LOCA::GlobalData > & | global_data, | |
const Teuchos::RCP< Teuchos::ParameterList > & | predParams | |||
) |
Constructor.
global_data | [in] Global data object | |
predParams | [in] Predictor parameters. None are currently referenced. |
Definition at line 48 of file LOCA_MultiPredictor_Constant.C.
Referenced by clone().
LOCA::MultiPredictor::Constant::~Constant | ( | ) | [virtual] |
LOCA::MultiPredictor::Constant::Constant | ( | const Constant & | source, | |
NOX::CopyType | type = NOX::DeepCopy | |||
) |
Copy constructor.
Definition at line 62 of file LOCA_MultiPredictor_Constant.C.
References initialized, predictor, and secant.
LOCA::MultiPredictor::AbstractStrategy & LOCA::MultiPredictor::Constant::operator= | ( | const LOCA::MultiPredictor::AbstractStrategy & | source | ) | [virtual] |
Assignment operator.
Implements LOCA::MultiPredictor::AbstractStrategy.
Definition at line 78 of file LOCA_MultiPredictor_Constant.C.
References NOX::DeepCopy, globalData, initialized, predictor, and secant.
Teuchos::RCP< LOCA::MultiPredictor::AbstractStrategy > LOCA::MultiPredictor::Constant::clone | ( | NOX::CopyType | type = NOX::DeepCopy |
) | const [virtual] |
Clone function.
Implements LOCA::MultiPredictor::AbstractStrategy.
Definition at line 99 of file LOCA_MultiPredictor_Constant.C.
References Constant().
NOX::Abstract::Group::ReturnType LOCA::MultiPredictor::Constant::compute | ( | bool | baseOnSecant, | |
const vector< double > & | stepSize, | |||
LOCA::MultiContinuation::ExtendedGroup & | grp, | |||
const LOCA::MultiContinuation::ExtendedVector & | prevXVec, | |||
const LOCA::MultiContinuation::ExtendedVector & | xVec | |||
) | [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 predictor computation described above
Implements LOCA::MultiPredictor::AbstractStrategy.
Definition at line 105 of file LOCA_MultiPredictor_Constant.C.
References LOCA::MultiContinuation::ExtendedVector::clone(), LOCA::Extended::Vector::createMultiVector(), globalData, initialized, NOX::Abstract::Group::Ok, predictor, secant, LOCA::MultiPredictor::AbstractStrategy::setPredictorOrientation(), NOX::ShapeCopy, and NOX::Utils::StepperDetails.
NOX::Abstract::Group::ReturnType LOCA::MultiPredictor::Constant::evaluate | ( | const vector< double > & | stepSize, | |
const LOCA::MultiContinuation::ExtendedVector & | xVec, | |||
LOCA::MultiContinuation::ExtendedMultiVector & | result | |||
) | const [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.
Definition at line 141 of file LOCA_MultiPredictor_Constant.C.
References NOX::Abstract::Group::Ok, and predictor.
NOX::Abstract::Group::ReturnType LOCA::MultiPredictor::Constant::computeTangent | ( | LOCA::MultiContinuation::ExtendedMultiVector & | tangent | ) | [virtual] |
Compute tangent to predictor and store in tangent
.
Implements LOCA::MultiPredictor::AbstractStrategy.
Definition at line 156 of file LOCA_MultiPredictor_Constant.C.
References NOX::Abstract::Group::Ok, and predictor.
bool LOCA::MultiPredictor::Constant::isTangentScalable | ( | ) | const [virtual] |
Is the tangent vector for this predictor scalable.
For the constant predictor, this always returns false.
Implements LOCA::MultiPredictor::AbstractStrategy.
Definition at line 165 of file LOCA_MultiPredictor_Constant.C.
Teuchos::RCP<LOCA::GlobalData> LOCA::MultiPredictor::Constant::globalData [protected] |
LOCA global data object.
Definition at line 132 of file LOCA_MultiPredictor_Constant.H.
Referenced by compute(), and operator=().
Teuchos::RCP<LOCA::MultiContinuation::ExtendedMultiVector> LOCA::MultiPredictor::Constant::predictor [protected] |
Stores predictor vector.
Definition at line 135 of file LOCA_MultiPredictor_Constant.H.
Referenced by compute(), computeTangent(), Constant(), evaluate(), and operator=().
Teuchos::RCP<LOCA::MultiContinuation::ExtendedVector> LOCA::MultiPredictor::Constant::secant [protected] |
Stores secant vector for setting orientation.
Definition at line 138 of file LOCA_MultiPredictor_Constant.H.
Referenced by compute(), Constant(), and operator=().
bool LOCA::MultiPredictor::Constant::initialized [protected] |
Flag indicating whether vectors have been initialized.
Definition at line 141 of file LOCA_MultiPredictor_Constant.H.
Referenced by compute(), Constant(), and operator=().