NOX Development
Loading...
Searching...
No Matches
LOCA::Homotopy::DeflatedGroup Class Reference

LOCA's Homotopy Algorithm. More...

#include <LOCA_Homotopy_DeflatedGroup.H>

Inheritance diagram for LOCA::Homotopy::DeflatedGroup:
Collaboration diagram for LOCA::Homotopy::DeflatedGroup:

Public Member Functions

 DeflatedGroup (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< Teuchos::ParameterList > &topParams, const Teuchos::RCP< Teuchos::ParameterList > &hParams, const Teuchos::RCP< LOCA::Homotopy::AbstractGroup > &grp, const Teuchos::RCP< const NOX::Abstract::Vector > &start_vec, const std::vector< Teuchos::RCP< const NOX::Abstract::Vector > > &prev_solns, const double identity_sign=1.0)
 Constructor.
 DeflatedGroup (const DeflatedGroup &source, NOX::CopyType type=NOX::DeepCopy)
 Copy constructor.
virtual ~DeflatedGroup ()
 Destructor.
double getHomotopyParam () const
 Get homotopy parameter.
Implementation of NOX::Abstract::Group virtual methods
virtual NOX::Abstract::Groupoperator= (const NOX::Abstract::Group &source)
 Assignment operator.
virtual Teuchos::RCP< NOX::Abstract::Groupclone (NOX::CopyType type=NOX::DeepCopy) const
 Clone function.
virtual void setX (const NOX::Abstract::Vector &y)
 Set the solution vector 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 NOX::Abstract::Group::ReturnType computeF ()
 Compute extended continuation equations.
virtual NOX::Abstract::Group::ReturnType computeJacobian ()
 Compute extended continuation jacobian.
virtual NOX::Abstract::Group::ReturnType computeGradient ()
 Gradient is not defined for this system.
virtual NOX::Abstract::Group::ReturnType computeNewton (Teuchos::ParameterList &params)
 Compute Newton direction for extended continuation system.
virtual NOX::Abstract::Group::ReturnType applyJacobian (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const
 Applies Jacobian for extended system.
virtual NOX::Abstract::Group::ReturnType applyJacobianTranspose (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const
 Jacobian transpose not defined for this system.
virtual NOX::Abstract::Group::ReturnType applyJacobianInverse (Teuchos::ParameterList &params, const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const
 Applies Jacobian inverse for extended system.
virtual NOX::Abstract::Group::ReturnType applyJacobianMultiVector (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const
 Applies Jacobian for extended system.
virtual NOX::Abstract::Group::ReturnType applyJacobianTransposeMultiVector (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const
 Jacobian transpose not defined for this system.
virtual NOX::Abstract::Group::ReturnType applyJacobianInverseMultiVector (Teuchos::ParameterList &params, const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const
 Applies Jacobian inverse for extended system.
virtual bool isF () const
 Return true if 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.
virtual const NOX::Abstract::VectorgetX () const
 Return extended solution vector.
virtual const NOX::Abstract::VectorgetF () const
 Return extended residual.
virtual double getNormF () const
 Return 2-norm of extended residual.
virtual const NOX::Abstract::VectorgetGradient () const
 Gradient is never valid.
virtual const NOX::Abstract::VectorgetNewton () const
 Return extended Newton direction.
virtual Teuchos::RCP< const NOX::Abstract::VectorgetXPtr () const
 Return RCP to extended solution vector.
virtual Teuchos::RCP< const NOX::Abstract::VectorgetFPtr () const
 Return RCP to extended residual.
virtual Teuchos::RCP< const NOX::Abstract::VectorgetGradientPtr () const
 Gradient is never valid.
virtual Teuchos::RCP< const NOX::Abstract::VectorgetNewtonPtr () const
 Return RCP to extended Newton direction.
virtual double getNormNewtonSolveResidual () const
 Returns 2-norm of extended Newton solve residual.
Implementation of LOCA::Extended::MultiAbstractGroup

virtual methods

virtual Teuchos::RCP< const LOCA::MultiContinuation::AbstractGroupgetUnderlyingGroup () const
 Return underlying group.
virtual Teuchos::RCP< LOCA::MultiContinuation::AbstractGroupgetUnderlyingGroup ()
 Return underlying group.
Implementation of LOCA::MultiContinuation::AbstractGroup

virtual methods

virtual void copy (const NOX::Abstract::Group &source)
 Assignment operator.
virtual void setParamsMulti (const std::vector< int > &paramIDs, 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 (pVector = p).
virtual void setParam (int paramID, double val)
 Set parameter indexed by (integer) paramID.
virtual void setParam (std::string paramID, double val)
 Set parameter indexed by (std::string) paramID.
virtual const ParameterVectorgetParams () const
 Return a const reference to the ParameterVector owned by the group.
virtual double getParam (int paramID) const
 Return copy of parameter indexed by (integer) paramID.
virtual double getParam (std::string paramID) const
 Return copy of parameter indexed by (std::string) paramID.
virtual NOX::Abstract::Group::ReturnType computeDfDpMulti (const std::vector< int > &paramIDs, 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
 Function to print out solution and parameter after successful step.
virtual void printSolution (const NOX::Abstract::Vector &x, const double conParam) const
 Function to print out a vector and parameter after successful step.
virtual void scaleVector (NOX::Abstract::Vector &x) const
 Scales a vector using scaling vector.
Public Member Functions inherited from LOCA::Extended::MultiAbstractGroup
 MultiAbstractGroup ()
 Default constructor.
virtual ~MultiAbstractGroup ()
 Destructor.
virtual Teuchos::RCP< const LOCA::MultiContinuation::AbstractGroupgetBaseLevelUnderlyingGroup () const
 Return base-level underlying group.
virtual Teuchos::RCP< LOCA::MultiContinuation::AbstractGroupgetBaseLevelUnderlyingGroup ()
 Return base-level underlying group.
virtual NOX::Abstract::Groupoperator= (const NOX::Abstract::Group &source)=0
 Bring NOX::Abstract::Group::operator=() into scope.
Public Member Functions inherited from NOX::Abstract::Group
 Group ()
 Constructor.
virtual ~Group ()
 Destructor.
virtual NOX::Abstract::Group::ReturnType applyRightPreconditioning (bool useTranspose, Teuchos::ParameterList &params, const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const
 Apply right preconditiong to the given input vector.
virtual NOX::Abstract::Group::ReturnType applyRightPreconditioningMultiVector (bool useTranspose, Teuchos::ParameterList &params, const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const
 applyRightPreconditioning for multiple right-hand sides
virtual const NOX::Abstract::VectorgetScaledX () const
virtual void logLastLinearSolveStats (NOX::SolverStats &stats) const
 Adds statistics from last linear solve to the SovlerStats object.
virtual NOX::Abstract::Group::ReturnType getNormLastLinearSolveResidual (double &residual) const
 Return the norm of the last linear solve residual as the result of either a call to computeNewton() or applyJacobianInverse().
Public Member Functions inherited from LOCA::MultiContinuation::AbstractGroup
 AbstractGroup ()
 Default constructor.
virtual ~AbstractGroup ()
 Destructor.
Public Member Functions inherited from LOCA::BorderedSystem::AbstractGroup
 AbstractGroup ()
 Constructor.
virtual ~AbstractGroup ()
 Destructor.

Implementation of

LOCA::BorderedSystem::AbstractGroup virtual methods

Teuchos::RCP< LOCA::GlobalDataglobalData
 Pointer LOCA global data object.
Teuchos::RCP< LOCA::Parameter::SublistParserparsedParams
 Parsed top-level parameters.
Teuchos::RCP< Teuchos::ParameterList > homotopyParams
 Pitchfork parameter list.
Teuchos::RCP< LOCA::Homotopy::AbstractGroupgrpPtr
 Pointer to base group that defines $ F$.
Teuchos::RCP< LOCA::BorderedSystem::AbstractGroupbordered_grp
 Pointer to base group as a bordered group.
LOCA::MultiContinuation::ExtendedMultiVector xMultiVec
 Stores the extended solution vector.
LOCA::MultiContinuation::ExtendedMultiVector fMultiVec
 Stores the extended residual vector.
LOCA::MultiContinuation::ExtendedMultiVector newtonMultiVec
 Stores the extended Newton vector.
LOCA::MultiContinuation::ExtendedMultiVector gradientMultiVec
 Stores the extended gradient vector.
Teuchos::RCP< LOCA::MultiContinuation::ExtendedVectorxVec
 Stores view of first column of xMultiVec.
Teuchos::RCP< LOCA::MultiContinuation::ExtendedVectorfVec
 Stores view of first column of fMultiVec.
Teuchos::RCP< LOCA::MultiContinuation::ExtendedVectornewtonVec
 Stores view of first column of newtonMultiVec.
Teuchos::RCP< LOCA::MultiContinuation::ExtendedVectorgradientVec
 Stores view of first column of gradientMultiVec.
Teuchos::RCP< const NOX::Abstract::VectorstartVec
 Stores the starting vector, $ x^\ast $.
double identitySign
std::vector< Teuchos::RCP< const NOX::Abstract::Vector > > solns
 Stores array of deflated solution vectors.
Teuchos::RCP< NOX::Abstract::VectordistVec
 Temporary vector for storing distance.
Teuchos::RCP< NOX::Abstract::MultiVectortotalDistMultiVec
 Temporary vector for storing sum of distances.
Teuchos::RCP< NOX::Abstract::VectortotalDistVec
 Temporary vector for storing sum of distances.
Teuchos::RCP< NOX::Abstract::MultiVectorunderlyingF
 underlying group's F vector as a multivector
Teuchos::RCP< LOCA::BorderedSolver::JacobianOperatorjacOp
Teuchos::RCP< LOCA::BorderedSolver::AbstractStrategyborderedSolver
 Stores bordered solver strategy.
Teuchos::RCP< NOX::Abstract::MultiVector::DenseMatrixminusOne
 Stores -1.
int numSolns
 Number of previous solutions.
std::vector< double > distances
 Array of distances from previous solutions.
double distProd
 Product of distances.
std::vector< int > index_f
 Stores indices for getting f part of fMultiVec.
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 std::string conParamLabel
 Contains the std::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.
bool isValidF
 Is residual vector valid.
bool isValidJacobian
 Is Jacobian matrix valid.
bool isValidNewton
 Is Newton vector valid.
bool isValidGradient
 Is Gradient vector valid.
bool isBordered
 Flag that indicates whether underlying group is a bordered group.
virtual int getBorderedWidth () const
 Return the total width of the bordered rows/columns.
virtual Teuchos::RCP< const NOX::Abstract::GroupgetUnborderedGroup () const
 Get bottom-level unbordered group.
virtual bool isCombinedAZero () const
 Indicates whether combined A block is zero.
virtual bool isCombinedBZero () const
 Indicates whether combined B block is zero.
virtual bool isCombinedCZero () const
 Indicates whether combined C block is zero.
virtual void extractSolutionComponent (const NOX::Abstract::MultiVector &v, NOX::Abstract::MultiVector &v_x) const
virtual void extractParameterComponent (bool use_transpose, const NOX::Abstract::MultiVector &v, NOX::Abstract::MultiVector::DenseMatrix &v_p) const
virtual void loadNestedComponents (const NOX::Abstract::MultiVector &v_x, const NOX::Abstract::MultiVector::DenseMatrix &v_p, NOX::Abstract::MultiVector &v) const
virtual void fillA (NOX::Abstract::MultiVector &A) const
 Fill the combined A block as described above.
virtual void fillB (NOX::Abstract::MultiVector &B) const
 Fill the combined B block as described above.
virtual void fillC (NOX::Abstract::MultiVector::DenseMatrix &C) const
 Fill the combined C block as described above.
virtual void resetIsValid ()
 Resets all isValid flags to false.
virtual void setupViews ()
 Sets up multivector views.
void setHomotopyParam (double param)
 Set homotopy parameter.
void setStepperParameters (Teuchos::ParameterList &topParams)
 Creates and sets the "Stepper" parameter sublist.

Additional Inherited Members

Public Types inherited from NOX::Abstract::Group
enum  ReturnType {
  Ok , NotDefined , BadDependency , NotConverged ,
  Failed
}
 The computation of, say, the Newton direction in computeNewton() may fail in many different ways, so we have included a variety of return codes to describe the failures. Of course, we also have a code for success. More...

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)(S) \‍]

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, $ a $ is a random vector, and $ S $ is a scaling factor used to switch sign of the last term (typically valued 1.0 or -1.0).

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.

References:

  • ALGORITHM 652 HOMPACK: A Suite of Codes for Globally Convergent Homotopy Algorithms, Watson, L.T., Billups, S.C, and Morgan, A.P., ACM Transactions on Mathematical Software, Vol. 13, No. 3, September 1987, pp281-310.

Constructor & Destructor Documentation

◆ DeflatedGroup() [1/2]

LOCA::Homotopy::DeflatedGroup::DeflatedGroup ( const Teuchos::RCP< LOCA::GlobalData > & global_data,
const Teuchos::RCP< Teuchos::ParameterList > & topParams,
const Teuchos::RCP< Teuchos::ParameterList > & hParams,
const Teuchos::RCP< LOCA::Homotopy::AbstractGroup > & grp,
const Teuchos::RCP< const NOX::Abstract::Vector > & start_vec,
const std::vector< Teuchos::RCP< const NOX::Abstract::Vector > > & prev_solns,
const double identity_sign = 1.0 )

◆ DeflatedGroup() [2/2]

Member Function Documentation

◆ applyJacobian()

NOX::Abstract::Group::ReturnType LOCA::Homotopy::DeflatedGroup::applyJacobian ( const NOX::Abstract::Vector & input,
NOX::Abstract::Vector & result ) const
virtual

Applies Jacobian for extended system.

Reimplemented from NOX::Abstract::Group.

References applyJacobianMultiVector(), NOX::Abstract::Vector::createMultiVector(), and NOX::DeepCopy.

Referenced by getNormNewtonSolveResidual().

◆ applyJacobianInverse()

NOX::Abstract::Group::ReturnType LOCA::Homotopy::DeflatedGroup::applyJacobianInverse ( Teuchos::ParameterList & params,
const NOX::Abstract::Vector & input,
NOX::Abstract::Vector & result ) const
virtual

Applies Jacobian inverse for extended system.

Reimplemented from NOX::Abstract::Group.

References applyJacobianInverseMultiVector(), NOX::Abstract::Vector::createMultiVector(), and NOX::DeepCopy.

◆ applyJacobianInverseMultiVector()

NOX::Abstract::Group::ReturnType LOCA::Homotopy::DeflatedGroup::applyJacobianInverseMultiVector ( Teuchos::ParameterList & params,
const NOX::Abstract::MultiVector & input,
NOX::Abstract::MultiVector & result ) const
virtual

◆ applyJacobianMultiVector()

◆ applyJacobianTranspose()

NOX::Abstract::Group::ReturnType LOCA::Homotopy::DeflatedGroup::applyJacobianTranspose ( const NOX::Abstract::Vector & input,
NOX::Abstract::Vector & result ) const
virtual

Jacobian transpose not defined for this system.

Reimplemented from NOX::Abstract::Group.

References applyJacobianTransposeMultiVector(), NOX::Abstract::Vector::createMultiVector(), and NOX::DeepCopy.

Referenced by computeGradient().

◆ applyJacobianTransposeMultiVector()

◆ clone()

Teuchos::RCP< NOX::Abstract::Group > LOCA::Homotopy::DeflatedGroup::clone ( NOX::CopyType type = NOX::DeepCopy) const
virtual

Clone function.

Implements NOX::Abstract::Group.

References DeflatedGroup().

Referenced by DeflatedGroup(), and DeflatedGroup().

◆ computeDfDpMulti()

NOX::Abstract::Group::ReturnType LOCA::Homotopy::DeflatedGroup::computeDfDpMulti ( const std::vector< int > & paramIDs,
NOX::Abstract::MultiVector & dfdp,
bool isValidF )
virtual

Compute $\partial F/\partial p$ for each parameter $ p$ 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.

References conParam, conParamID, distProd, distVec, LOCA::Extended::MultiVector::getScalars(), LOCA::MultiContinuation::ExtendedMultiVector::getXMultiVec(), globalData, grpPtr, NOX::Abstract::Group::Ok, and startVec.

◆ computeF()

NOX::Abstract::Group::ReturnType LOCA::Homotopy::DeflatedGroup::computeF ( )
virtual

Compute extended continuation equations.

Implements NOX::Abstract::Group.

References conParam, distances, distProd, distVec, fVec, globalData, grpPtr, isValidF, numSolns, NOX::Abstract::Group::Ok, solns, and startVec.

Referenced by computeGradient(), and computeNewton().

◆ computeGradient()

NOX::Abstract::Group::ReturnType LOCA::Homotopy::DeflatedGroup::computeGradient ( )
virtual

◆ computeJacobian()

◆ computeNewton()

NOX::Abstract::Group::ReturnType LOCA::Homotopy::DeflatedGroup::computeNewton ( Teuchos::ParameterList & params)
virtual

Compute Newton direction for extended continuation system.

Reimplemented from NOX::Abstract::Group.

References applyJacobianInverseMultiVector(), computeF(), computeJacobian(), fMultiVec, globalData, isF(), isJacobian(), isValidNewton, newtonMultiVec, and NOX::Abstract::Group::Ok.

◆ computeScaledDotProduct()

double LOCA::Homotopy::DeflatedGroup::computeScaledDotProduct ( const NOX::Abstract::Vector & a,
const NOX::Abstract::Vector & b ) const
virtual

◆ computeX()

void LOCA::Homotopy::DeflatedGroup::computeX ( const NOX::Abstract::Group & g,
const NOX::Abstract::Vector & d,
double step )
virtual

Compute and return solution vector, x, where this.x = grp.x + step * d.

Implements NOX::Abstract::Group.

References getX(), LOCA::MultiContinuation::ExtendedVector::getXVec(), grpPtr, resetIsValid(), LOCA::Extended::Vector::update(), and xVec.

◆ copy()

◆ extractParameterComponent()

void LOCA::Homotopy::DeflatedGroup::extractParameterComponent ( bool use_transpose,
const NOX::Abstract::MultiVector & v,
NOX::Abstract::MultiVector::DenseMatrix & v_p ) const
virtual

Given the vector v, extract the parameter components of all of the nested subvectors in v down to the solution component for the unbordered group.

Implements LOCA::BorderedSystem::AbstractGroup.

References bordered_grp, LOCA::Extended::MultiVector::getScalars(), LOCA::MultiContinuation::ExtendedMultiVector::getXMultiVec(), and isBordered.

◆ extractSolutionComponent()

void LOCA::Homotopy::DeflatedGroup::extractSolutionComponent ( const NOX::Abstract::MultiVector & v,
NOX::Abstract::MultiVector & v_x ) const
virtual

Given the vector v, extract the underlying solution component corresponding to the unbordered group.

Implements LOCA::BorderedSystem::AbstractGroup.

References bordered_grp, LOCA::MultiContinuation::ExtendedMultiVector::getXMultiVec(), and isBordered.

◆ fillA()

void LOCA::Homotopy::DeflatedGroup::fillA ( NOX::Abstract::MultiVector & A) const
virtual

Fill the combined A block as described above.

Implements LOCA::BorderedSystem::AbstractGroup.

References bordered_grp, isBordered, NOX::Abstract::MultiVector::subView(), and underlyingF.

◆ fillB()

void LOCA::Homotopy::DeflatedGroup::fillB ( NOX::Abstract::MultiVector & B) const
virtual

Fill the combined B block as described above.

Implements LOCA::BorderedSystem::AbstractGroup.

References bordered_grp, isBordered, NOX::Abstract::MultiVector::subView(), and totalDistMultiVec.

◆ fillC()

void LOCA::Homotopy::DeflatedGroup::fillC ( NOX::Abstract::MultiVector::DenseMatrix & C) const
virtual

Fill the combined C block as described above.

Implements LOCA::BorderedSystem::AbstractGroup.

References bordered_grp, isBordered, minusOne, totalDistMultiVec, and underlyingF.

◆ getBorderedWidth()

int LOCA::Homotopy::DeflatedGroup::getBorderedWidth ( ) const
virtual

Return the total width of the bordered rows/columns.

Implements LOCA::BorderedSystem::AbstractGroup.

References bordered_grp, and isBordered.

◆ getF()

const NOX::Abstract::Vector & LOCA::Homotopy::DeflatedGroup::getF ( ) const
virtual

Return extended residual.

Implements NOX::Abstract::Group.

References fVec.

◆ getFPtr()

Teuchos::RCP< const NOX::Abstract::Vector > LOCA::Homotopy::DeflatedGroup::getFPtr ( ) const
virtual

Return RCP to extended residual.

Implements NOX::Abstract::Group.

References fVec.

◆ getGradient()

const NOX::Abstract::Vector & LOCA::Homotopy::DeflatedGroup::getGradient ( ) const
virtual

Gradient is never valid.

Implements NOX::Abstract::Group.

References gradientVec.

◆ getGradientPtr()

Teuchos::RCP< const NOX::Abstract::Vector > LOCA::Homotopy::DeflatedGroup::getGradientPtr ( ) const
virtual

Gradient is never valid.

Implements NOX::Abstract::Group.

References gradientVec.

◆ getHomotopyParam()

double LOCA::Homotopy::DeflatedGroup::getHomotopyParam ( ) const

Get homotopy parameter.

References conParam.

◆ getNewton()

const NOX::Abstract::Vector & LOCA::Homotopy::DeflatedGroup::getNewton ( ) const
virtual

Return extended Newton direction.

Implements NOX::Abstract::Group.

References newtonVec.

◆ getNewtonPtr()

Teuchos::RCP< const NOX::Abstract::Vector > LOCA::Homotopy::DeflatedGroup::getNewtonPtr ( ) const
virtual

Return RCP to extended Newton direction.

Implements NOX::Abstract::Group.

References newtonVec.

◆ getNormF()

double LOCA::Homotopy::DeflatedGroup::getNormF ( ) const
virtual

Return 2-norm of extended residual.

Implements NOX::Abstract::Group.

References fVec, and NOX::Abstract::Vector::norm().

◆ getNormNewtonSolveResidual()

double LOCA::Homotopy::DeflatedGroup::getNormNewtonSolveResidual ( ) const
virtual

Returns 2-norm of extended Newton solve residual.

References applyJacobian(), fVec, globalData, newtonVec, LOCA::Extended::Vector::norm(), and LOCA::Extended::Vector::update().

◆ getParam() [1/2]

double LOCA::Homotopy::DeflatedGroup::getParam ( int paramID) const
virtual

Return copy of parameter indexed by (integer) paramID.

Implements LOCA::MultiContinuation::AbstractGroup.

References paramVec.

◆ getParam() [2/2]

double LOCA::Homotopy::DeflatedGroup::getParam ( std::string paramID) const
virtual

Return copy of parameter indexed by (std::string) paramID.

Implements LOCA::MultiContinuation::AbstractGroup.

References LOCA::ParameterVector::getValue(), and paramVec.

◆ getParams()

const LOCA::ParameterVector & LOCA::Homotopy::DeflatedGroup::getParams ( ) const
virtual

Return a const reference to the ParameterVector owned by the group.

Implements LOCA::MultiContinuation::AbstractGroup.

References paramVec.

Referenced by DeflatedGroup().

◆ getUnborderedGroup()

Teuchos::RCP< const NOX::Abstract::Group > LOCA::Homotopy::DeflatedGroup::getUnborderedGroup ( ) const
virtual

Get bottom-level unbordered group.

Implements LOCA::BorderedSystem::AbstractGroup.

References bordered_grp, grpPtr, and isBordered.

◆ getUnderlyingGroup() [1/2]

Teuchos::RCP< LOCA::MultiContinuation::AbstractGroup > LOCA::Homotopy::DeflatedGroup::getUnderlyingGroup ( )
virtual

Return underlying group.

Implements LOCA::Extended::MultiAbstractGroup.

References grpPtr.

◆ getUnderlyingGroup() [2/2]

Teuchos::RCP< const LOCA::MultiContinuation::AbstractGroup > LOCA::Homotopy::DeflatedGroup::getUnderlyingGroup ( ) const
virtual

Return underlying group.

Implements LOCA::Extended::MultiAbstractGroup.

References grpPtr.

◆ getX()

const NOX::Abstract::Vector & LOCA::Homotopy::DeflatedGroup::getX ( ) const
virtual

Return extended solution vector.

Implements NOX::Abstract::Group.

References xVec.

Referenced by computeX(), and DeflatedGroup().

◆ getXPtr()

Teuchos::RCP< const NOX::Abstract::Vector > LOCA::Homotopy::DeflatedGroup::getXPtr ( ) const
virtual

Return RCP to extended solution vector.

Implements NOX::Abstract::Group.

References xVec.

◆ isCombinedAZero()

bool LOCA::Homotopy::DeflatedGroup::isCombinedAZero ( ) const
virtual

Indicates whether combined A block is zero.

Implements LOCA::BorderedSystem::AbstractGroup.

◆ isCombinedBZero()

bool LOCA::Homotopy::DeflatedGroup::isCombinedBZero ( ) const
virtual

Indicates whether combined B block is zero.

Implements LOCA::BorderedSystem::AbstractGroup.

◆ isCombinedCZero()

bool LOCA::Homotopy::DeflatedGroup::isCombinedCZero ( ) const
virtual

Indicates whether combined C block is zero.

Implements LOCA::BorderedSystem::AbstractGroup.

◆ isF()

bool LOCA::Homotopy::DeflatedGroup::isF ( ) const
virtual

Return true if extended residual is valid.

Implements NOX::Abstract::Group.

References isValidF.

Referenced by computeGradient(), and computeNewton().

◆ isGradient()

bool LOCA::Homotopy::DeflatedGroup::isGradient ( ) const
virtual

Always returns false.

Reimplemented from NOX::Abstract::Group.

References isValidGradient.

◆ isJacobian()

bool LOCA::Homotopy::DeflatedGroup::isJacobian ( ) const
virtual

Return true if the extended Jacobian is valid.

Reimplemented from NOX::Abstract::Group.

References isValidJacobian.

Referenced by applyJacobianInverseMultiVector(), applyJacobianMultiVector(), applyJacobianTransposeMultiVector(), computeGradient(), and computeNewton().

◆ isNewton()

bool LOCA::Homotopy::DeflatedGroup::isNewton ( ) const
virtual

Return true if the extended Newton direction is valid.

Reimplemented from NOX::Abstract::Group.

References isValidNewton.

◆ loadNestedComponents()

void LOCA::Homotopy::DeflatedGroup::loadNestedComponents ( const NOX::Abstract::MultiVector & v_x,
const NOX::Abstract::MultiVector::DenseMatrix & v_p,
NOX::Abstract::MultiVector & v ) const
virtual

Given the solution component v_x and combined parameter components v_p, distribute these components through the nested sub-vectors in v.

Implements LOCA::BorderedSystem::AbstractGroup.

References bordered_grp, LOCA::Extended::MultiVector::getScalars(), LOCA::MultiContinuation::ExtendedMultiVector::getXMultiVec(), and isBordered.

◆ operator=()

NOX::Abstract::Group & LOCA::Homotopy::DeflatedGroup::operator= ( const NOX::Abstract::Group & source)
virtual

Assignment operator.

Implements NOX::Abstract::Group.

References copy().

◆ postProcessContinuationStep()

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

References grpPtr.

◆ preProcessContinuationStep()

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

References grpPtr.

◆ printSolution() [1/2]

void LOCA::Homotopy::DeflatedGroup::printSolution ( const double conParam) const
virtual

Function to print out solution and parameter after successful step.

Reimplemented from LOCA::MultiContinuation::AbstractGroup.

References globalData, grpPtr, and NOX::Utils::StepperDetails.

◆ printSolution() [2/2]

void LOCA::Homotopy::DeflatedGroup::printSolution ( const NOX::Abstract::Vector & x,
const double conParam ) const
virtual

Function to print out a vector and parameter after successful step.

Reimplemented from LOCA::MultiContinuation::AbstractGroup.

References globalData, grpPtr, and NOX::Utils::StepperDetails.

◆ projectToDraw()

void LOCA::Homotopy::DeflatedGroup::projectToDraw ( const NOX::Abstract::Vector & x,
double * px ) const
virtual

Projects solution to a few scalars for multiparameter continuation.

Reimplemented from LOCA::MultiContinuation::AbstractGroup.

References LOCA::Extended::Vector::getScalar(), LOCA::MultiContinuation::ExtendedVector::getXVec(), and grpPtr.

◆ projectToDrawDimension()

int LOCA::Homotopy::DeflatedGroup::projectToDrawDimension ( ) const
virtual

Returns the dimension of the project to draw array.

Reimplemented from LOCA::MultiContinuation::AbstractGroup.

References grpPtr.

◆ resetIsValid()

void LOCA::Homotopy::DeflatedGroup::resetIsValid ( )
protectedvirtual

Resets all isValid flags to false.

References isValidF, isValidGradient, isValidJacobian, and isValidNewton.

Referenced by computeX(), setHomotopyParam(), setParam(), setParams(), setParamsMulti(), and setX().

◆ scaleVector()

void LOCA::Homotopy::DeflatedGroup::scaleVector ( NOX::Abstract::Vector & x) const
virtual

Scales a vector using scaling vector.

Reimplemented from LOCA::MultiContinuation::AbstractGroup.

References LOCA::MultiContinuation::ExtendedVector::getXVec(), and grpPtr.

◆ setHomotopyParam()

void LOCA::Homotopy::DeflatedGroup::setHomotopyParam ( double param)
protected

Set homotopy parameter.

References conParamID, paramVec, resetIsValid(), and xVec.

◆ setParam() [1/2]

void LOCA::Homotopy::DeflatedGroup::setParam ( int paramID,
double val )
virtual

Set parameter indexed by (integer) paramID.

Implements LOCA::MultiContinuation::AbstractGroup.

References conParam, conParamID, grpPtr, paramVec, and resetIsValid().

Referenced by setParam().

◆ setParam() [2/2]

void LOCA::Homotopy::DeflatedGroup::setParam ( std::string paramID,
double val )
virtual

Set parameter indexed by (std::string) paramID.

Implements LOCA::MultiContinuation::AbstractGroup.

References paramVec, and setParam().

◆ setParams()

void LOCA::Homotopy::DeflatedGroup::setParams ( const ParameterVector & p)
virtual

Set the parameter vector in the group to p (pVector = p).

Implements LOCA::MultiContinuation::AbstractGroup.

References conParamID, grpPtr, resetIsValid(), and xVec.

◆ setParamsMulti()

void LOCA::Homotopy::DeflatedGroup::setParamsMulti ( const std::vector< int > & paramIDs,
const NOX::Abstract::MultiVector::DenseMatrix & vals )
virtual

Set parameters indexed by (integer) paramIDs.

Implements LOCA::MultiContinuation::AbstractGroup.

References conParam, conParamID, grpPtr, paramVec, resetIsValid(), and setParamsMulti().

Referenced by setParamsMulti().

◆ setStepperParameters()

void LOCA::Homotopy::DeflatedGroup::setStepperParameters ( Teuchos::ParameterList & topParams)
protected

Creates and sets the "Stepper" parameter sublist.

References conParamLabel.

Referenced by DeflatedGroup().

◆ setupViews()

void LOCA::Homotopy::DeflatedGroup::setupViews ( )
protectedvirtual

◆ setX()

void LOCA::Homotopy::DeflatedGroup::setX ( const NOX::Abstract::Vector & y)
virtual

Set the solution vector to y.

Implements NOX::Abstract::Group.

References LOCA::MultiContinuation::ExtendedVector::getXVec(), grpPtr, resetIsValid(), and xVec.

Member Data Documentation

◆ augmentJacForHomotopyNotImplemented

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

Referenced by applyJacobianMultiVector(), applyJacobianTransposeMultiVector(), computeJacobian(), copy(), DeflatedGroup(), and DeflatedGroup().

◆ bordered_grp

Teuchos::RCP<LOCA::BorderedSystem::AbstractGroup> LOCA::Homotopy::DeflatedGroup::bordered_grp
protected

◆ borderedSolver

Teuchos::RCP<LOCA::BorderedSolver::AbstractStrategy> LOCA::Homotopy::DeflatedGroup::borderedSolver
protected

Stores bordered solver strategy.

Referenced by applyJacobianInverseMultiVector(), computeJacobian(), copy(), DeflatedGroup(), and DeflatedGroup().

◆ conParam

double LOCA::Homotopy::DeflatedGroup::conParam
protected

Value of the homotopy continuation parameter.

Ranges from 0.0 (easy solution) to 1.0 (solution to the system of interest).

Referenced by applyJacobianMultiVector(), applyJacobianTransposeMultiVector(), computeDfDpMulti(), computeF(), computeJacobian(), copy(), DeflatedGroup(), DeflatedGroup(), getHomotopyParam(), setParam(), and setParamsMulti().

◆ conParamID

int LOCA::Homotopy::DeflatedGroup::conParamID
protected

◆ conParamLabel

const std::string LOCA::Homotopy::DeflatedGroup::conParamLabel
protected

Contains the std::string used to identify the homotopy parameter in the ParameterVector object.

Referenced by DeflatedGroup(), DeflatedGroup(), and setStepperParameters().

◆ distances

std::vector<double> LOCA::Homotopy::DeflatedGroup::distances
protected

Array of distances from previous solutions.

Referenced by computeF(), computeJacobian(), copy(), DeflatedGroup(), and DeflatedGroup().

◆ distProd

double LOCA::Homotopy::DeflatedGroup::distProd
protected

◆ distVec

Teuchos::RCP<NOX::Abstract::Vector> LOCA::Homotopy::DeflatedGroup::distVec
protected

Temporary vector for storing distance.

Referenced by computeDfDpMulti(), computeF(), computeJacobian(), copy(), DeflatedGroup(), and DeflatedGroup().

◆ fMultiVec

LOCA::MultiContinuation::ExtendedMultiVector LOCA::Homotopy::DeflatedGroup::fMultiVec
protected

Stores the extended residual vector.

Referenced by computeNewton(), copy(), DeflatedGroup(), DeflatedGroup(), and setupViews().

◆ fVec

Teuchos::RCP<LOCA::MultiContinuation::ExtendedVector> LOCA::Homotopy::DeflatedGroup::fVec
protected

◆ globalData

◆ gradientMultiVec

LOCA::MultiContinuation::ExtendedMultiVector LOCA::Homotopy::DeflatedGroup::gradientMultiVec
protected

Stores the extended gradient vector.

Referenced by copy(), DeflatedGroup(), DeflatedGroup(), and setupViews().

◆ gradientVec

Teuchos::RCP<LOCA::MultiContinuation::ExtendedVector> LOCA::Homotopy::DeflatedGroup::gradientVec
protected

Stores view of first column of gradientMultiVec.

Referenced by computeGradient(), DeflatedGroup(), DeflatedGroup(), getGradient(), getGradientPtr(), and setupViews().

◆ grpPtr

◆ homotopyParams

Teuchos::RCP<Teuchos::ParameterList> LOCA::Homotopy::DeflatedGroup::homotopyParams
protected

Pitchfork parameter list.

Referenced by copy(), DeflatedGroup(), and DeflatedGroup().

◆ index_f

std::vector<int> LOCA::Homotopy::DeflatedGroup::index_f
protected

Stores indices for getting f part of fMultiVec.

Referenced by copy(), DeflatedGroup(), DeflatedGroup(), and setupViews().

◆ isBordered

bool LOCA::Homotopy::DeflatedGroup::isBordered
protected

◆ isValidF

bool LOCA::Homotopy::DeflatedGroup::isValidF
protected

Is residual vector valid.

Referenced by computeF(), copy(), DeflatedGroup(), DeflatedGroup(), isF(), and resetIsValid().

◆ isValidGradient

bool LOCA::Homotopy::DeflatedGroup::isValidGradient
protected

Is Gradient vector valid.

Referenced by computeGradient(), copy(), DeflatedGroup(), DeflatedGroup(), isGradient(), and resetIsValid().

◆ isValidJacobian

bool LOCA::Homotopy::DeflatedGroup::isValidJacobian
protected

Is Jacobian matrix valid.

Referenced by computeJacobian(), copy(), DeflatedGroup(), DeflatedGroup(), isJacobian(), and resetIsValid().

◆ isValidNewton

bool LOCA::Homotopy::DeflatedGroup::isValidNewton
protected

Is Newton vector valid.

Referenced by computeNewton(), copy(), DeflatedGroup(), DeflatedGroup(), isNewton(), and resetIsValid().

◆ minusOne

Teuchos::RCP<NOX::Abstract::MultiVector::DenseMatrix> LOCA::Homotopy::DeflatedGroup::minusOne
protected

Stores -1.

Referenced by computeJacobian(), copy(), DeflatedGroup(), DeflatedGroup(), and fillC().

◆ newtonMultiVec

LOCA::MultiContinuation::ExtendedMultiVector LOCA::Homotopy::DeflatedGroup::newtonMultiVec
protected

Stores the extended Newton vector.

Referenced by computeNewton(), copy(), DeflatedGroup(), DeflatedGroup(), and setupViews().

◆ newtonVec

Teuchos::RCP<LOCA::MultiContinuation::ExtendedVector> LOCA::Homotopy::DeflatedGroup::newtonVec
protected

Stores view of first column of newtonMultiVec.

Referenced by DeflatedGroup(), DeflatedGroup(), getNewton(), getNewtonPtr(), getNormNewtonSolveResidual(), and setupViews().

◆ numSolns

int LOCA::Homotopy::DeflatedGroup::numSolns
protected

◆ paramVec

LOCA::ParameterVector LOCA::Homotopy::DeflatedGroup::paramVec
protected

Copy of the ParameterVector for the underlying grpPtr.

We copy this and then add the homotopy parameter to the list.

Referenced by copy(), DeflatedGroup(), DeflatedGroup(), getParam(), getParam(), getParams(), setHomotopyParam(), setParam(), setParam(), and setParamsMulti().

◆ parsedParams

Teuchos::RCP<LOCA::Parameter::SublistParser> LOCA::Homotopy::DeflatedGroup::parsedParams
protected

Parsed top-level parameters.

Referenced by copy(), DeflatedGroup(), and DeflatedGroup().

◆ solns

std::vector< Teuchos::RCP<const NOX::Abstract::Vector> > LOCA::Homotopy::DeflatedGroup::solns
protected

Stores array of deflated solution vectors.

Referenced by computeF(), computeJacobian(), copy(), DeflatedGroup(), and DeflatedGroup().

◆ startVec

Teuchos::RCP<const NOX::Abstract::Vector> LOCA::Homotopy::DeflatedGroup::startVec
protected

Stores the starting vector, $ x^\ast $.

Referenced by computeDfDpMulti(), computeF(), copy(), DeflatedGroup(), and DeflatedGroup().

◆ totalDistMultiVec

Teuchos::RCP<NOX::Abstract::MultiVector> LOCA::Homotopy::DeflatedGroup::totalDistMultiVec
protected

◆ totalDistVec

Teuchos::RCP<NOX::Abstract::Vector> LOCA::Homotopy::DeflatedGroup::totalDistVec
protected

Temporary vector for storing sum of distances.

Referenced by computeJacobian(), and setupViews().

◆ underlyingF

Teuchos::RCP<NOX::Abstract::MultiVector> LOCA::Homotopy::DeflatedGroup::underlyingF
protected

◆ xMultiVec

LOCA::MultiContinuation::ExtendedMultiVector LOCA::Homotopy::DeflatedGroup::xMultiVec
protected

Stores the extended solution vector.

Referenced by copy(), DeflatedGroup(), DeflatedGroup(), and setupViews().

◆ xVec

Teuchos::RCP<LOCA::MultiContinuation::ExtendedVector> LOCA::Homotopy::DeflatedGroup::xVec
protected

Stores view of first column of xMultiVec.

Referenced by computeX(), DeflatedGroup(), DeflatedGroup(), getX(), getXPtr(), setHomotopyParam(), setParams(), setupViews(), and setX().


The documentation for this class was generated from the following files: