NOX Development
|
A group representing the Moore-Spence pitchfork equations. More...
#include <LOCA_Pitchfork_MooreSpence_ExtendedGroup.H>
Public Member Functions | |
ExtendedGroup (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< LOCA::Parameter::SublistParser > &topParams, const Teuchos::RCP< Teuchos::ParameterList > &pfParams, const Teuchos::RCP< LOCA::Pitchfork::MooreSpence::AbstractGroup > &g) | |
Constructor with initial data passed through parameter lists. | |
ExtendedGroup (const ExtendedGroup &source, NOX::CopyType type=NOX::DeepCopy) | |
Copy constructor. | |
virtual | ~ExtendedGroup () |
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 pitchfork equation residual ![]() | |
virtual NOX::Abstract::Group::ReturnType | computeJacobian () |
Compute the blocks of the Jacobian derivative of ![]() | |
virtual NOX::Abstract::Group::ReturnType | computeGradient () |
Gradient computation is not defined for this group. | |
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 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 (Teuchos::ParameterList ¶ms, 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 | 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 ¶ms, const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const |
Applies Jacobian inverse for extended system. | |
virtual bool | isF () const |
Return true if the extended residual ![]() | |
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::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. | |
virtual Teuchos::RCP< const NOX::Abstract::Vector > | getXPtr () const |
Return RCP to extended solution vector ![]() | |
virtual Teuchos::RCP< const NOX::Abstract::Vector > | getFPtr () const |
Return RCP to extended equation residual ![]() | |
virtual Teuchos::RCP< const NOX::Abstract::Vector > | getGradientPtr () const |
Vector returned is not valid. | |
virtual Teuchos::RCP< const NOX::Abstract::Vector > | getNewtonPtr () const |
Return RCP to extended Newton direction. | |
virtual double | getNormNewtonSolveResidual () const |
Return the norm of the Newton solve residual. | |
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. | |
![]() | |
MultiAbstractGroup () | |
Default constructor. | |
virtual | ~MultiAbstractGroup () |
Destructor. | |
virtual Teuchos::RCP< const LOCA::MultiContinuation::AbstractGroup > | getBaseLevelUnderlyingGroup () const |
Return base-level underlying group. | |
virtual Teuchos::RCP< LOCA::MultiContinuation::AbstractGroup > | getBaseLevelUnderlyingGroup () |
Return base-level underlying group. | |
![]() | |
Group () | |
Constructor. | |
virtual | ~Group () |
Destructor. | |
virtual NOX::Abstract::Group::ReturnType | applyRightPreconditioning (bool useTranspose, Teuchos::ParameterList ¶ms, 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 ¶ms, const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const |
applyRightPreconditioning for multiple right-hand sides | |
virtual const NOX::Abstract::Vector & | getScaledX () 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(). | |
![]() | |
AbstractGroup () | |
Default constructor. | |
virtual | ~AbstractGroup () |
Destructor. | |
virtual double | computeScaledDotProduct (const NOX::Abstract::Vector &a, const NOX::Abstract::Vector &b) const |
Compute a scaled dot product. | |
virtual void | scaleVector (NOX::Abstract::Vector &x) const |
Scales a vector using scaling vector. | |
Implementation of LOCA::MultiContinuation::AbstractGroup | |
virtual methods | |
Teuchos::RCP< LOCA::GlobalData > | globalData |
Pointer LOCA global data object. | |
Teuchos::RCP< LOCA::Parameter::SublistParser > | parsedParams |
Parsed top-level parameters. | |
Teuchos::RCP< Teuchos::ParameterList > | pitchforkParams |
Bifurcation parameter list. | |
Teuchos::RCP< LOCA::Pitchfork::MooreSpence::AbstractGroup > | grpPtr |
Pointer to base group that defines ![]() | |
LOCA::Pitchfork::MooreSpence::ExtendedMultiVector | xMultiVec |
Stores the extended solution vector and J^-1 df/dp. | |
LOCA::Pitchfork::MooreSpence::ExtendedMultiVector | fMultiVec |
Stores the extended residual vector and df/dp. | |
LOCA::Pitchfork::MooreSpence::ExtendedMultiVector | newtonMultiVec |
Stores the extended Newton vector. | |
Teuchos::RCP< NOX::Abstract::MultiVector > | asymMultiVec |
Stores the asymmetric vector. | |
Teuchos::RCP< NOX::Abstract::MultiVector > | lengthMultiVec |
Stores the length normalization vector. | |
Teuchos::RCP< LOCA::Pitchfork::MooreSpence::ExtendedVector > | xVec |
Stores view of first column of xMultiVec. | |
Teuchos::RCP< LOCA::Pitchfork::MooreSpence::ExtendedVector > | fVec |
Stores view of first column of fMultiVec. | |
Teuchos::RCP< LOCA::Pitchfork::MooreSpence::ExtendedMultiVector > | ffMultiVec |
Stores view of first column of fMultiVec as a multivec. | |
Teuchos::RCP< LOCA::Pitchfork::MooreSpence::ExtendedMultiVector > | dfdpMultiVec |
Stores view of df/dp columns of fMultiVec. | |
Teuchos::RCP< LOCA::Pitchfork::MooreSpence::ExtendedVector > | newtonVec |
Stores view of first column of newtonMultiVec. | |
Teuchos::RCP< NOX::Abstract::Vector > | asymVec |
Stores view of first column of asymMultiVec. | |
Teuchos::RCP< NOX::Abstract::Vector > | lengthVec |
Stores view of first column of lengthMultiVec. | |
Teuchos::RCP< LOCA::Pitchfork::MooreSpence::SolverStrategy > | solverStrategy |
Stores bordering strategy. | |
std::vector< int > | index_f |
Stores indices for getting f part of fMultiVec. | |
std::vector< int > | index_dfdp |
Stores indices for getting df/dp part of fMultiVec. | |
std::vector< int > | bifParamID |
Stores the bifurcation parameter index. | |
bool | isValidF |
Is residual vector valid. | |
bool | isValidJacobian |
Is Jacobian matrix valid. | |
bool | isValidNewton |
Is Newton vector valid. | |
virtual void | copy (const NOX::Abstract::Group &source) |
Assignment operator. | |
virtual void | setParamsMulti (const std::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 (std::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 (std::string paramID) const |
Return copy of parameter indexed by paramID. | |
virtual NOX::Abstract::Group::ReturnType | computeDfDpMulti (const std::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 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. | |
double | getBifParam () const |
Get bifurcation parameter. | |
double | lTransNorm (const NOX::Abstract::Vector &n) const |
Defines null vector normalization ![]() | |
void | lTransNorm (const NOX::Abstract::MultiVector &n, NOX::Abstract::MultiVector::DenseMatrix &result) const |
null vector normalization for multivectors | |
void | setBifParam (double param) |
Set bifurcation parameter. | |
void | setupViews () |
Sets up multivector views. | |
void | init (bool perturbSoln=false, double perturbSize=0.0) |
Initializes group. | |
Additional Inherited Members | |
![]() | |
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... | |
A group representing the Moore-Spence pitchfork equations.
The LOCA::Pitchfork::MooreSpence::ExtendedGroup is a concrete implementation of the NOX::Abstract::Group, LOCA::MultiContinuation::AbstractGroup and LOCA::Extended::MultiAbstractGroup that defines the following extended set of equations that are regular at a generic pitchfork bifurcation:
where
The group stores an underlying group of type LOCA::Pitchfork::MooreSpence AbstractGroup to represent the equations
This class implements all of the NOX::Abstract::Group, LOCA::MultiContinuation::AbstractGroup, and LOCA::Extended::MultiAbstractGroup 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 pitchfork point or to the LOCA::Stepper to compute a family of pitchforks 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 pitchfork equations.
The class is intialized via the pfParams
parameter list argument to the constructor. The parameters this class recognizes are:
|
virtual |
Computes the extended Jacobian vector product.
This method computes the extended Jacobian vector product
using the applyJacobian, computeDJnDxa, and innerProdut methods of the underlying group where
Reimplemented from NOX::Abstract::Group.
References NOX::Abstract::Vector::createMultiVector(), and NOX::DeepCopy.
|
virtual |
Applies the inverse of the extended Jacobian matrix using the bordering algorithm.
This method is a special case of applyJacobianInverseMultiVector() for a single right-hand-side.
Reimplemented from NOX::Abstract::Group.
References NOX::Abstract::Vector::createMultiVector(), and NOX::DeepCopy.
|
virtual |
Applies Jacobian inverse for extended system.
Uses a LOCA::Pitchfork::MooreSpence::SolverStrategy instantiated by the LOCA::Pitchfork::MooreSpence::SolverFactory to implement the solve.
Reimplemented from NOX::Abstract::Group.
|
virtual |
Applies Jacobian for extended system.
Reimplemented from NOX::Abstract::Group.
References LOCA::Pitchfork::MooreSpence::ExtendedMultiVector::getBifParams(), LOCA::Pitchfork::MooreSpence::ExtendedMultiVector::getNullMultiVec(), LOCA::Pitchfork::MooreSpence::ExtendedMultiVector::getSlacks(), LOCA::Pitchfork::MooreSpence::ExtendedMultiVector::getXMultiVec(), NOX::Abstract::Group::Ok, and NOX::ShapeCopy.
|
virtual |
Jacobian transpose product is not defined by this group.
Reimplemented from NOX::Abstract::Group.
References NOX::Abstract::Vector::createMultiVector(), and NOX::DeepCopy.
|
virtual |
Jacobian transpose not defined for this system.
Reimplemented from NOX::Abstract::Group.
References NOX::Abstract::Group::NotDefined.
|
virtual |
Cloning function.
Implements NOX::Abstract::Group.
|
virtual |
Compute
Implements LOCA::MultiContinuation::AbstractGroup.
References LOCA::Pitchfork::MooreSpence::ExtendedMultiVector::getColumn(), LOCA::Pitchfork::MooreSpence::ExtendedMultiVector::getNullMultiVec(), LOCA::Extended::MultiVector::getScalar(), LOCA::Pitchfork::MooreSpence::ExtendedMultiVector::getXMultiVec(), NOX::Abstract::MultiVector::numVectors(), and NOX::Abstract::Group::Ok.
|
virtual |
Compute the pitchfork equation residual
This method fills the extended residual
The solution component residual
Implements NOX::Abstract::Group.
References NOX::Abstract::Group::Ok.
|
virtual |
Gradient computation is not defined for this group.
Reimplemented from NOX::Abstract::Group.
References NOX::Abstract::Group::NotDefined.
|
virtual |
Compute the blocks of the Jacobian derivative of
This method computes the
by calling the computeJacobian, computeDfDp, and computeDJnDp methods of the underlying group. The second derivative matrix
Reimplemented from NOX::Abstract::Group.
References NOX::Abstract::Group::Ok.
|
virtual |
Compute Newton direction using applyJacobianInverse().
Reimplemented from NOX::Abstract::Group.
References NOX::Abstract::Group::Ok.
|
virtual |
Compute this.x = grp.x + step * d.
Implements NOX::Abstract::Group.
References getX(), LOCA::Pitchfork::MooreSpence::ExtendedVector::getXVec(), grpPtr, and LOCA::Extended::Vector::update().
|
virtual |
Assignment operator.
Implements LOCA::MultiContinuation::AbstractGroup.
References asymMultiVec, bifParamID, fMultiVec, globalData, grpPtr, index_dfdp, index_f, isValidF, isValidJacobian, isValidNewton, lengthMultiVec, newtonMultiVec, parsedParams, pitchforkParams, and xMultiVec.
|
virtual |
Return extended equation residual
Implements NOX::Abstract::Group.
|
virtual |
Return RCP to extended equation residual
Implements NOX::Abstract::Group.
|
virtual |
Vector returned is not valid.
Implements NOX::Abstract::Group.
|
virtual |
Vector returned is not valid.
Implements NOX::Abstract::Group.
|
virtual |
Return extended Newton direction.
Implements NOX::Abstract::Group.
|
virtual |
Return RCP to extended Newton direction.
Implements NOX::Abstract::Group.
|
virtual |
|
virtual |
Return copy of parameter indexed by paramID.
Implements LOCA::MultiContinuation::AbstractGroup.
|
virtual |
Return copy of parameter indexed by paramID.
Implements LOCA::MultiContinuation::AbstractGroup.
|
virtual |
Return a const reference to the paramter vector owned by the group.
Implements LOCA::MultiContinuation::AbstractGroup.
|
virtual |
Return underlying group.
Implements LOCA::Extended::MultiAbstractGroup.
|
virtual |
Return underlying group.
Implements LOCA::Extended::MultiAbstractGroup.
|
virtual |
|
virtual |
Return RCP to extended solution vector
Implements NOX::Abstract::Group.
|
virtual |
Return true
if the extended residual
Implements NOX::Abstract::Group.
|
virtual |
Always returns false.
Reimplemented from NOX::Abstract::Group.
|
virtual |
Return true
if the extended Jacobian is valid.
Reimplemented from NOX::Abstract::Group.
|
virtual |
Return true
if the extended Newton direction is valid.
Reimplemented from NOX::Abstract::Group.
void LOCA::Pitchfork::MooreSpence::ExtendedGroup::lTransNorm | ( | const NOX::Abstract::MultiVector & | n, |
NOX::Abstract::MultiVector::DenseMatrix & | result ) const |
null vector normalization for multivectors
Note: result should have 1 row and n.numVectors() columns.
References NOX::Abstract::MultiVector::multiply().
|
virtual |
Assignment operator.
Implements NOX::Abstract::Group.
|
virtual |
Perform any postprocessing after a continuation step finishes.
The stepStatus
argument indicates whether the step was successful.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
|
virtual |
Perform any preprocessing before a continuation step starts.
The stepStatus
argument indicates whether the previous step was successful.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
|
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::MultiContinuation::AbstractGroup.
References NOX::Utils::StepperDetails.
|
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::MultiContinuation::AbstractGroup.
References LOCA::Pitchfork::MooreSpence::ExtendedVector::getBifParam(), LOCA::Pitchfork::MooreSpence::ExtendedVector::getNullVec(), LOCA::Pitchfork::MooreSpence::ExtendedVector::getSlack(), LOCA::Pitchfork::MooreSpence::ExtendedVector::getXVec(), and NOX::Utils::StepperDetails.
|
virtual |
Projects solution to a few scalars for multiparameter continuation.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
References LOCA::Pitchfork::MooreSpence::ExtendedVector::getBifParam(), and LOCA::Pitchfork::MooreSpence::ExtendedVector::getXVec().
|
virtual |
Returns the dimension of the project to draw array.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
|
virtual |
Set parameter indexed by paramID.
Implements LOCA::MultiContinuation::AbstractGroup.
|
virtual |
Set parameter indexed by paramID.
Implements LOCA::MultiContinuation::AbstractGroup.
References LOCA::ParameterVector::getIndex().
|
virtual |
Set the parameter vector in the group to p.
Implements LOCA::MultiContinuation::AbstractGroup.
|
virtual |
Set parameters indexed by (integer) paramIDs.
Implements LOCA::MultiContinuation::AbstractGroup.
|
virtual |
Set the solution vector, x, to y.
Implements NOX::Abstract::Group.
References LOCA::Pitchfork::MooreSpence::ExtendedVector::getXVec().