#include <LOCA_Homotopy_Group.H>
Public Member Functions | |
Group (Teuchos::ParameterList &locaSublist, const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< LOCA::Homotopy::AbstractGroup > &g, double scaleRandom=1.0, double scaleInitialGuess=0.0) | |
Constructor to set the base group and generate the "%Stepper" sublist for homotopy continuation. | |
Group (Teuchos::ParameterList &locaSublist, const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< LOCA::Homotopy::AbstractGroup > &g, const NOX::Abstract::Vector &randomVector) | |
Constructor with a user supplied random vector. | |
Group (const Group &source, NOX::CopyType type=NOX::DeepCopy) | |
Copy constructor. | |
virtual | ~Group () |
Destructor. | |
Implementation of NOX::Abstract::Group virtual methods | |
virtual NOX::Abstract::Group & | operator= (const NOX::Abstract::Group &source) |
Assignment operator. | |
virtual Teuchos::RCP < NOX::Abstract::Group > | clone (NOX::CopyType type=NOX::DeepCopy) const |
Cloning function. | |
virtual void | setX (const NOX::Abstract::Vector &y) |
Set the solution vector, x, to y. | |
virtual void | computeX (const NOX::Abstract::Group &g, const NOX::Abstract::Vector &d, double step) |
Compute this.x = grp.x + step * d. | |
virtual NOX::Abstract::Group::ReturnType | computeF () |
Compute the homotopy residual $g$. | |
virtual NOX::Abstract::Group::ReturnType | computeJacobian () |
Compute the Jacobian derivative of the homotopy residual $g$. | |
virtual NOX::Abstract::Group::ReturnType | computeGradient () |
Compute gradient of homotopy residual $g$. | |
virtual NOX::Abstract::Group::ReturnType | computeNewton (Teuchos::ParameterList ¶ms) |
Compute Newton direction using applyJacobianInverse. | |
virtual NOX::Abstract::Group::ReturnType | applyJacobian (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const |
Computes the homotopy Jacobian vector product. | |
virtual NOX::Abstract::Group::ReturnType | applyJacobianTranspose (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const |
Computes the homotopy Jacobian-transpose vector product. | |
virtual NOX::Abstract::Group::ReturnType | applyJacobianInverse (Teuchos::ParameterList ¶ms, const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const |
Applies the inverse of the homotopy Jacobian matrix. | |
virtual NOX::Abstract::Group::ReturnType | applyJacobianMultiVector (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const |
Applies Jacobian for homotopy system. | |
virtual NOX::Abstract::Group::ReturnType | applyJacobianTransposeMultiVector (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const |
Applies Jacobian-transpose for homotopy system. | |
virtual NOX::Abstract::Group::ReturnType | applyJacobianInverseMultiVector (Teuchos::ParameterList ¶ms, const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const |
Applies Jacobian inverse for homotopy system. | |
virtual bool | isF () const |
Return true if the homotopy residual ![]() | |
virtual bool | isJacobian () const |
Return true if the homotopy Jacobian is valid. | |
virtual bool | isGradient () const |
Return true if the homotopy gradient is valid. | |
virtual bool | isNewton () const |
Return true if the homotopy Newton direction is valid. | |
virtual const NOX::Abstract::Vector & | getX () const |
Return homotopy solution vector ![]() | |
virtual const NOX::Abstract::Vector & | getF () const |
Return homotopy residual ![]() | |
virtual double | getNormF () const |
Return 2-norm of ![]() | |
virtual const NOX::Abstract::Vector & | getGradient () const |
Return homotopy gradient. | |
virtual const NOX::Abstract::Vector & | getNewton () const |
Return homotopy Newton direction. | |
Implementation of LOCA::Extended::MultiAbstractGroup | |
virtual methods | |
virtual Teuchos::RCP< const LOCA::MultiContinuation::AbstractGroup > | getUnderlyingGroup () const |
Return underlying group. | |
virtual Teuchos::RCP < LOCA::MultiContinuation::AbstractGroup > | getUnderlyingGroup () |
Return underlying group. | |
Implementation of LOCA::MultiContinuation::AbstractGroup | |
virtual methods | |
virtual void | copy (const NOX::Abstract::Group &source) |
Assignment. | |
virtual void | setParamsMulti (const vector< int > ¶mIDs, const NOX::Abstract::MultiVector::DenseMatrix &vals) |
Set parameters indexed by (integer) paramIDs. | |
virtual void | setParams (const ParameterVector &p) |
Set the parameter vector in the group to p. | |
virtual void | setParam (int paramID, double val) |
Set parameter indexed by paramID. | |
virtual void | setParam (string paramID, double val) |
Set parameter indexed by paramID. | |
virtual const ParameterVector & | getParams () const |
Return a const reference to the paramter vector 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 void | printSolution (const double conParam) const |
Function to print out solution and continuation parameter after successful continuation step. | |
virtual void | printSolution (const NOX::Abstract::Vector &x_, const double conParam) const |
Function to print out solution and continuation parameter after successful continuation step. | |
Protected Member Functions | |
void | resetIsValidFlags () |
Reset the isValid flags to false. | |
void | setStepperParameters (Teuchos::ParameterList ¶ms) |
Creates and sets the "Stepper" parameter sublist. | |
Protected Attributes | |
Teuchos::RCP< LOCA::GlobalData > | globalData |
Pointer LOCA global data object. | |
Teuchos::RCP < LOCA::Homotopy::AbstractGroup > | grpPtr |
Stores the underlying loca group. | |
Teuchos::RCP < NOX::Abstract::Vector > | gVecPtr |
Stores the homotopy residual vector, ![]() | |
Teuchos::RCP < NOX::Abstract::Vector > | randomVecPtr |
Stores the random Vector, ![]() | |
Teuchos::RCP < NOX::Abstract::Vector > | newtonVecPtr |
Stores the homotopy Newton vector, ![]() | |
Teuchos::RCP < NOX::Abstract::Vector > | gradVecPtr |
bool | isValidF |
Is residual vector valid. | |
bool | isValidJacobian |
Is Jacobian matrix valid. | |
bool | isValidNewton |
Is Newton vector valid. | |
bool | isValidGradient |
Is gradient vector valid. | |
LOCA::ParameterVector | paramVec |
Copy of the ParameterVector for the underlying grpPtr. | |
double | conParam |
Value of the homotopy continuation parameter. | |
int | conParamID |
Continuatioin parameter ID number from the ParameterVector. | |
const string | conParamLabel |
Contains the string used to identify the homotopy parameter in the ParameterVector object. | |
bool | augmentJacForHomotopyNotImplemented |
Tracks whether the LOCA::Homotopy::Group method augmentJacobianForHomotopy is implemented. If not, the augmentation is applied during the applyJacobian assuming a matrix-free implementation. | |
Private Member Functions | |
Group & | operator= (const Group &) |
Prohibit generation and use of operator=(). |
The HomotopyGroup is a concrete implementation of the LOCA::Continuation::AbstractGroup that modifies the set of nonlinear equations to be solved to allow for Homotopy to be applied to the system. This object should be used in conjunction with the LOCA::Stepper object to drive the continuation. This algorithm solves a system of nonlinear equations supplied by the user () through continuation. An artificial parameter
is used to control the continuation. The idea is to solve a simple equation starting at
= 0 and, using the solution from the previous step, solve systems of equations that gets progressively closer to the true system of interest ( at
= 1.0 we recover the original equations
). By constraining the definition of
and using artificial parameter contiuation, the continuation branch should be free of multiplicity and bifurcation phenomena.
The modified system of equations, , supplied by the HomotopyGroup is defined as:
where is the solution vector,
is an artificial parameter,
is the set of nonlinear equations the user supplies,
is the corresponding set of homotopy equations that LOCA will solve, and
is a random vector.
This group requires the loca Stepper for continuation from = 0.0 (a simple set of equations to solve) to
= 1.0 (the set of equations requested by the user,
). The Homotopy::Group will generate the Stepper parameter sublist in the parameter list that is passed in to the constructor. The user is free to modify this list (it sets default values) before passing it into the stepper object but should NOT change the starting and stopping values for the continuation parameter.
References:
Definition at line 111 of file LOCA_Homotopy_Group.H.
LOCA::Homotopy::Group::Group | ( | Teuchos::ParameterList & | locaSublist, | |
const Teuchos::RCP< LOCA::GlobalData > & | global_data, | |||
const Teuchos::RCP< LOCA::Homotopy::AbstractGroup > & | g, | |||
double | scaleRandom = 1.0 , |
|||
double | scaleInitialGuess = 0.0 | |||
) |
Constructor to set the base group and generate the "%Stepper" sublist for homotopy continuation.
The locaSublist variable is the "LOCA" sublist (of type Teuchos::ParameterList) that will be used in loca continuation runs.
The variables scalarRandomVector and scalarInitialGuess are used to give some control over the generation of the random vector. In certain instances we have seen the random vector force the solution to a set of variables that are unphysical and could break the function evaluations (cause them to return nan). For example, in heat transfer problems, the temperature could be the dependent variable. If the solution vector has an unphysical temperature ( the random vector could force the temperature to negative or near zero values for the solution at ) then property evaluations could break. The random vector can be modified to keep the values near the initial guess based on values supplied to the constructor of the HomotopyGroup:
where is the random vector generated by a call to NOX::Abstract::Vector::random(),
is a scalar value,
is the initial guess to the solution vector, and
is a scalar value. The defualt values force the random vector to be calculated as:
IMPORTANT: For homotopy to work correctly you should not change the starting and stopping parameter values (0.0 and 1.0 respectively) set in the "%Stepper" sublist.
Definition at line 51 of file LOCA_Homotopy_Group.C.
References LOCA::ParameterVector::addParameter(), conParam, conParamID, conParamLabel, LOCA::ParameterVector::getIndex(), grpPtr, paramVec, randomVecPtr, resetIsValidFlags(), and setStepperParameters().
LOCA::Homotopy::Group::Group | ( | Teuchos::ParameterList & | locaSublist, | |
const Teuchos::RCP< LOCA::GlobalData > & | global_data, | |||
const Teuchos::RCP< LOCA::Homotopy::AbstractGroup > & | g, | |||
const NOX::Abstract::Vector & | randomVector | |||
) |
Constructor with a user supplied random vector.
Definition at line 90 of file LOCA_Homotopy_Group.C.
References LOCA::ParameterVector::addParameter(), conParam, conParamID, conParamLabel, LOCA::ParameterVector::getIndex(), grpPtr, paramVec, randomVecPtr, resetIsValidFlags(), and setStepperParameters().
LOCA::Homotopy::Group::Group | ( | const Group & | source, | |
NOX::CopyType | type = NOX::DeepCopy | |||
) |
Copy constructor.
Definition at line 126 of file LOCA_Homotopy_Group.C.
References NOX::DeepCopy, globalData, gradVecPtr, isValidF, isValidGradient, isValidJacobian, isValidNewton, newtonVecPtr, resetIsValidFlags(), and NOX::ShapeCopy.
LOCA::Homotopy::Group::~Group | ( | ) | [virtual] |
Destructor.
Reimplemented from NOX::Abstract::Group.
Definition at line 164 of file LOCA_Homotopy_Group.C.
NOX::Abstract::Group & LOCA::Homotopy::Group::operator= | ( | const NOX::Abstract::Group & | source | ) | [virtual] |
Assignment operator.
Implements NOX::Abstract::Group.
Definition at line 169 of file LOCA_Homotopy_Group.C.
References copy().
Teuchos::RCP< NOX::Abstract::Group > LOCA::Homotopy::Group::clone | ( | NOX::CopyType | type = NOX::DeepCopy |
) | const [virtual] |
Cloning function.
Implements NOX::Abstract::Group.
Definition at line 176 of file LOCA_Homotopy_Group.C.
void LOCA::Homotopy::Group::setX | ( | const NOX::Abstract::Vector & | y | ) | [virtual] |
Set the solution vector, x, to y.
Implements NOX::Abstract::Group.
Definition at line 182 of file LOCA_Homotopy_Group.C.
References grpPtr, and resetIsValidFlags().
void LOCA::Homotopy::Group::computeX | ( | const NOX::Abstract::Group & | g, | |
const NOX::Abstract::Vector & | d, | |||
double | step | |||
) | [virtual] |
Compute this.x = grp.x + step * d.
Implements NOX::Abstract::Group.
Definition at line 189 of file LOCA_Homotopy_Group.C.
References grpPtr, and resetIsValidFlags().
NOX::Abstract::Group::ReturnType LOCA::Homotopy::Group::computeF | ( | ) | [virtual] |
Compute the homotopy residual $g$.
Implements NOX::Abstract::Group.
Definition at line 200 of file LOCA_Homotopy_Group.C.
References conParam, grpPtr, gVecPtr, isValidF, NOX::Abstract::Group::Ok, and randomVecPtr.
Referenced by computeGradient(), and computeNewton().
NOX::Abstract::Group::ReturnType LOCA::Homotopy::Group::computeJacobian | ( | ) | [virtual] |
Compute the Jacobian derivative of the homotopy residual $g$.
Reimplemented from NOX::Abstract::Group.
Definition at line 220 of file LOCA_Homotopy_Group.C.
References augmentJacForHomotopyNotImplemented, conParam, grpPtr, isValidJacobian, NOX::Abstract::Group::NotDefined, and NOX::Abstract::Group::Ok.
Referenced by computeGradient(), and computeNewton().
NOX::Abstract::Group::ReturnType LOCA::Homotopy::Group::computeGradient | ( | ) | [virtual] |
Compute gradient of homotopy residual $g$.
Reimplemented from NOX::Abstract::Group.
Definition at line 242 of file LOCA_Homotopy_Group.C.
References applyJacobianTranspose(), computeF(), computeJacobian(), globalData, gradVecPtr, gVecPtr, isValidGradient, NOX::Abstract::Group::Ok, and NOX::ShapeCopy.
NOX::Abstract::Group::ReturnType LOCA::Homotopy::Group::computeNewton | ( | Teuchos::ParameterList & | params | ) | [virtual] |
Compute Newton direction using applyJacobianInverse.
Reimplemented from NOX::Abstract::Group.
Definition at line 271 of file LOCA_Homotopy_Group.C.
References applyJacobianInverse(), computeF(), computeJacobian(), globalData, gVecPtr, isValidNewton, newtonVecPtr, NOX::Abstract::Group::Ok, and NOX::ShapeCopy.
NOX::Abstract::Group::ReturnType LOCA::Homotopy::Group::applyJacobian | ( | const NOX::Abstract::Vector & | input, | |
NOX::Abstract::Vector & | result | |||
) | const [virtual] |
Computes the homotopy Jacobian vector product.
Reimplemented from NOX::Abstract::Group.
Definition at line 304 of file LOCA_Homotopy_Group.C.
References augmentJacForHomotopyNotImplemented, NOX::Abstract::Group::BadDependency, conParam, grpPtr, isValidJacobian, and NOX::Abstract::Vector::update().
NOX::Abstract::Group::ReturnType LOCA::Homotopy::Group::applyJacobianTranspose | ( | const NOX::Abstract::Vector & | input, | |
NOX::Abstract::Vector & | result | |||
) | const [virtual] |
Computes the homotopy Jacobian-transpose vector product.
Reimplemented from NOX::Abstract::Group.
Definition at line 322 of file LOCA_Homotopy_Group.C.
References augmentJacForHomotopyNotImplemented, NOX::Abstract::Group::BadDependency, conParam, grpPtr, isValidJacobian, and NOX::Abstract::Vector::update().
Referenced by computeGradient().
NOX::Abstract::Group::ReturnType LOCA::Homotopy::Group::applyJacobianInverse | ( | Teuchos::ParameterList & | params, | |
const NOX::Abstract::Vector & | input, | |||
NOX::Abstract::Vector & | result | |||
) | const [virtual] |
Applies the inverse of the homotopy Jacobian matrix.
Reimplemented from NOX::Abstract::Group.
Definition at line 341 of file LOCA_Homotopy_Group.C.
References grpPtr.
Referenced by computeNewton().
NOX::Abstract::Group::ReturnType LOCA::Homotopy::Group::applyJacobianMultiVector | ( | const NOX::Abstract::MultiVector & | input, | |
NOX::Abstract::MultiVector & | result | |||
) | const [virtual] |
Applies Jacobian for homotopy system.
Reimplemented from NOX::Abstract::Group.
Definition at line 349 of file LOCA_Homotopy_Group.C.
References augmentJacForHomotopyNotImplemented, NOX::Abstract::Group::BadDependency, conParam, grpPtr, isValidJacobian, and NOX::Abstract::MultiVector::update().
NOX::Abstract::Group::ReturnType LOCA::Homotopy::Group::applyJacobianTransposeMultiVector | ( | const NOX::Abstract::MultiVector & | input, | |
NOX::Abstract::MultiVector & | result | |||
) | const [virtual] |
Applies Jacobian-transpose for homotopy system.
Reimplemented from NOX::Abstract::Group.
Definition at line 368 of file LOCA_Homotopy_Group.C.
References augmentJacForHomotopyNotImplemented, NOX::Abstract::Group::BadDependency, conParam, grpPtr, isValidJacobian, and NOX::Abstract::MultiVector::update().
NOX::Abstract::Group::ReturnType LOCA::Homotopy::Group::applyJacobianInverseMultiVector | ( | Teuchos::ParameterList & | params, | |
const NOX::Abstract::MultiVector & | input, | |||
NOX::Abstract::MultiVector & | result | |||
) | const [virtual] |
Applies Jacobian inverse for homotopy system.
Reimplemented from NOX::Abstract::Group.
Definition at line 387 of file LOCA_Homotopy_Group.C.
References grpPtr.
bool LOCA::Homotopy::Group::isF | ( | ) | const [virtual] |
Return true
if the homotopy residual is valid.
Implements NOX::Abstract::Group.
Definition at line 396 of file LOCA_Homotopy_Group.C.
References isValidF.
bool LOCA::Homotopy::Group::isJacobian | ( | ) | const [virtual] |
Return true
if the homotopy Jacobian is valid.
Reimplemented from NOX::Abstract::Group.
Definition at line 402 of file LOCA_Homotopy_Group.C.
References isValidJacobian.
bool LOCA::Homotopy::Group::isGradient | ( | ) | const [virtual] |
Return true
if the homotopy gradient is valid.
Reimplemented from NOX::Abstract::Group.
Definition at line 414 of file LOCA_Homotopy_Group.C.
References isValidGradient.
bool LOCA::Homotopy::Group::isNewton | ( | ) | const [virtual] |
Return true
if the homotopy Newton direction is valid.
Reimplemented from NOX::Abstract::Group.
Definition at line 408 of file LOCA_Homotopy_Group.C.
References isValidNewton.
const NOX::Abstract::Vector & LOCA::Homotopy::Group::getX | ( | ) | const [virtual] |
Return homotopy solution vector .
Implements NOX::Abstract::Group.
Definition at line 420 of file LOCA_Homotopy_Group.C.
References grpPtr.
const NOX::Abstract::Vector & LOCA::Homotopy::Group::getF | ( | ) | const [virtual] |
Return homotopy residual .
Implements NOX::Abstract::Group.
Definition at line 426 of file LOCA_Homotopy_Group.C.
References gVecPtr.
double LOCA::Homotopy::Group::getNormF | ( | ) | const [virtual] |
Return 2-norm of .
Implements NOX::Abstract::Group.
Definition at line 432 of file LOCA_Homotopy_Group.C.
References gVecPtr.
const NOX::Abstract::Vector & LOCA::Homotopy::Group::getGradient | ( | ) | const [virtual] |
Return homotopy gradient.
Implements NOX::Abstract::Group.
Definition at line 438 of file LOCA_Homotopy_Group.C.
References globalData, and gradVecPtr.
const NOX::Abstract::Vector & LOCA::Homotopy::Group::getNewton | ( | ) | const [virtual] |
Return homotopy Newton direction.
Implements NOX::Abstract::Group.
Definition at line 449 of file LOCA_Homotopy_Group.C.
References globalData, and newtonVecPtr.
Teuchos::RCP< const LOCA::MultiContinuation::AbstractGroup > LOCA::Homotopy::Group::getUnderlyingGroup | ( | ) | const [virtual] |
Return underlying group.
Implements LOCA::Extended::MultiAbstractGroup.
Definition at line 459 of file LOCA_Homotopy_Group.C.
References grpPtr.
Teuchos::RCP< LOCA::MultiContinuation::AbstractGroup > LOCA::Homotopy::Group::getUnderlyingGroup | ( | ) | [virtual] |
Return underlying group.
Implements LOCA::Extended::MultiAbstractGroup.
Definition at line 465 of file LOCA_Homotopy_Group.C.
References grpPtr.
void LOCA::Homotopy::Group::copy | ( | const NOX::Abstract::Group & | source | ) | [virtual] |
Assignment.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 472 of file LOCA_Homotopy_Group.C.
References augmentJacForHomotopyNotImplemented, conParam, conParamID, globalData, gradVecPtr, grpPtr, gVecPtr, isValidF, isValidGradient, isValidJacobian, isValidNewton, newtonVecPtr, paramVec, and randomVecPtr.
Referenced by operator=().
void LOCA::Homotopy::Group::setParamsMulti | ( | const vector< int > & | paramIDs, | |
const NOX::Abstract::MultiVector::DenseMatrix & | vals | |||
) | [virtual] |
Set parameters indexed by (integer) paramIDs.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 503 of file LOCA_Homotopy_Group.C.
References conParam, conParamID, grpPtr, and resetIsValidFlags().
void LOCA::Homotopy::Group::setParams | ( | const ParameterVector & | p | ) | [virtual] |
Set the parameter vector in the group to p.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 515 of file LOCA_Homotopy_Group.C.
References conParam, conParamLabel, LOCA::ParameterVector::getValue(), grpPtr, and resetIsValidFlags().
void LOCA::Homotopy::Group::setParam | ( | int | paramID, | |
double | val | |||
) | [virtual] |
Set parameter indexed by paramID.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 523 of file LOCA_Homotopy_Group.C.
References conParam, conParamID, grpPtr, and resetIsValidFlags().
void LOCA::Homotopy::Group::setParam | ( | string | paramID, | |
double | val | |||
) | [virtual] |
Set parameter indexed by paramID.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 532 of file LOCA_Homotopy_Group.C.
References conParam, conParamLabel, grpPtr, and resetIsValidFlags().
const LOCA::ParameterVector & LOCA::Homotopy::Group::getParams | ( | ) | const [virtual] |
Return a const reference to the paramter vector owned by the group.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 541 of file LOCA_Homotopy_Group.C.
References grpPtr.
double LOCA::Homotopy::Group::getParam | ( | int | paramID | ) | const [virtual] |
Return copy of parameter indexed by paramID.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 547 of file LOCA_Homotopy_Group.C.
References grpPtr.
double LOCA::Homotopy::Group::getParam | ( | string | paramID | ) | const [virtual] |
Return copy of parameter indexed by paramID.
Implements LOCA::MultiContinuation::AbstractGroup.
Definition at line 553 of file LOCA_Homotopy_Group.C.
References grpPtr.
NOX::Abstract::Group::ReturnType LOCA::Homotopy::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 559 of file LOCA_Homotopy_Group.C.
References conParam, conParamID, grpPtr, randomVecPtr, NOX::Abstract::MultiVector::subView(), and NOX::Abstract::MultiVector::update().
void LOCA::Homotopy::Group::preProcessContinuationStep | ( | LOCA::Abstract::Iterator::StepStatus | stepStatus | ) | [virtual] |
Perform any preprocessing before a continuation step starts.
The stepStatus
argument indicates whether the previous step was successful.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
Definition at line 608 of file LOCA_Homotopy_Group.C.
References grpPtr.
void LOCA::Homotopy::Group::postProcessContinuationStep | ( | LOCA::Abstract::Iterator::StepStatus | stepStatus | ) | [virtual] |
Perform any postprocessing after a continuation step finishes.
The stepStatus
argument indicates whether the step was successful.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
Definition at line 615 of file LOCA_Homotopy_Group.C.
References grpPtr.
void LOCA::Homotopy::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 622 of file LOCA_Homotopy_Group.C.
References conParam, grpPtr, and projectToDrawDimension().
int LOCA::Homotopy::Group::projectToDrawDimension | ( | ) | const [virtual] |
Returns the dimension of the project to draw array.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
Definition at line 630 of file LOCA_Homotopy_Group.C.
References grpPtr.
Referenced by projectToDraw().
void LOCA::Homotopy::Group::printSolution | ( | const double | conParam | ) | const [virtual] |
Function to print out solution and continuation parameter after successful continuation step.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
Definition at line 636 of file LOCA_Homotopy_Group.C.
References conParam, globalData, grpPtr, and NOX::Utils::StepperDetails.
void LOCA::Homotopy::Group::printSolution | ( | const NOX::Abstract::Vector & | x_, | |
const double | conParam | |||
) | const [virtual] |
Function to print out solution and continuation parameter after successful continuation step.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
Definition at line 648 of file LOCA_Homotopy_Group.C.
References conParam, globalData, grpPtr, and NOX::Utils::StepperDetails.
void LOCA::Homotopy::Group::resetIsValidFlags | ( | ) | [protected] |
Reset the isValid flags to false.
This is called when the solution vector or parameter vector is changed.
Definition at line 661 of file LOCA_Homotopy_Group.C.
References isValidF, isValidGradient, isValidJacobian, and isValidNewton.
Referenced by computeX(), Group(), setParam(), setParams(), setParamsMulti(), and setX().
void LOCA::Homotopy::Group::setStepperParameters | ( | Teuchos::ParameterList & | params | ) | [protected] |
Creates and sets the "Stepper" parameter sublist.
Definition at line 671 of file LOCA_Homotopy_Group.C.
References conParamLabel.
Referenced by Group().
Prohibit generation and use of operator=().
Teuchos::RCP<LOCA::GlobalData> LOCA::Homotopy::Group::globalData [protected] |
Pointer LOCA global data object.
Definition at line 393 of file LOCA_Homotopy_Group.H.
Referenced by computeGradient(), computeNewton(), copy(), getGradient(), getNewton(), Group(), and printSolution().
Teuchos::RCP<LOCA::Homotopy::AbstractGroup> LOCA::Homotopy::Group::grpPtr [protected] |
Stores the underlying loca group.
Definition at line 396 of file LOCA_Homotopy_Group.H.
Referenced by applyJacobian(), applyJacobianInverse(), applyJacobianInverseMultiVector(), applyJacobianMultiVector(), applyJacobianTranspose(), applyJacobianTransposeMultiVector(), computeDfDpMulti(), computeF(), computeJacobian(), computeX(), copy(), getParam(), getParams(), getUnderlyingGroup(), getX(), Group(), postProcessContinuationStep(), preProcessContinuationStep(), printSolution(), projectToDraw(), projectToDrawDimension(), setParam(), setParams(), setParamsMulti(), and setX().
Teuchos::RCP<NOX::Abstract::Vector> LOCA::Homotopy::Group::gVecPtr [protected] |
Stores the homotopy residual vector, .
Definition at line 399 of file LOCA_Homotopy_Group.H.
Referenced by computeF(), computeGradient(), computeNewton(), copy(), getF(), and getNormF().
Teuchos::RCP<NOX::Abstract::Vector> LOCA::Homotopy::Group::randomVecPtr [protected] |
Stores the random Vector, .
Definition at line 402 of file LOCA_Homotopy_Group.H.
Referenced by computeDfDpMulti(), computeF(), copy(), and Group().
Teuchos::RCP<NOX::Abstract::Vector> LOCA::Homotopy::Group::newtonVecPtr [protected] |
Stores the homotopy Newton vector, .
Definition at line 408 of file LOCA_Homotopy_Group.H.
Referenced by computeNewton(), copy(), getNewton(), and Group().
Teuchos::RCP<NOX::Abstract::Vector> LOCA::Homotopy::Group::gradVecPtr [protected] |
Stores the homotopy gradient vector if needed, .
Definition at line 414 of file LOCA_Homotopy_Group.H.
Referenced by computeGradient(), copy(), getGradient(), and Group().
bool LOCA::Homotopy::Group::isValidF [protected] |
Is residual vector valid.
Definition at line 417 of file LOCA_Homotopy_Group.H.
Referenced by computeF(), copy(), Group(), isF(), and resetIsValidFlags().
bool LOCA::Homotopy::Group::isValidJacobian [protected] |
Is Jacobian matrix valid.
Definition at line 420 of file LOCA_Homotopy_Group.H.
Referenced by applyJacobian(), applyJacobianMultiVector(), applyJacobianTranspose(), applyJacobianTransposeMultiVector(), computeJacobian(), copy(), Group(), isJacobian(), and resetIsValidFlags().
bool LOCA::Homotopy::Group::isValidNewton [protected] |
Is Newton vector valid.
Definition at line 423 of file LOCA_Homotopy_Group.H.
Referenced by computeNewton(), copy(), Group(), isNewton(), and resetIsValidFlags().
bool LOCA::Homotopy::Group::isValidGradient [protected] |
Is gradient vector valid.
Definition at line 426 of file LOCA_Homotopy_Group.H.
Referenced by computeGradient(), copy(), Group(), isGradient(), and resetIsValidFlags().
LOCA::ParameterVector LOCA::Homotopy::Group::paramVec [protected] |
Copy of the ParameterVector for the underlying grpPtr.
We copy this and then add the homotopy parameter to the list.
Definition at line 430 of file LOCA_Homotopy_Group.H.
double LOCA::Homotopy::Group::conParam [protected] |
Value of the homotopy continuation parameter.
Ranges from 0.0 (easy solution) to 1.0 (solution to the system of interest).
Definition at line 436 of file LOCA_Homotopy_Group.H.
Referenced by applyJacobian(), applyJacobianMultiVector(), applyJacobianTranspose(), applyJacobianTransposeMultiVector(), computeDfDpMulti(), computeF(), computeJacobian(), copy(), Group(), printSolution(), projectToDraw(), setParam(), setParams(), and setParamsMulti().
int LOCA::Homotopy::Group::conParamID [protected] |
Continuatioin parameter ID number from the ParameterVector.
Definition at line 439 of file LOCA_Homotopy_Group.H.
Referenced by computeDfDpMulti(), copy(), Group(), setParam(), and setParamsMulti().
const string LOCA::Homotopy::Group::conParamLabel [protected] |
Contains the string used to identify the homotopy parameter in the ParameterVector object.
Definition at line 445 of file LOCA_Homotopy_Group.H.
Referenced by Group(), setParam(), setParams(), and setStepperParameters().
bool LOCA::Homotopy::Group::augmentJacForHomotopyNotImplemented [protected] |
Tracks whether the LOCA::Homotopy::Group method augmentJacobianForHomotopy is implemented. If not, the augmentation is applied during the applyJacobian assuming a matrix-free implementation.
Definition at line 453 of file LOCA_Homotopy_Group.H.
Referenced by applyJacobian(), applyJacobianMultiVector(), applyJacobianTranspose(), applyJacobianTransposeMultiVector(), computeJacobian(), and copy().