NOX  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
LOCA::MultiContinuation::ConstraintInterface Class Referenceabstract

Abstract interface for the constraint portion of a constrained nonlinear system. More...

#include <LOCA_MultiContinuation_ConstraintInterface.H>

Inheritance diagram for LOCA::MultiContinuation::ConstraintInterface:
Inheritance graph
[legend]

Public Member Functions

 ConstraintInterface ()
 Constructor.
 
virtual ~ConstraintInterface ()
 Destructor.
 
virtual void copy (const ConstraintInterface &source)=0
 Copy.
 
virtual Teuchos::RCP
< LOCA::MultiContinuation::ConstraintInterface
clone (NOX::CopyType type=NOX::DeepCopy) const =0
 Cloning function.
 
virtual int numConstraints () const =0
 Return number of constraints.
 
virtual void setX (const NOX::Abstract::Vector &x)=0
 Set the solution vector to x.
 
virtual void setParam (int paramID, double val)=0
 Sets parameter indexed by paramID.
 
virtual void setParams (const std::vector< int > &paramIDs, const NOX::Abstract::MultiVector::DenseMatrix &vals)=0
 Sets parameters indexed by paramIDs.
 
virtual
NOX::Abstract::Group::ReturnType 
computeConstraints ()=0
 Compute constraint residuals.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDX ()=0
 Compute derivative of constraints w.r.t. solution vector x.
 
virtual
NOX::Abstract::Group::ReturnType 
computeDP (const std::vector< int > &paramIDs, NOX::Abstract::MultiVector::DenseMatrix &dgdp, bool isValidG)=0
 Compute derivative of constraints w.r.t. supplied parameters. More...
 
virtual bool isConstraints () const =0
 Return true if constraint residuals are valid.
 
virtual bool isDX () const =0
 Return true if derivative of constraint w.r.t. x is valid.
 
virtual const
NOX::Abstract::MultiVector::DenseMatrix
getConstraints () const =0
 Return constraint residuals.
 
virtual
NOX::Abstract::Group::ReturnType 
multiplyDX (double alpha, const NOX::Abstract::MultiVector &input_x, NOX::Abstract::MultiVector::DenseMatrix &result_p) const =0
 Compute result_p = alpha * dg/dx * input_x. More...
 
virtual
NOX::Abstract::Group::ReturnType 
addDX (Teuchos::ETransp transb, double alpha, const NOX::Abstract::MultiVector::DenseMatrix &b, double beta, NOX::Abstract::MultiVector &result_x) const =0
 Compute result_x = alpha * dg/dx^T * op(b) + beta * result_x. More...
 
virtual bool isDXZero () const =0
 Return true if solution component of constraint derivatives is zero.
 
virtual void preProcessContinuationStep (LOCA::Abstract::Iterator::StepStatus)
 Perform any preprocessing before a continuation step starts. More...
 
virtual void postProcessContinuationStep (LOCA::Abstract::Iterator::StepStatus)
 Perform any postprocessing after a continuation step finishes. More...
 

Detailed Description

Abstract interface for the constraint portion of a constrained nonlinear system.

This class is used in conjunction with LOCA::MultiContinuation::ConstrainedGroup to represent a constrained nonlinear system:

\[ f(x,y) = 0 g(x,y) = 0 \]

where $ f(x,y)$ is represented by a concrete implementation of a LOCA::MultiContinuation::AbstractGroup and $ g(x,y)$ (the constraint) is represented by an implementation of this class. Here it is assumed the resulting system is square, i.e., $ x\in\Re^n$, $ y\in\Re^m$, $ f(x,y)\in\Re^n$ and $ g(x,y)\in\Re^m$.

This class provides an interface to evaluate $ g(x,y)$, compute the derivatives $ g_x$ and $ g_y$, and apply the derivative $ g_x$ to arbitrary multi-vectors (the implementation is never required to explicitly store $ g_x$ which is impractical in many situations).

Member Function Documentation

virtual NOX::Abstract::Group::ReturnType LOCA::MultiContinuation::ConstraintInterface::addDX ( Teuchos::ETransp  transb,
double  alpha,
const NOX::Abstract::MultiVector::DenseMatrix b,
double  beta,
NOX::Abstract::MultiVector result_x 
) const
pure virtual

Compute result_x = alpha * dg/dx^T * op(b) + beta * result_x.

Note that this should be equivalent to

result_x.update(transb, alpha, dgdx, b, beta);

Implemented in LOCA::MultiContinuation::CompositeConstraint, LOCA::MultiContinuation::CompositeConstraintMVDX, and LOCA::MultiContinuation::ConstraintInterfaceMVDX.

virtual NOX::Abstract::Group::ReturnType LOCA::MultiContinuation::ConstraintInterface::computeDP ( const std::vector< int > &  paramIDs,
NOX::Abstract::MultiVector::DenseMatrix dgdp,
bool  isValidG 
)
pure virtual

Compute derivative of constraints w.r.t. supplied parameters.

The first column of dgdp should be filled with the constraint residuals $ g$ if isValidG is false. If isValidG is true, then the dgdp contains $ g$ on input.

Implemented in LOCA::TurningPoint::MinimallyAugmented::Constraint, LOCA::Hopf::MinimallyAugmented::Constraint, LOCA::Pitchfork::MinimallyAugmented::Constraint, LOCA::MultiContinuation::ArcLengthConstraint, LOCA::MultiContinuation::NaturalConstraint, LOCA::MultiContinuation::CompositeConstraint, LOCA::MultiContinuation::MultiVecConstraint, and LOCA::MultiContinuation::ConstraintModelEvaluator.

virtual NOX::Abstract::Group::ReturnType LOCA::MultiContinuation::ConstraintInterface::multiplyDX ( double  alpha,
const NOX::Abstract::MultiVector input_x,
NOX::Abstract::MultiVector::DenseMatrix result_p 
) const
pure virtual

Compute result_p = alpha * dg/dx * input_x.

Note that if there are n constraints and input_x has m columns, result_p should be a n by m matrix and is equivalent to

input_x.multiply(alpha, dgdx, result_p).

Implemented in LOCA::MultiContinuation::CompositeConstraint, LOCA::MultiContinuation::CompositeConstraintMVDX, and LOCA::MultiContinuation::ConstraintInterfaceMVDX.

Referenced by LOCA::BorderedSolver::LowerTriangularBlockElimination::solve(), LOCA::BorderedSolver::Bordering::solveContiguous(), LOCA::BorderedSolver::Bordering::solveFZero(), and LOCA::BorderedSolver::LowerTriangularBlockElimination::solveTranspose().

virtual void LOCA::MultiContinuation::ConstraintInterface::postProcessContinuationStep ( LOCA::Abstract::Iterator::StepStatus  )
inlinevirtual

Perform any postprocessing after a continuation step finishes.

The stepStatus argument indicates whether the step was successful. The default implementation is empty.

Reimplemented in LOCA::TurningPoint::MinimallyAugmented::Constraint, LOCA::Hopf::MinimallyAugmented::Constraint, LOCA::MultiContinuation::CompositeConstraint, and LOCA::TurningPoint::MinimallyAugmented::ModifiedConstraint.

virtual void LOCA::MultiContinuation::ConstraintInterface::preProcessContinuationStep ( LOCA::Abstract::Iterator::StepStatus  )
inlinevirtual

Perform any preprocessing before a continuation step starts.

The stepStatus argument indicates whether the previous step was successful. The default implementation is empty.

Reimplemented in LOCA::MultiContinuation::CompositeConstraint, and LOCA::TurningPoint::MinimallyAugmented::ModifiedConstraint.

Referenced by LOCA::TurningPoint::MinimallyAugmented::ModifiedConstraint::preProcessContinuationStep().


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