#include <LOCA_Thyra_Group.H>
Public Member Functions | |
Group (const Teuchos::RCP< LOCA::GlobalData > &global_data, const NOX::Thyra::Vector &initial_guess, const Teuchos::RCP< ::Thyra::ModelEvaluator< double > > &model, const LOCA::ParameterVector &p, int p_index, bool implement_dfdp=false) | |
Constructor. | |
Group (const Group &source, NOX::CopyType type=NOX::DeepCopy) | |
Copy constructor. If type is DeepCopy, takes ownership of valid shared Jacobian. | |
virtual | ~Group () |
Destructor. | |
virtual Group & | operator= (const Group &source) |
Assignment operator. | |
void | setSaveDataStrategy (const Teuchos::RCP< LOCA::Thyra::SaveDataStrategy > &s) |
Set strategy object for saving continuation data. | |
Overloaded NOX::Thyra::Group methods. | |
virtual NOX::Abstract::Group & | operator= (const NOX::Abstract::Group &source) |
Assignment operator. | |
virtual NOX::Abstract::Group & | operator= (const NOX::Thyra::Group &source) |
Assignment operator. | |
virtual Teuchos::RCP < NOX::Abstract::Group > | clone (NOX::CopyType type=NOX::DeepCopy) const |
Cloning function. | |
virtual NOX::Abstract::Group::ReturnType | computeF () |
Overloaded computeF(). | |
virtual NOX::Abstract::Group::ReturnType | computeJacobian () |
Overloaded computeJacobian(). | |
Implementation of LOCA::MultiContinuation::AbstractGroup virtual methods. | |
virtual void | copy (const NOX::Abstract::Group &source) |
Copy. | |
virtual void | setParams (const ParameterVector &p) |
Set the parameters. | |
virtual void | setParam (int paramID, double val) |
Set parameter indexed by paramID. | |
virtual void | setParam (string paramID, double val) |
Set parameter indexed by paramID. | |
const LOCA::ParameterVector & | getParams () const |
Return a const reference to the ParameterVector owned by the group. | |
virtual double | getParam (int paramID) const |
Return copy of parameter indexed by paramID. | |
virtual double | getParam (string paramID) const |
Return copy of parameter indexed by paramID. | |
virtual NOX::Abstract::Group::ReturnType | computeDfDpMulti (const vector< int > ¶mIDs, NOX::Abstract::MultiVector &dfdp, bool isValidF) |
virtual void | preProcessContinuationStep (LOCA::Abstract::Iterator::StepStatus stepStatus) |
Perform any preprocessing before a continuation step starts. | |
virtual void | postProcessContinuationStep (LOCA::Abstract::Iterator::StepStatus stepStatus) |
Perform any postprocessing after a continuation step finishes. | |
virtual void | projectToDraw (const NOX::Abstract::Vector &x, double *px) const |
Projects solution to a few scalars for multiparameter continuation. | |
virtual int | projectToDrawDimension () const |
Returns the dimension of the project to draw array. | |
virtual double | computeScaledDotProduct (const NOX::Abstract::Vector &a, const NOX::Abstract::Vector &b) const |
Compute a scaled dot product. | |
virtual void | printSolution (const double conParam) const |
Call the user interface print() routine, solution vector. | |
virtual void | printSolution (const NOX::Abstract::Vector &x, const double conParam) const |
Call the user interface print() routine, any vector. | |
virtual void | scaleVector (NOX::Abstract::Vector &x) const |
Scales a vector using scaling vector. | |
Implementation of LOCA::TimeDependent::AbstractGroup virtual methods. | |
virtual NOX::Abstract::Group::ReturnType | computeShiftedMatrix (double alpha, double beta) |
Compute the shifted matrix. | |
virtual NOX::Abstract::Group::ReturnType | applyShiftedMatrix (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const |
Multiply the shifted matrix by a vector. | |
virtual NOX::Abstract::Group::ReturnType | applyShiftedMatrixMultiVector (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const |
Multiply the shifted matrix by a multi-vector. | |
virtual NOX::Abstract::Group::ReturnType | applyShiftedMatrixInverseMultiVector (Teuchos::ParameterList ¶ms, const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const |
Apply the inverse of the shifted matrix by a multi-vector, as needed by the shift-and-invert and generalized Cayley transformations. | |
Protected Attributes | |
Teuchos::RCP< LOCA::GlobalData > | globalData |
Global data. | |
LOCA::ParameterVector | params |
Parameter vector. | |
int | param_index |
Parameter index in Thyra::ModelEvaluator. | |
Teuchos::RCP < ::Thyra::VectorBase< double > > | param_thyra_vec |
Pointer to Thyra vector storing parameters. | |
Teuchos::RCP < ::Thyra::VectorBase< double > > | x_dot_vec |
Pointer to x_dot vector of zeros. | |
Teuchos::RCP < LOCA::Thyra::SaveDataStrategy > | saveDataStrategy |
Strategy object for saving continuation data. | |
bool | implement_dfdp |
Whether we should implement df/dp, or use DerivUtils. |
Definition at line 62 of file LOCA_Thyra_Group.H.
LOCA::Thyra::Group::Group | ( | const Teuchos::RCP< LOCA::GlobalData > & | global_data, | |
const NOX::Thyra::Vector & | initial_guess, | |||
const Teuchos::RCP< ::Thyra::ModelEvaluator< double > > & | model, | |||
const LOCA::ParameterVector & | p, | |||
int | p_index, | |||
bool | implement_dfdp = false | |||
) |
Constructor.
Definition at line 53 of file LOCA_Thyra_Group.C.
References LOCA::ParameterVector::getDoubleArrayPointer(), LOCA::ParameterVector::length(), NOX::Thyra::Group::model_, param_index, param_thyra_vec, params, and x_dot_vec.
LOCA::Thyra::Group::Group | ( | const Group & | source, | |
NOX::CopyType | type = NOX::DeepCopy | |||
) |
Copy constructor. If type is DeepCopy, takes ownership of valid shared Jacobian.
Definition at line 83 of file LOCA_Thyra_Group.C.
References LOCA::ParameterVector::getDoubleArrayPointer(), LOCA::ParameterVector::length(), NOX::Thyra::Group::model_, param_index, param_thyra_vec, params, and x_dot_vec.
LOCA::Thyra::Group::~Group | ( | ) | [virtual] |
Destructor.
Reimplemented from NOX::Thyra::Group.
Definition at line 108 of file LOCA_Thyra_Group.C.
LOCA::Thyra::Group & LOCA::Thyra::Group::operator= | ( | const Group & | source | ) | [virtual] |
Assignment operator.
Definition at line 113 of file LOCA_Thyra_Group.C.
References copy(), implement_dfdp, param_index, params, and saveDataStrategy.
Referenced by operator=().
NOX::Abstract::Group & LOCA::Thyra::Group::operator= | ( | const NOX::Abstract::Group & | source | ) | [virtual] |
Assignment operator.
Reimplemented from NOX::Thyra::Group.
Definition at line 129 of file LOCA_Thyra_Group.C.
References operator=().
NOX::Abstract::Group & LOCA::Thyra::Group::operator= | ( | const NOX::Thyra::Group & | source | ) | [virtual] |
Assignment operator.
Reimplemented from NOX::Thyra::Group.
Definition at line 136 of file LOCA_Thyra_Group.C.
References operator=().
Teuchos::RCP< NOX::Abstract::Group > LOCA::Thyra::Group::clone | ( | NOX::CopyType | type = NOX::DeepCopy |
) | const [virtual] |
Cloning function.
Reimplemented from NOX::Thyra::Group.
Definition at line 143 of file LOCA_Thyra_Group.C.
NOX::Abstract::Group::ReturnType LOCA::Thyra::Group::computeF | ( | ) | [virtual] |
Overloaded computeF().
Reimplemented from NOX::Thyra::Group.
Definition at line 149 of file LOCA_Thyra_Group.C.
References NOX::Thyra::Group::f_vec_, NOX::Abstract::Group::Failed, NOX::Thyra::Group::in_args_, NOX::Thyra::Group::isF(), NOX::Thyra::Group::model_, NOX::Abstract::Group::Ok, NOX::Thyra::Group::out_args_, param_index, param_thyra_vec, x_dot_vec, and NOX::Thyra::Group::x_vec_.
NOX::Abstract::Group::ReturnType LOCA::Thyra::Group::computeJacobian | ( | ) | [virtual] |
Overloaded computeJacobian().
Reimplemented from NOX::Thyra::Group.
Definition at line 175 of file LOCA_Thyra_Group.C.
References NOX::Abstract::Group::Failed, NOX::Thyra::Group::in_args_, NOX::Thyra::Group::isJacobian(), NOX::Thyra::Group::model_, NOX::Abstract::Group::Ok, NOX::Thyra::Group::out_args_, param_index, param_thyra_vec, NOX::Thyra::Group::shared_jacobian_, x_dot_vec, and NOX::Thyra::Group::x_vec_.
void LOCA::Thyra::Group::copy | ( | const NOX::Abstract::Group & | source | ) | [virtual] |
Copy.
Reimplemented from LOCA::Abstract::Group.
Definition at line 205 of file LOCA_Thyra_Group.C.
Referenced by operator=().
void LOCA::Thyra::Group::setParams | ( | const ParameterVector & | p | ) | [virtual] |
Set the parameters.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 211 of file LOCA_Thyra_Group.C.
References params, and NOX::Thyra::Group::resetIsValidFlags().
void LOCA::Thyra::Group::setParam | ( | int | paramID, | |
double | val | |||
) | [virtual] |
Set parameter indexed by paramID.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 218 of file LOCA_Thyra_Group.C.
References params, NOX::Thyra::Group::resetIsValidFlags(), and LOCA::ParameterVector::setValue().
void LOCA::Thyra::Group::setParam | ( | string | paramID, | |
double | val | |||
) | [virtual] |
Set parameter indexed by paramID.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 225 of file LOCA_Thyra_Group.C.
References params, NOX::Thyra::Group::resetIsValidFlags(), and LOCA::ParameterVector::setValue().
const LOCA::ParameterVector & LOCA::Thyra::Group::getParams | ( | ) | const [virtual] |
Return a const reference to the ParameterVector owned by the group.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 232 of file LOCA_Thyra_Group.C.
References params.
double LOCA::Thyra::Group::getParam | ( | int | paramID | ) | const [virtual] |
Return copy of parameter indexed by paramID.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 238 of file LOCA_Thyra_Group.C.
References LOCA::ParameterVector::getValue(), and params.
double LOCA::Thyra::Group::getParam | ( | string | paramID | ) | const [virtual] |
Return copy of parameter indexed by paramID.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 244 of file LOCA_Thyra_Group.C.
References LOCA::ParameterVector::getValue(), and params.
NOX::Abstract::Group::ReturnType LOCA::Thyra::Group::computeDfDpMulti | ( | const vector< int > & | paramIDs, | |
NOX::Abstract::MultiVector & | dfdp, | |||
bool | isValidF | |||
) | [virtual] |
Compute for each parameter
indexed by paramIDs. The first column of dfdp holds F, which is valid if isValidF is true. Otherwise F must be computed.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 250 of file LOCA_Thyra_Group.C.
References NOX::Abstract::Group::Failed, NOX::Thyra::Vector::getThyraRCPVector(), implement_dfdp, NOX::Thyra::Group::in_args_, LOCA::ParameterVector::length(), NOX::Thyra::Group::model_, NOX::Abstract::MultiVector::numVectors(), NOX::Abstract::Group::Ok, NOX::Thyra::Group::out_args_, param_index, param_thyra_vec, params, NOX::Abstract::MultiVector::subView(), x_dot_vec, and NOX::Thyra::Group::x_vec_.
void LOCA::Thyra::Group::preProcessContinuationStep | ( | LOCA::Abstract::Iterator::StepStatus | stepStatus | ) | [virtual] |
Perform any preprocessing before a continuation step starts.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
Definition at line 318 of file LOCA_Thyra_Group.C.
References saveDataStrategy.
void LOCA::Thyra::Group::postProcessContinuationStep | ( | LOCA::Abstract::Iterator::StepStatus | stepStatus | ) | [virtual] |
Perform any postprocessing after a continuation step finishes.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
Definition at line 326 of file LOCA_Thyra_Group.C.
References saveDataStrategy.
void LOCA::Thyra::Group::projectToDraw | ( | const NOX::Abstract::Vector & | x, | |
double * | px | |||
) | const [virtual] |
Projects solution to a few scalars for multiparameter continuation.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
Definition at line 334 of file LOCA_Thyra_Group.C.
References saveDataStrategy.
int LOCA::Thyra::Group::projectToDrawDimension | ( | ) | const [virtual] |
Returns the dimension of the project to draw array.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
Definition at line 342 of file LOCA_Thyra_Group.C.
References saveDataStrategy.
double LOCA::Thyra::Group::computeScaledDotProduct | ( | const NOX::Abstract::Vector & | a, | |
const NOX::Abstract::Vector & | b | |||
) | const [virtual] |
Compute a scaled dot product.
The implementation here uses the standard dot product divided by the length of the vectors.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
Definition at line 350 of file LOCA_Thyra_Group.C.
References NOX::Abstract::Vector::innerProduct(), and NOX::Abstract::Vector::length().
void LOCA::Thyra::Group::printSolution | ( | const double | conParam | ) | const [virtual] |
Call the user interface print() routine, solution vector.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
Definition at line 358 of file LOCA_Thyra_Group.C.
References NOX::Thyra::Group::x_vec_.
void LOCA::Thyra::Group::printSolution | ( | const NOX::Abstract::Vector & | x, | |
const double | conParam | |||
) | const [virtual] |
Call the user interface print() routine, any vector.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
Definition at line 364 of file LOCA_Thyra_Group.C.
References saveDataStrategy.
void LOCA::Thyra::Group::scaleVector | ( | NOX::Abstract::Vector & | x | ) | const [virtual] |
Scales a vector using scaling vector.
The implementation here rescales the vector by the square root of its length.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
Definition at line 372 of file LOCA_Thyra_Group.C.
References NOX::Abstract::Vector::length(), and NOX::Abstract::Vector::scale().
NOX::Abstract::Group::ReturnType LOCA::Thyra::Group::computeShiftedMatrix | ( | double | alpha, | |
double | beta | |||
) | [virtual] |
Compute the shifted matrix.
Reimplemented from LOCA::Abstract::Group.
Definition at line 378 of file LOCA_Thyra_Group.C.
References NOX::Abstract::Group::Failed, NOX::Thyra::Group::in_args_, NOX::Thyra::Group::model_, NOX::Abstract::Group::Ok, NOX::Thyra::Group::out_args_, param_index, param_thyra_vec, NOX::Thyra::Group::shared_jacobian_, x_dot_vec, and NOX::Thyra::Group::x_vec_.
NOX::Abstract::Group::ReturnType LOCA::Thyra::Group::applyShiftedMatrix | ( | const NOX::Abstract::Vector & | input, | |
NOX::Abstract::Vector & | result | |||
) | const [virtual] |
Multiply the shifted matrix by a vector.
Reimplemented from LOCA::Abstract::Group.
Definition at line 405 of file LOCA_Thyra_Group.C.
References NOX::Thyra::Vector::getThyraVector(), NOX::Abstract::Group::Ok, and NOX::Thyra::Group::shared_jacobian_.
NOX::Abstract::Group::ReturnType LOCA::Thyra::Group::applyShiftedMatrixMultiVector | ( | const NOX::Abstract::MultiVector & | input, | |
NOX::Abstract::MultiVector & | result | |||
) | const [virtual] |
Multiply the shifted matrix by a multi-vector.
Reimplemented from LOCA::Abstract::Group.
Definition at line 420 of file LOCA_Thyra_Group.C.
References NOX::Thyra::MultiVector::getThyraMultiVector(), NOX::Abstract::Group::Ok, and NOX::Thyra::Group::shared_jacobian_.
NOX::Abstract::Group::ReturnType LOCA::Thyra::Group::applyShiftedMatrixInverseMultiVector | ( | Teuchos::ParameterList & | params, | |
const NOX::Abstract::MultiVector & | input, | |||
NOX::Abstract::MultiVector & | result | |||
) | const [virtual] |
Apply the inverse of the shifted matrix by a multi-vector, as needed by the shift-and-invert and generalized Cayley transformations.
Reimplemented from LOCA::Abstract::Group.
Definition at line 438 of file LOCA_Thyra_Group.C.
References NOX::Thyra::Group::applyJacobianInverseMultiVector().
void LOCA::Thyra::Group::setSaveDataStrategy | ( | const Teuchos::RCP< LOCA::Thyra::SaveDataStrategy > & | s | ) |
Set strategy object for saving continuation data.
Definition at line 447 of file LOCA_Thyra_Group.C.
References saveDataStrategy.
Teuchos::RCP<LOCA::GlobalData> LOCA::Thyra::Group::globalData [protected] |
Global data.
Reimplemented from LOCA::Abstract::Group.
Definition at line 232 of file LOCA_Thyra_Group.H.
LOCA::ParameterVector LOCA::Thyra::Group::params [protected] |
Parameter vector.
Definition at line 235 of file LOCA_Thyra_Group.H.
Referenced by computeDfDpMulti(), getParam(), getParams(), Group(), operator=(), setParam(), and setParams().
int LOCA::Thyra::Group::param_index [protected] |
Parameter index in Thyra::ModelEvaluator.
Definition at line 238 of file LOCA_Thyra_Group.H.
Referenced by computeDfDpMulti(), computeF(), computeJacobian(), computeShiftedMatrix(), Group(), and operator=().
Teuchos::RCP< ::Thyra::VectorBase<double> > LOCA::Thyra::Group::param_thyra_vec [protected] |
Pointer to Thyra vector storing parameters.
Definition at line 241 of file LOCA_Thyra_Group.H.
Referenced by computeDfDpMulti(), computeF(), computeJacobian(), computeShiftedMatrix(), and Group().
Teuchos::RCP< ::Thyra::VectorBase<double> > LOCA::Thyra::Group::x_dot_vec [protected] |
Pointer to x_dot vector of zeros.
Definition at line 244 of file LOCA_Thyra_Group.H.
Referenced by computeDfDpMulti(), computeF(), computeJacobian(), computeShiftedMatrix(), and Group().
Teuchos::RCP<LOCA::Thyra::SaveDataStrategy> LOCA::Thyra::Group::saveDataStrategy [protected] |
Strategy object for saving continuation data.
Definition at line 247 of file LOCA_Thyra_Group.H.
Referenced by operator=(), postProcessContinuationStep(), preProcessContinuationStep(), printSolution(), projectToDraw(), projectToDrawDimension(), and setSaveDataStrategy().
bool LOCA::Thyra::Group::implement_dfdp [protected] |
Whether we should implement df/dp, or use DerivUtils.
Definition at line 250 of file LOCA_Thyra_Group.H.
Referenced by computeDfDpMulti(), and operator=().