#include <LOCA_Homotopy_Group.H>
Inheritance diagram for LOCA::Homotopy::Group:
Public Member Functions | |
| Group (NOX::Parameter::List &locaSublist, 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 (NOX::Parameter::List &locaSublist, 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. | |
| virtual LOCA::Continuation::AbstractGroup & | operator= (const LOCA::Continuation::AbstractGroup &source) |
| Assignment operator. | |
| virtual LOCA::Extended::AbstractGroup & | operator= (const LOCA::Extended::AbstractGroup &source) |
| Assignment operator. | |
| virtual NOX::Abstract::Group & | operator= (const NOX::Abstract::Group &source) |
| Assignment operator. | |
| virtual Group & | operator= (const Group &source) |
| Assignment operator. | |
| virtual NOX::Abstract::Group * | clone (NOX::CopyType type=NOX::DeepCopy) const |
| Cloning function. | |
| virtual void | setParams (const ParameterVector &p) |
| Set the parameter list in the group to p (pVector = p). | |
| virtual const ParameterVector & | getParams () const |
| Return a const reference to the ParameterVector owned by the group. | |
| virtual void | setParam (int paramID, double val) |
| Set parameter indexed by paramID. | |
| virtual double | getParam (int paramID) const |
| Return copy of parameter indexed by paramID. | |
| virtual void | setParam (string paramID, double val) |
| Set parameter indexed by paramID. | |
| virtual double | getParam (string paramID) const |
| Return copy of parameter indexed by paramID. | |
| virtual NOX::Abstract::Group::ReturnType | computeDfDp (int paramID, NOX::Abstract::Vector &result) |
Compute for the extended system. | |
| virtual void | printSolution (const double conParam) const |
| Calls groups print function for solution vector null vec, and params. | |
| virtual void | printSolution (const NOX::Abstract::Vector &x_, const double conParm) const |
| Calls groups print function for solution vector null vec, and params. | |
| virtual const LOCA::Continuation::AbstractGroup & | getUnderlyingGroup () const |
| Return underlying group. | |
| virtual LOCA::Continuation::AbstractGroup & | getUnderlyingGroup () |
| Return underlying group. | |
"Compute" functions. | |
| 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 and return solution vector, x, where this.x = grp.x + step * d. | |
| virtual void | computeX (const Group &g, const NOX::Abstract::Vector &d, double step) |
| Compute and return solution vector, x, where this.x = grp.x + step * d. | |
| virtual NOX::Abstract::Group::ReturnType | computeF () |
| Compute the turning point equation residual $G$. | |
| virtual NOX::Abstract::Group::ReturnType | computeJacobian () |
| Compute the blocks of the Jacobian derivative of $G$. | |
| virtual NOX::Abstract::Group::ReturnType | computeGradient () |
| Gradient computation is not defined for this group. | |
| virtual NOX::Abstract::Group::ReturnType | computeNewton (NOX::Parameter::List ¶ms) |
| Compute Newton direction using bordering algorithm. | |
Jacobian operations. | |
| virtual NOX::Abstract::Group::ReturnType | applyJacobian (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const |
| Computes the extended Jacobian vector product. | |
| virtual NOX::Abstract::Group::ReturnType | applyJacobianTranspose (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const |
| Jacobian transpose product is not defined by this group. | |
| virtual NOX::Abstract::Group::ReturnType | applyJacobianInverse (NOX::Parameter::List ¶ms, const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const |
| Applies the inverse of the extended Jacobian matrix using the bordering algorithm. | |
"Is" functions. | |
Checks to see if various objects have been computed. Returns true if the corresponding "compute" function has been called since the last update to the solution vector (via instantiation or computeX). | |
| virtual bool | isF () const |
Return true if the extended residual is valid. | |
| virtual bool | isJacobian () const |
Return true if the extended Jacobian is valid. | |
| virtual bool | isGradient () const |
| Always returns false. | |
| virtual bool | isNewton () const |
Return true if the extended Newton direction is valid. | |
"Get" functions. | |
Note that these function do not check whether or not the vectors are valid. Must use the "Is" functions for that purpose. | |
| virtual const NOX::Abstract::Vector & | getX () const |
Return extended solution vector . | |
| virtual const NOX::Abstract::Vector & | getF () const |
Return extended equation residual . | |
| virtual double | getNormF () const |
Return 2-norm of . | |
| virtual const NOX::Abstract::Vector & | getGradient () const |
| Vector returned is not valid. | |
| virtual const NOX::Abstract::Vector & | getNewton () const |
| Return extended Newton direction. | |
Protected Member Functions | |
| void | resetIsValidFlags () |
| Reset the isValid flags to false. | |
| void | setStepperParameters (NOX::Parameter::List ¶ms) |
| Creates and sets the "Stepper" parameter sublist. | |
Protected Attributes | |
| LOCA::Homotopy::AbstractGroup * | grpPtr |
| Stores the underlying loca group. | |
| NOX::Abstract::Vector * | gVecPtr |
Stores the homotopy residual vector, . | |
| NOX::Abstract::Vector * | randomVecPtr |
Stores the random Vector, . | |
| NOX::Abstract::Vector * | newtonVecPtr |
Stores the homotopy Newton vector, . | |
| NOX::Abstract::Vector * | gradVecPtr |
Stores the homotopy gradient vector if needed, . | |
| 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 | ownsGroup |
| Tells whether the underlying group was created by the Group. If so, the destructor should destroy the group. | |
| 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. | |
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:
|
||||||||||||||||||||
|
Constructor to set the base group and generate the "%Stepper" sublist for homotopy continuation. The locaSublist variable is the "LOCA" sublist (of type NOX::Parameter::List) 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
where
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. |
|
|
Compute the blocks of the Jacobian derivative of $G$. Certain second derivatives such as (Jn)_x are not calculated since only their action on vectors are needed for later solves. Reimplemented from NOX::Abstract::Group. |
|
|
Reset the isValid flags to false. This is called when the solution vector or parameter vector is changed. |
|
|
Value of the homotopy continuation parameter. Ranges from 0.0 (easy solution) to 1.0 (solution to the system of interest). |
|
|
Copy of the ParameterVector for the underlying grpPtr. We copy this and then add the homotopy parameter to the list. |
1.3.9.1