NOX Development
Public Member Functions | List of all members
LOCA::Pitchfork::MinimallyAugmented::Constraint Class Reference

Implementation of LOCA::MultiContinuation::ConstraintInterfaceMVDX for computing pitchforks for the minimally augmented pitchfork formulation. More...

#include <LOCA_Pitchfork_MinimallyAugmented_Constraint.H>

Inheritance diagram for LOCA::Pitchfork::MinimallyAugmented::Constraint:
Inheritance graph
[legend]
Collaboration diagram for LOCA::Pitchfork::MinimallyAugmented::Constraint:
Collaboration graph
[legend]

Public Member Functions

 Constraint (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::MinimallyAugmented::AbstractGroup > &g, const Teuchos::RCP< const NOX::Abstract::Vector > &psi, int bif_param)
 Constructor.
 
 Constraint (const Constraint &source, NOX::CopyType type=NOX::DeepCopy)
 Copy constructor.
 
virtual ~Constraint ()
 Destructor. More...
 
virtual void setGroup (const Teuchos::RCP< LOCA::TurningPoint::MinimallyAugmented::AbstractGroup > &g)
 Set the group pointer. More...
 
- Public Member Functions inherited from LOCA::TurningPoint::MinimallyAugmented::Constraint
 Constraint (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< LOCA::Parameter::SublistParser > &topParams, const Teuchos::RCP< Teuchos::ParameterList > &tpParams, const Teuchos::RCP< LOCA::TurningPoint::MinimallyAugmented::AbstractGroup > &g, int bif_param)
 Constructor.
 
 Constraint (const Constraint &source, NOX::CopyType type=NOX::DeepCopy)
 Copy constructor.
 
virtual ~Constraint ()
 Destructor. More...
 
virtual void setGroup (const Teuchos::RCP< LOCA::TurningPoint::MinimallyAugmented::AbstractGroup > &g)
 Set the group pointer. More...
 
virtual Teuchos::RCP< const NOX::Abstract::VectorgetLeftNullVec () const
 Returns left null vector w.
 
virtual Teuchos::RCP< const NOX::Abstract::VectorgetRightNullVec () const
 Returns right null vector v.
 
virtual Teuchos::RCP< const NOX::Abstract::VectorgetAVec () const
 Returns a vector.
 
virtual Teuchos::RCP< const NOX::Abstract::VectorgetBVec () const
 Returns b vector.
 
virtual double getSigma () const
 Returns sigma.
 
virtual void setX (const NOX::Abstract::Vector &y)
 Set the solution vector to y. More...
 
virtual void setParam (int paramID, double val)
 Sets parameter indexed by paramID. More...
 
virtual void setParams (const std::vector< int > &paramIDs, const NOX::Abstract::MultiVector::DenseMatrix &vals)
 Sets parameters indexed by paramIDs. More...
 
virtual bool isConstraints () const
 Return true if constraint residuals are valid. More...
 
virtual bool isDX () const
 Return true if derivatives of constraints w.r.t. x are valid. More...
 
virtual bool isDXZero () const
 Return true if solution component of constraint derivatives is zero. More...
 
virtual void postProcessContinuationStep (LOCA::Abstract::Iterator::StepStatus stepStatus)
 Perform any postprocessing after a continuation step finishes. More...
 
- Public Member Functions inherited from LOCA::MultiContinuation::ConstraintInterfaceMVDX
 ConstraintInterfaceMVDX ()
 Constructor.
 
virtual ~ConstraintInterfaceMVDX ()
 Destructor.
 
virtual const NOX::Abstract::MultiVectorgetDX () const =0
 Return solution component of constraint derivatives. More...
 
virtual NOX::Abstract::Group::ReturnType multiplyDX (double alpha, const NOX::Abstract::MultiVector &input_x, NOX::Abstract::MultiVector::DenseMatrix &result_p) const
 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
 Compute result_x = alpha * dg/dx^T * op(b) + beta * result_x. More...
 
- Public Member Functions inherited from LOCA::MultiContinuation::ConstraintInterface
 ConstraintInterface ()
 Constructor.
 
virtual ~ConstraintInterface ()
 Destructor.
 
virtual void copy (const ConstraintInterface &source)=0
 Copy. More...
 
virtual Teuchos::RCP< LOCA::MultiContinuation::ConstraintInterfaceclone (NOX::CopyType type=NOX::DeepCopy) const =0
 Cloning function. More...
 
virtual int numConstraints () const =0
 Return number of constraints. More...
 
virtual void setX (const NOX::Abstract::Vector &x)=0
 Set the solution vector to x. More...
 
virtual void setParam (int paramID, double val)=0
 Sets parameter indexed by paramID. More...
 
virtual void setParams (const std::vector< int > &paramIDs, const NOX::Abstract::MultiVector::DenseMatrix &vals)=0
 Sets parameters indexed by paramIDs. More...
 
virtual NOX::Abstract::Group::ReturnType computeConstraints ()=0
 Compute constraint residuals. More...
 
virtual NOX::Abstract::Group::ReturnType computeDX ()=0
 Compute derivative of constraints w.r.t. solution vector x. More...
 
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. More...
 
virtual bool isDX () const =0
 Return true if derivative of constraint w.r.t. x is valid. More...
 
virtual const NOX::Abstract::MultiVector::DenseMatrixgetConstraints () const =0
 Return constraint residuals. More...
 
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. More...
 
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...
 

Implementation of LOCA::MultiContinuation::ConstraintInterface

virtual methods

Teuchos::RCP< LOCA::Pitchfork::MinimallyAugmented::AbstractGrouppf_grp
 Pointer to pitchfork group.
 
Teuchos::RCP< const NOX::Abstract::Vectorpsi_vector
 Vector for $\psi$.
 
Teuchos::RCP< NOX::Abstract::MultiVectordgdx
 Stores dg/dx.
 
NOX::Abstract::MultiVector::DenseMatrix pf_constraints
 Constraint values.
 
virtual void copy (const LOCA::MultiContinuation::ConstraintInterface &source)
 Copy. More...
 
virtual Teuchos::RCP< LOCA::MultiContinuation::ConstraintInterfaceclone (NOX::CopyType type=NOX::DeepCopy) const
 Cloning function. More...
 
virtual int numConstraints () const
 Return number of constraints. More...
 
virtual NOX::Abstract::Group::ReturnType computeConstraints ()
 Compute continuation constraint equations. More...
 
virtual NOX::Abstract::Group::ReturnType computeDX ()
 Compute derivative of constraints w.r.t. solution vector x. More...
 
virtual NOX::Abstract::Group::ReturnType computeDP (const std::vector< int > &paramIDs, NOX::Abstract::MultiVector::DenseMatrix &dgdp, bool isValidG)
 Compute derivative of constraints w.r.t. supplied parameters. More...
 
virtual const NOX::Abstract::MultiVector::DenseMatrixgetConstraints () const
 Return constraint residuals. More...
 
virtual const NOX::Abstract::MultiVectorgetDX () const
 Return solution component of constraint derivatives. More...
 

Additional Inherited Members

- Protected Types inherited from LOCA::TurningPoint::MinimallyAugmented::Constraint
enum  NullVectorScaling { NVS_None , NVS_OrderOne , NVS_OrderN }
 Enumerated type determining type of scaling. More...
 
- Protected Member Functions inherited from LOCA::TurningPoint::MinimallyAugmented::Constraint
virtual void scaleNullVectors (NOX::Abstract::Vector &a, NOX::Abstract::Vector &b)
 Scale a & b vectors.
 
virtual void getInitialVectors (NOX::Abstract::Vector &a, NOX::Abstract::Vector &b)
 Get initial a & b vectors.
 
- Protected Attributes inherited from LOCA::TurningPoint::MinimallyAugmented::Constraint
Teuchos::RCP< LOCA::GlobalDataglobalData
 Pointer LOCA global data object.
 
Teuchos::RCP< LOCA::Parameter::SublistParserparsedParams
 Parsed top-level parameters.
 
Teuchos::RCP< Teuchos::ParameterList > turningPointParams
 Bifurcation parameter list.
 
Teuchos::RCP< LOCA::TurningPoint::MinimallyAugmented::AbstractGroupgrpPtr
 Pointer to base group that defines $F$.
 
Teuchos::RCP< NOX::Abstract::MultiVectora_vector
 Vector for $a$.
 
Teuchos::RCP< NOX::Abstract::MultiVectorb_vector
 Vector for $b$.
 
Teuchos::RCP< NOX::Abstract::MultiVectorw_vector
 Stores left null vector.
 
Teuchos::RCP< NOX::Abstract::MultiVectorv_vector
 Stores right null vector.
 
Teuchos::RCP< NOX::Abstract::MultiVectorJv_vector
 Stores J*v.
 
Teuchos::RCP< NOX::Abstract::MultiVectorJtw_vector
 Stores J^T*w.
 
Teuchos::RCP< NOX::Abstract::MultiVectorsigma_x
 Stores sigma_x.
 
NOX::Abstract::MultiVector::DenseMatrix constraints
 Constraint values.
 
Teuchos::RCP< LOCA::BorderedSolver::AbstractStrategyborderedSolver
 Stores bordered solver strategy.
 
double dn
 Stores vector length as a double.
 
double sigma_scale
 Stores scale factor on sigma.
 
bool isSymmetric
 Flag indicating whether Jacobian is symmetric.
 
bool isValidConstraints
 Flag indicating whether constraints are valid.
 
bool isValidDX
 Flag indicating whether sigma_x is valid.
 
std::vector< int > bifParamID
 Stores the bifurcation parameter index.
 
bool updateVectorsEveryContinuationStep
 Flag indicating whether to update $a$ and $b$ every continuation step.
 
bool updateVectorsEveryIteration
 Flag indicating whether to update $a$ and $b$ every nonlinear iteration.
 
NullVectorScaling nullVecScaling
 Null vector scaling method.
 
bool multiplyMass
 Multiply null vectors by mass matrix.
 
Teuchos::RCP< LOCA::TimeDependent::AbstractGrouptdGrp
 Time dependent group interface for multiplying by mass matrix.
 
Teuchos::RCP< NOX::Abstract::Vectortmp_mass
 Temporary vector for mulplying null vectors by mass matrix.
 

Detailed Description

Implementation of LOCA::MultiContinuation::ConstraintInterfaceMVDX for computing pitchforks for the minimally augmented pitchfork formulation.

This class implements the pitchfork constraint equations $\sigma(x,p) = 0$, $\langle \psi,x \rangle = 0$ for the minimally augmented pitchfork formulation where $\sigma$ is defined via

\[
    \begin{bmatrix}
      J   & a \\
      b^T & 0
    \end{bmatrix}
    \begin{bmatrix}
      v \\
      \sigma_1
    \end{bmatrix} =
    \begin{bmatrix}
      0 \\
      n
    \end{bmatrix},
\]

\[
    \begin{bmatrix}
      J^T & b \\
      a^T & 0
    \end{bmatrix}
    \begin{bmatrix}
      w \\
      \sigma_2
    \end{bmatrix} =
    \begin{bmatrix}
      0 \\
      n
    \end{bmatrix},
\]

\[
    \sigma = -w^T J v/n
\]

for any vectors $a$ and $b$ in $\Re^n$. Using these relationships, it is easy to show

\[
    \begin{split}
       \sigma_x &= -(w^T J v)_x/n = -w^T J_x v/n \\
       \sigma_p &= -(w^T J v)_p/n = -w^T J_p v/n
    \end{split}
\]

The class is derived from LOCA::TurningPoint::MinimallyAugmented::Constraint. See this class for a description of available parameters.

Constructor & Destructor Documentation

◆ ~Constraint()

LOCA::Pitchfork::MinimallyAugmented::Constraint::~Constraint ( )
virtual

Destructor.

Reimplemented from LOCA::TurningPoint::MinimallyAugmented::Constraint.

Member Function Documentation

◆ clone()

Teuchos::RCP< LOCA::MultiContinuation::ConstraintInterface > LOCA::Pitchfork::MinimallyAugmented::Constraint::clone ( NOX::CopyType  type = NOX::DeepCopy) const
virtual

Cloning function.

Reimplemented from LOCA::TurningPoint::MinimallyAugmented::Constraint.

◆ computeConstraints()

NOX::Abstract::Group::ReturnType LOCA::Pitchfork::MinimallyAugmented::Constraint::computeConstraints ( )
virtual

◆ computeDP()

NOX::Abstract::Group::ReturnType LOCA::Pitchfork::MinimallyAugmented::Constraint::computeDP ( const std::vector< int > &  paramIDs,
NOX::Abstract::MultiVector::DenseMatrix dgdp,
bool  isValidG 
)
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.

Reimplemented from LOCA::TurningPoint::MinimallyAugmented::Constraint.

References LOCA::TurningPoint::MinimallyAugmented::Constraint::computeDP().

◆ computeDX()

NOX::Abstract::Group::ReturnType LOCA::Pitchfork::MinimallyAugmented::Constraint::computeDX ( )
virtual

Compute derivative of constraints w.r.t. solution vector x.

Reimplemented from LOCA::TurningPoint::MinimallyAugmented::Constraint.

References LOCA::TurningPoint::MinimallyAugmented::Constraint::computeDX(), and NOX::Abstract::Group::Ok.

◆ copy()

void LOCA::Pitchfork::MinimallyAugmented::Constraint::copy ( const LOCA::MultiContinuation::ConstraintInterface source)
virtual

◆ getConstraints()

const NOX::Abstract::MultiVector::DenseMatrix & LOCA::Pitchfork::MinimallyAugmented::Constraint::getConstraints ( ) const
virtual

Return constraint residuals.

Reimplemented from LOCA::TurningPoint::MinimallyAugmented::Constraint.

◆ getDX()

const NOX::Abstract::MultiVector * LOCA::Pitchfork::MinimallyAugmented::Constraint::getDX ( ) const
virtual

Return solution component of constraint derivatives.

Reimplemented from LOCA::TurningPoint::MinimallyAugmented::Constraint.

◆ numConstraints()

int LOCA::Pitchfork::MinimallyAugmented::Constraint::numConstraints ( ) const
virtual

Return number of constraints.

Reimplemented from LOCA::TurningPoint::MinimallyAugmented::Constraint.

◆ setGroup()

void LOCA::Pitchfork::MinimallyAugmented::Constraint::setGroup ( const Teuchos::RCP< LOCA::TurningPoint::MinimallyAugmented::AbstractGroup > &  g)
virtual

Set the group pointer.

This method should be called when ever the constrained group is copied, since we don't explicitly copy the underlying group here.

References LOCA::TurningPoint::MinimallyAugmented::Constraint::setGroup().


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