LOCA::Bifurcation::TPBord::ExtendedGroup Class Reference

LOCA's generic turning point group. Implements the bordering algorithm to solve turning point equations. More...

#include <LOCA_Bifurcation_TPBord_ExtendedGroup.H>

Inheritance diagram for LOCA::Bifurcation::TPBord::ExtendedGroup:

[legend]
Collaboration diagram for LOCA::Bifurcation::TPBord::ExtendedGroup:
[legend]
List of all members.

Public Member Functions

 ExtendedGroup (LOCA::Bifurcation::TPBord::AbstractGroup &g, NOX::Parameter::List &bifParamList)
 Constructor with initial data passed through parameter lists.
 ExtendedGroup (LOCA::Bifurcation::TPBord::AbstractGroup &g, const NOX::Abstract::Vector &lenVec, const NOX::Abstract::Vector &nullVec, int paramId)
 Constructor to set the base group, length normalization vector $l$, initial guess for the null vector $n$, and bifurcation paramter id (integer).
 ExtendedGroup (const LOCA::Bifurcation::TPBord::AbstractGroup &g, const NOX::Abstract::Vector &lenVec, const NOX::Abstract::Vector &nullVec, int paramId)
 Constructor to set the base group, length normalization vector $l$, initial guess for the null vector $n$, and bifurcation paramter id (integer).
 ExtendedGroup (const ExtendedGroup &source, NOX::CopyType type=NOX::DeepCopy)
 Copy constructor.
virtual ~ExtendedGroup ()
 Destructor.
virtual ExtendedGroupoperator= (const ExtendedGroup &source)
 Assignment operator.
double getBifParam () const
 Get bifurcation parameter.
Implementation of NOX::Abstract::Group virtual methods
virtual NOX::Abstract::Groupoperator= (const NOX::Abstract::Group &source)
 Assignment operator.
virtual NOX::Abstract::Groupclone (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 setX (const LOCA::Bifurcation::TPBord::ExtendedVector &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 void computeX (const LOCA::Bifurcation::TPBord::ExtendedGroup &g, const LOCA::Bifurcation::TPBord::ExtendedVector &d, double step)
 Compute 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 applyJacobianInverse().
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.
virtual NOX::Abstract::Group::ReturnType applyRightPreconditioning (bool useTranspose, NOX::Parameter::List &params, const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const
 Applies the extended right preconditioner.
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.
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.
virtual double getNormNewtonSolveResidual () const
 Return the norm of the Newton solve residual.
Implementation of LOCA::Continuation::AbstractGroup virtual methods
virtual LOCA::Continuation::AbstractGroupoperator= (const LOCA::Continuation::AbstractGroup &source)
 Assignment operator.
virtual void setParams (const ParameterVector &p)
 Set the parameter vector in the group to p.
virtual const ParameterVectorgetParams () const
 Return a const reference to the paramter vector 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 parameter derivative $dG/d\lambda$ for the extended system.
virtual NOX::Abstract::Group::ReturnType applyJacobianInverseMulti (NOX::Parameter::List &params, const NOX::Abstract::Vector *const *inputs, NOX::Abstract::Vector **results, int nVecs) const
 applyJacobian for multiple right-hand sides Applies the inverse of the extended Jacobian matrix using the bordering algorithm for multiple right-hand sides.
virtual void printSolution (const double conParam) const
 Function to print out extended solution and continuation parameter after successful continuation step.
virtual void printSolution (const NOX::Abstract::Vector &x_, const double conParam) const
 Function to print out extended solution and continuation parameter after successful continuation step.
Implementation of LOCA::Extended::AbstractGroup virtual methods
virtual LOCA::Extended::AbstractGroupoperator= (const LOCA::Extended::AbstractGroup &source)
 Assignment operator.
virtual const LOCA::Continuation::AbstractGroupgetUnderlyingGroup () const
 Return underlying group.
virtual LOCA::Continuation::AbstractGroupgetUnderlyingGroup ()
 Return underlying group.

Protected Member Functions

void init (bool perturbSoln=false, double perturbSize=0.0)
 Initializes group.
void setBifParam (double param)
 Set bifurcation parameter.
double lTransNorm (const NOX::Abstract::Vector &n) const
 Defines null vector normalization $l^Tn$.

Protected Attributes

LOCA::Bifurcation::TPBord::AbstractGroupgrpPtr
 Stores the underlying group, which stores the solution vector, jacobian, and solution residual.
LOCA::Bifurcation::TPBord::ExtendedVector tpXVec
 Stores the turning point solution vector.
LOCA::Bifurcation::TPBord::ExtendedVector tpFVec
 Stores the turning point residual vector.
LOCA::Bifurcation::TPBord::ExtendedVector tpNewtonVec
 Stores the turning point Newton vector.
NOX::Abstract::VectorlengthVecPtr
 Stores the constant length vector.
int bifParamId
 Stores the bifurcation parameter index.
NOX::Abstract::VectorderivResidualParamPtr
 Stores the derivative of the solution residual w.r.t. bifparam.
NOX::Abstract::VectorderivNullResidualParamPtr
 Stores the derivative of the null vector residual w.r.t. bifparam.
bool ownsGroup
 Flag indicating whether we have our own copy of the underlying grp.
bool isValidF
 Is residual vector valid.
bool isValidJacobian
 Is Jacobian matrix valid.
bool isValidNewton
 Is Newton vector valid.

Detailed Description

LOCA's generic turning point group. Implements the bordering algorithm to solve turning point equations.

The LOCA::Bifurcation::TPBord::Group is a concrete implementation of the NOX::Abstract::Group, LOCA::Continuation::AbstractGroup and LOCA::Extended::AbstractGroup that defines the following extended set of equations that are regular at a generic turning point:

\[ G(z) = \left[ \begin{array}{c} F(x,p) \\ Jn \\ l^Tn-1 \end{array} \right] = 0 \]

where $z = [x, n, p]\in\Re^{2n+1}$, $x$ is the solution vector, $n$ is the null vector, $l$ is the length normalization vector and $J$ is the Jacobian of F.

The group stores an underlying group of type LOCA::Bifurcation::TPBord::AbstractGroup to represent the equations $F(x,p) = 0$ and to manipulate the underlying Jacobian $J$. Note that the entire extended Jacobian $D_z G$ is not stored in memory, rather a block-elimination algorithm (bordering algorithm) is used to compute linear solves of the extended Jacobian (see LOCA::Bifurcation::TPBord::ExtendedGroup::applyJacobianInverse(), LOCA::Bifurcation::TPBord::ExtendedGroup::applyJacobianInverseMulti() for more details).

This class implements all of the NOX::Abstract::Group, LOCA::Continuation::AbstractGroup, and LOCA::Extended::AbstractGroup methods for this extended set of equations and therefore is a complete group which can be passed to most NOX solvers to locate a single turning point or to the LOCA::Stepper to compute a family of turning points in a second parameter.

However, Jacobian-tranpose operations and gradient calculations cannot be implemented efficiently and therefore gradient-base nonlinear solvers such as steepest descent and Trust region methods cannot be used to solve the extended turning point equations.


Constructor & Destructor Documentation

LOCA::Bifurcation::TPBord::ExtendedGroup::ExtendedGroup LOCA::Bifurcation::TPBord::AbstractGroup g,
const NOX::Abstract::Vector lenVec,
const NOX::Abstract::Vector nullVec,
int  paramId
 

Constructor to set the base group, length normalization vector $l$, initial guess for the null vector $n$, and bifurcation paramter id (integer).

The initial guess to the null vector is re-scaled so that the normalization condition $l^Tn = 1$ is satisfied.

In this version of the constructor, a non-const reference to the underlying group g is passed and therefore the group will not be copied.

LOCA::Bifurcation::TPBord::ExtendedGroup::ExtendedGroup const LOCA::Bifurcation::TPBord::AbstractGroup g,
const NOX::Abstract::Vector lenVec,
const NOX::Abstract::Vector nullVec,
int  paramId
 

Constructor to set the base group, length normalization vector $l$, initial guess for the null vector $n$, and bifurcation paramter id (integer).

The initial guess to the null vector is re-scaled so that the normalization condition $l^Tn = 1$ is satisfied.

In this version of the constructor, a const reference to the underlying group g is passed and therefore the group will be copied.


Member Function Documentation

NOX::Abstract::Group::ReturnType LOCA::Bifurcation::TPBord::ExtendedGroup::applyJacobian const NOX::Abstract::Vector input,
NOX::Abstract::Vector result
const [virtual]
 

Computes the extended Jacobian vector product.

This method computes the extended Jacobian vector product

\[ \begin{bmatrix} J & 0 & \frac{\partial F}{\partial p} \\ \frac{\partial Jn}{\partial x} & J & \frac{\partial Jn}{\partial p} \\ 0 & l^T & 0 \end{bmatrix} \begin{bmatrix} a \\ b \\ c \end{bmatrix} = \begin{bmatrix} Ja + \frac{\partial F}{\partial p}c \\ \frac{\partial Jn}{\partial x}a + Jb + \frac{\partial Jn}{\partial p}c \\ l^T b \end{bmatrix} \]

using the applyJacobian and computeDJnDxa methods of the underlying group where $a$, $b$, and $c$ are the solution, null-vector, and paramter components of the given vector input. Vectors input and result must be of type LOCA::Bifurcation::TPBord::ExtendedVector, otherwise an error is thrown.

Reimplemented from NOX::Abstract::Group.

NOX::Abstract::Group::ReturnType LOCA::Bifurcation::TPBord::ExtendedGroup::applyJacobianInverse NOX::Parameter::List params,
const NOX::Abstract::Vector input,
NOX::Abstract::Vector result
const [virtual]
 

Applies the inverse of the extended Jacobian matrix using the bordering algorithm.

This method is a special case of applyJacobianInverseMulti() for a single right-hand-side.

Reimplemented from NOX::Abstract::Group.

Reimplemented in LOCA::Bifurcation::TPBord::ModifiedBorderingGroup, and LOCA::Bifurcation::TPBord::NicDayModifiedBorderingGroup.

NOX::Abstract::Group::ReturnType LOCA::Bifurcation::TPBord::ExtendedGroup::applyJacobianInverseMulti NOX::Parameter::List params,
const NOX::Abstract::Vector *const *  inputs,
NOX::Abstract::Vector **  results,
int  nVecs
const [virtual]
 

applyJacobian for multiple right-hand sides Applies the inverse of the extended Jacobian matrix using the bordering algorithm for multiple right-hand sides.

This method performs the following multiple right-hand-side linear solve of the extended Jacobian matrix:

\[ \begin{bmatrix} J & 0 & \frac{\partial F}{\partial p} \\ \frac{\partial Jn}{\partial x} & J & \frac{\partial Jn}{\partial p} \\ 0 & l^T & 0 \end{bmatrix} \begin{bmatrix} U \\ V \\ w^T \end{bmatrix} = \begin{bmatrix} X \\ Y \\ z^T \end{bmatrix} \]

where $U$, $V$, $X$, and $Y$ each have nVecs columns and $w$, and $z$ each have nVecs components (i.e., each column of $X$, $Y$, and $z^T$ have the solution, null-vector, and parameter components of one right-hand-side). The solution components $U$, $V$, and $w$ are computed using a multiple right-hand-side block elimination (bordering) algorithm:

\[ \begin{split} J\begin{bmatrix} A & b \end{bmatrix} &= \begin{bmatrix} X & \frac{\partial F}{\partial p} \end{bmatrix} \\ J\begin{bmatrix} C & d \end{bmatrix} &= \begin{bmatrix} Y & \frac{\partial Jn}{\partial p} \end{bmatrix} - \frac{\partial Jn}{\partial x} \begin{bmatrix} A & b \end{bmatrix} \\ w &= \frac{C^Tl - z}{l^Td} \\ U &= A - b w^T \\ V &= C - d w^T \end{split} \]

which requires $ 2(\text{nVecs} + 1) $ solves of the underlying Jacobian $J$ calculated by 2 calls to the applyJacobianInverseMulti method of the underlying group.

Each vector in the arrays inputs and outputs must be of type LOCA::Bifurcation::TPBord::ExtendedVector, otherwise an error is thrown.

Reimplemented from LOCA::Continuation::AbstractGroup.

Reimplemented in LOCA::Bifurcation::TPBord::ModifiedBorderingGroup.

NOX::Abstract::Group::ReturnType LOCA::Bifurcation::TPBord::ExtendedGroup::applyRightPreconditioning bool  useTranspose,
NOX::Parameter::List params,
const NOX::Abstract::Vector input,
NOX::Abstract::Vector result
const [virtual]
 

Applies the extended right preconditioner.

This method is implemented using a similar bordering algorithm to applyJacobianInverse(), except calls to the underlying group's applyJacobianInvese method are replaced by applyRightPreconditioning.

Reimplemented from NOX::Abstract::Group.

NOX::Abstract::Group::ReturnType LOCA::Bifurcation::TPBord::ExtendedGroup::computeDfDp int  paramID,
NOX::Abstract::Vector result
[virtual]
 

Compute parameter derivative $dG/d\lambda$ for the extended system.

For a given parameter $\lambda$, this method computes the derivative

\[ \frac{\partial G(z,\lambda)}{\partial\lambda} = \left[ \begin{array}{c} \frac{\partial F(x,p,\lambda)}{\partial\lambda} \\ \frac{\partial Jn}{\partial\lambda} \\ 0 \end{array} \right]. \]

Implements LOCA::Continuation::AbstractGroup.

NOX::Abstract::Group::ReturnType LOCA::Bifurcation::TPBord::ExtendedGroup::computeF  )  [virtual]
 

Compute the turning point equation residual $G$.

This method fills the extended residual

\[ G(z) = \left[ \begin{array}{c} F(x,p) \\ Jn \\ l^Tn-1 \end{array} \right]. \]

The solution component residual $F(x,p)$ and the null-vector residual $Jn$ are calculated via the computeF and applyJacobian methods of the underlying group.

Implements NOX::Abstract::Group.

NOX::Abstract::Group::ReturnType LOCA::Bifurcation::TPBord::ExtendedGroup::computeJacobian  )  [virtual]
 

Compute the blocks of the Jacobian derivative of $G$.

This method computes the $J$, $\partial F/\partial p$, and $\partial Jn/\partial p$ blocks of the extended Jacobian:

\[ D_z G(z) = \begin{bmatrix} J & 0 & \frac{\partial F}{\partial p} \\ \frac{\partial Jn}{\partial x} & J & \frac{\partial Jn}{\partial p} \\ 0 & l^T & 0 \end{bmatrix} \]

by calling the computeJacobian, computeDfDp, and computeDJnDp methods of the underlying group. The second derivative matrix $\partial Jn/\partial x$ is not calculated since only its action on vectors is needed for linear solves using the bordering algorithm.

Reimplemented from NOX::Abstract::Group.

void LOCA::Bifurcation::TPBord::ExtendedGroup::printSolution const NOX::Abstract::Vector x_,
const double  conParam
const [virtual]
 

Function to print out extended solution and continuation parameter after successful continuation step.

This method prints the solution, null-vector, and parameter components of the extended solution vector using the printSolution method of the underlying group.

Reimplemented from LOCA::Continuation::AbstractGroup.

void LOCA::Bifurcation::TPBord::ExtendedGroup::printSolution const double  conParam  )  const [virtual]
 

Function to print out extended solution and continuation parameter after successful continuation step.

This method prints the solution, null-vector, and parameter components of the extended solution vector using the printSolution method of the underlying group.

Reimplemented from LOCA::Continuation::AbstractGroup.


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