LOCA::MultiContinuation::ConstrainedGroup Class Reference

Extended group representing a constrained nonlinear problem. More...

#include <LOCA_MultiContinuation_ConstrainedGroup.H>

Inheritance diagram for LOCA::MultiContinuation::ConstrainedGroup:
Inheritance graph
Collaboration diagram for LOCA::MultiContinuation::ConstrainedGroup:
Collaboration graph

List of all members.

Public Member Functions

 ConstrainedGroup (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< LOCA::Parameter::SublistParser > &topParams, const Teuchos::RCP< Teuchos::ParameterList > &constraintParams, const Teuchos::RCP< LOCA::MultiContinuation::AbstractGroup > &grp, const Teuchos::RCP< LOCA::MultiContinuation::ConstraintInterface > &constraints, const vector< int > &paramIDs, bool skip_dfdp=false)
 ConstrainedGroup (const ConstrainedGroup &source, NOX::CopyType type=NOX::DeepCopy)
 Copy constructor.
virtual ~ConstrainedGroup ()
virtual void setConstraintParameter (int i, double val)
 Set constraint parameter i to value val.
virtual double getConstraintParameter (int i) const
 Get constraint parameter i.
virtual const vector< int > & getConstraintParamIDs () const
 Get constraint parameter IDs.
virtual Teuchos::RCP
< LOCA::MultiContinuation::AbstractGroup
getGroup ()
 Get group.
virtual Teuchos::RCP
< LOCA::MultiContinuation::ConstraintInterface
getConstraints ()
 Get constraints.
Implementation of NOX::Abstract::Group virtual methods

virtual NOX::Abstract::Groupoperator= (const NOX::Abstract::Group &source)
 Assignment operator.
virtual Teuchos::RCP
< NOX::Abstract::Group
clone (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.
computeF ()
 Compute extended continuation equations.
computeJacobian ()
 Compute extended continuation jacobian.
computeGradient ()
 Gradient is not defined for this system.
computeNewton (Teuchos::ParameterList &params)
 Compute Newton direction for extended continuation system.
applyJacobian (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const
 Applies Jacobian for extended system.
applyJacobianTranspose (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const
 Jacobian transpose not defined for this system.
applyJacobianInverse (Teuchos::ParameterList &params, const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const
 Applies Jacobian inverse for extended system.
applyJacobianMultiVector (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const
 Applies Jacobian for extended system.
applyJacobianTransposeMultiVector (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const
 Jacobian transpose not defined for this system.
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
getX () const
 Return extended solution vector.
virtual const
getF () const
 Return extended residual.
virtual double getNormF () const
 Return 2-norm of extended residual.
virtual const
getGradient () const
 Gradient is never valid.
virtual const
getNewton () const
 Return 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
getUnderlyingGroup () const
 Return underlying group.
virtual Teuchos::RCP
< LOCA::MultiContinuation::AbstractGroup
getUnderlyingGroup ()
 Return underlying group.
Implementation of LOCA::MultiContinuation::AbstractGroup

virtual methods

virtual void copy (const NOX::Abstract::Group &source)
 Assignment operator.
virtual void setParamsMulti (const 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 (string paramID, double val)
 Set parameter indexed by (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 (string paramID) const
 Return copy of parameter indexed by (string) paramID.
computeDfDpMulti (const 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.
Implementation of
virtual int getBorderedWidth () const
 Return the total width of the bordered rows/columns.
virtual Teuchos::RCP< const
getUnborderedGroup () 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.
Implementation of LOCA::Abstract::TransposeSolveGroup

virtual methods

applyJacobianTransposeInverse (Teuchos::ParameterList &params, const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const
 Solve Jacobian-tranpose system.
applyJacobianTransposeInverseMultiVector (Teuchos::ParameterList &params, const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const
 Solve Jacobian-tranpose system with multiple right-hand sides.

Protected Member Functions

virtual void resetIsValid ()
 Resets all isValid flags to false.
virtual void setupViews ()
 Sets up multivector views.

Protected Attributes

Teuchos::RCP< LOCA::GlobalDataglobalData
 Pointer LOCA global data object.
< LOCA::Parameter::SublistParser
 Parsed top-level parameters.
< Teuchos::ParameterList
 Constraint parameter list.
< LOCA::MultiContinuation::AbstractGroup
 Pointer to base group that defines $F$.
< LOCA::BorderedSystem::AbstractGroup
 Pointer to base group as a bordered group.
< LOCA::MultiContinuation::ConstraintInterface
 Pointer to constraint object.
int numParams
 Number of parameters.
LOCA::MultiContinuation::ExtendedMultiVector xMultiVec
 Stores the extended solution vector.
LOCA::MultiContinuation::ExtendedMultiVector fMultiVec
 Stores the extended residual vector and df/dp.
LOCA::MultiContinuation::ExtendedMultiVector newtonMultiVec
 Stores the extended Newton vector.
LOCA::MultiContinuation::ExtendedMultiVector gradientMultiVec
 Stores the extended gradient vector.
< LOCA::MultiContinuation::ExtendedVector
 Stores view of first column of xMultiVec.
< LOCA::MultiContinuation::ExtendedVector
 Stores view of first column of fMultiVec.
< LOCA::MultiContinuation::ExtendedMultiVector
 Stores view of first column of fMultiVec as a multivec.
< LOCA::MultiContinuation::ExtendedMultiVector
 Stores view of df/dp columns of fMultiVec.
< LOCA::MultiContinuation::ExtendedVector
 Stores view of first column of newtonMultiVec.
< LOCA::MultiContinuation::ExtendedVector
 Stores view of first column of gradientMultiVec.
< LOCA::BorderedSolver::JacobianOperator
< LOCA::BorderedSolver::AbstractStrategy
 Stores bordered solver strategy.
vector< int > index_f
 Stores indices for getting f part of fMultiVec.
vector< int > index_dfdp
 Stores indices for getting df/dp part of fMultiVec.
vector< int > constraintParamIDs
 integer id of constraint parameters
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.
bool skipDfDp
 Flag indicating whether to skip df/dp computations.

Detailed Description

Extended group representing a constrained nonlinear problem.

This class represents a constrained system of nonlinear equations:

\[ \begin{split} f(x,p) &= 0 \\ g(x,p) &= 0 \end{split} \]

where $x\in\Re^n$ is the solution vector, $p\in\Re^m$ is a set of constraint parameters, $f(x,p)\in\Re^n$ is represented by some LOCA::MultiContinuation::AbstractGroup, and $g(x,p)\in\Re^m$ is a constraint represented by a LOCA::MultiContinuation::ConstraintInterface object. Newton steps for this system are computed via some LOCA::BorderedSolver::AbstractStrategy which is specified via the constraintParams argument to the constructor.

Constructor & Destructor Documentation

LOCA::MultiContinuation::ConstrainedGroup::ConstrainedGroup ( const Teuchos::RCP< LOCA::GlobalData > &  global_data,
const Teuchos::RCP< LOCA::Parameter::SublistParser > &  topParams,
const Teuchos::RCP< Teuchos::ParameterList > &  constraintParams,
const Teuchos::RCP< LOCA::MultiContinuation::AbstractGroup > &  grp,
const Teuchos::RCP< LOCA::MultiContinuation::ConstraintInterface > &  constraints,
const vector< int > &  paramIDs,
bool  skip_dfdp = false 


global_data [in] Global data object
topParams [in] Parsed top-level parameter list.
constraintParams [in] Parameter list determining the bordered solver method.
grp [in] Group representing $f$.
constraints [in] Constraint object representing $g$.
paramIDs [in] Parameter IDs of the constraint parameters
skip_dfdp [in] Whether to skip computation of df/dp when computing extended Jacobian.

References bordered_grp, borderedSolver, constraintParamIDs, constraintParams, constraintsPtr, globalData, grpPtr, isBordered, numParams, parsedParams, Teuchos::rcp(), setupViews(), and xVec.

Referenced by clone().

Member Function Documentation

NOX::Abstract::Group::ReturnType LOCA::MultiContinuation::ConstrainedGroup::computeDfDpMulti ( const 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 constraintsPtr, LOCA::Extended::MultiVector::getScalars(), LOCA::MultiContinuation::ExtendedMultiVector::getXMultiVec(), globalData, grpPtr, and NOX::Abstract::Group::Ok.

void LOCA::MultiContinuation::ConstrainedGroup::extractParameterComponent ( bool  use_transpose,
const NOX::Abstract::MultiVector v,
NOX::Abstract::MultiVector::DenseMatrix v_p 
) const [virtual]
void LOCA::MultiContinuation::ConstrainedGroup::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.

void LOCA::MultiContinuation::ConstrainedGroup::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(), isBordered, Teuchos::SerialDenseMatrix< OrdinalType, ScalarType >::numCols(), numParams, and Teuchos::View.

void LOCA::MultiContinuation::ConstrainedGroup::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 constraintsPtr, and grpPtr.

void LOCA::MultiContinuation::ConstrainedGroup::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 constraintsPtr, and grpPtr.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Generated on Wed Apr 13 09:59:43 2011 for NOX by  doxygen 1.6.3