LOCA::Homotopy::Group Class Reference

LOCA's Homotopy Algorithm. More...

#include <LOCA_Homotopy_Group.H>

Inheritance diagram for LOCA::Homotopy::Group:

Collaboration diagram for LOCA::Homotopy::Group:
List of all members.

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 ()
virtual LOCA::Continuation::AbstractGroupoperator= (const LOCA::Continuation::AbstractGroup &source)
 Assignment operator.
virtual LOCA::Extended::AbstractGroupoperator= (const LOCA::Extended::AbstractGroup &source)
 Assignment operator.
virtual NOX::Abstract::Groupoperator= (const NOX::Abstract::Group &source)
 Assignment operator.
virtual Groupoperator= (const Group &source)
 Assignment operator.
virtual NOX::Abstract::Groupclone (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 ParameterVectorgetParams () 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 $dF/dp$ for the extended system.
virtual void printSolution (const double conParm) 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::AbstractGroupgetUnderlyingGroup () const
 Return underlying group.
virtual LOCA::Continuation::AbstractGroupgetUnderlyingGroup ()
 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 &params)
 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 &params, 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 $G$ 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::VectorgetX () const
 Return extended solution vector $z$.
virtual const NOX::Abstract::VectorgetF () const
 Return extended equation residual $G(z)$.
virtual double getNormF () const
 Return 2-norm of $G(z)$.
virtual const NOX::Abstract::VectorgetGradient () const
 Vector returned is not valid.
virtual const NOX::Abstract::VectorgetNewton () const
 Return extended Newton direction.

Protected Member Functions

void resetIsValidFlags ()
 Reset the isValid flags to false.
void setStepperParameters (NOX::Parameter::List &params)
 Creates and sets the "Stepper" parameter sublist.

Protected Attributes

 Stores the underlying loca group.
 Stores the homotopy residual vector, $ g $.
 Stores the random Vector, $ a $.
 Stores the homotopy Newton vector, $ \frac{\partial r}{\partial x} $.
 Stores the homotopy gradient vector if needed, $ \frac{\partial r}{\partial x} $.
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.

Detailed Description

LOCA's Homotopy Algorithm.

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 ($ F(x) $) through continuation. An artificial parameter $ \lambda $ is used to control the continuation. The idea is to solve a simple equation starting at $ \lambda $ = 0 and, using the solution from the previous step, solve systems of equations that gets progressively closer to the true system of interest ( at $ \lambda $ = 1.0 we recover the original equations $ F(x) $). By constraining the definition of $ g(x, \lambda) $ and using artificial parameter contiuation, the continuation branch should be free of multiplicity and bifurcation phenomena.

The modified system of equations, $ g(x, \lambda) $, supplied by the HomotopyGroup is defined as:

\[ g(x, \lambda) = \lambda F(x) + (1.0 - \lambda)(x - a) \]

where $x$ is the solution vector, $ \lambda $ is an artificial parameter, $ F(x) $ is the set of nonlinear equations the user supplies, $ g(x) $ is the corresponding set of homotopy equations that LOCA will solve, and $ a $ is a random vector.

This group requires the loca Stepper for continuation from $ \lambda $ = 0.0 (a simple set of equations to solve) to $ \lambda $ = 1.0 (the set of equations requested by the user, $ F(x) $). 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.


Constructor & Destructor Documentation

LOCA::Homotopy::Group::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.

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 $ \lambda = 0$) 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:

\[ a = abs(r) * \mbox{scalarRandom} + x_o * \mbox{scalarInitialGuess} \]

where $ r $ is the random vector generated by a call to NOX::Abstract::Vector::random(), $ \mbox{scalarRandom} $ is a scalar value, $ x_o $ is the initial guess to the solution vector, and $ \mbox{scalarInitialGuess} $ is a scalar value. The defualt values force the random vector to be calculated as:

\[ a = abs(r) \]

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.

Member Function Documentation

NOX::Abstract::Group::ReturnType LOCA::Homotopy::Group::computeJacobian  )  [virtual]

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.

void LOCA::Homotopy::Group::resetIsValidFlags  )  [protected]

Reset the isValid flags to false.

This is called when the solution vector or parameter vector is changed.

Member Data Documentation

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).

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.

The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:40:45 2008 for NOX by doxygen