LOCA::Epetra::Group Class Reference

Extension of the NOX::Epetra::Group to LOCA. More...

#include <LOCA_Epetra_Group.H>

Inheritance diagram for LOCA::Epetra::Group:

[legend]
Collaboration diagram for LOCA::Epetra::Group:
[legend]
List of all members.

Public Member Functions

 Group (const Teuchos::RefCountPtr< LOCA::GlobalData > &global_data, Teuchos::ParameterList &printingParams, const Teuchos::RefCountPtr< LOCA::Epetra::Interface::Required > &i, NOX::Epetra::Vector &initialGuess, const LOCA::ParameterVector &p)
 Constructor with NO linear system (VERY LIMITED).
 Group (const Teuchos::RefCountPtr< LOCA::GlobalData > &global_data, Teuchos::ParameterList &printingParams, const Teuchos::RefCountPtr< LOCA::Epetra::Interface::Required > &i, NOX::Epetra::Vector &initialGuess, const Teuchos::RefCountPtr< NOX::Epetra::LinearSystem > &linSys, const LOCA::ParameterVector &p)
 Standard Constructor enabling most LOCA support.
 Group (const Teuchos::RefCountPtr< LOCA::GlobalData > &global_data, Teuchos::ParameterList &printingParams, const Teuchos::RefCountPtr< LOCA::Epetra::Interface::TimeDependent > &i, NOX::Epetra::Vector &initialGuess, const Teuchos::RefCountPtr< NOX::Epetra::LinearSystem > &linSys, const Teuchos::RefCountPtr< NOX::Epetra::LinearSystem > &shiftedLinSys, const LOCA::ParameterVector &p)
 Constructor with time-dependent interface and shifted linear system.
 Group (const Teuchos::RefCountPtr< LOCA::GlobalData > &global_data, Teuchos::ParameterList &printingParams, const Teuchos::RefCountPtr< LOCA::Epetra::Interface::TimeDependentMatrixFree > &i, NOX::Epetra::Vector &initialGuess, const Teuchos::RefCountPtr< NOX::Epetra::LinearSystem > &linSys, const Teuchos::RefCountPtr< NOX::Epetra::LinearSystem > &shiftedLinSys, const LOCA::ParameterVector &p)
 Constructor with time-dependent matrix-free interface and shifted linear system.
 Group (const Group &source, NOX::CopyType type=NOX::DeepCopy)
 Copy constructor. If type is DeepCopy, takes ownership of valid shared Jacobian and shared preconditioning matrix.
virtual ~Group ()
 Destructor.
virtual Groupoperator= (const Group &source)
 Assignment operator.
virtual Teuchos::RefCountPtr<
NOX::Epetra::Interface::Required
getUserInterface ()
 Return the userInterface.
virtual void printSolution (const NOX::Epetra::Vector &x, const double conParam) const
 Call the user interface print() routine, any vector.
void setScaleVector (const NOX::Abstract::Vector &s)
 Sets the scale vector.
void setJacobianOperatorForSolve (const Teuchos::RefCountPtr< const Epetra_Operator > &op) const
 Sets the Jacobian operator.
Overloaded NOX::Epetra::Group methods.
virtual NOX::Abstract::Groupoperator= (const NOX::Abstract::Group &source)
 Assignment operator.
virtual NOX::Abstract::Groupoperator= (const NOX::Epetra::Group &source)
 Assignment operator.
virtual Teuchos::RefCountPtr<
NOX::Abstract::Group
clone (NOX::CopyType type=NOX::DeepCopy) const
 Cloning function.
virtual NOX::Abstract::Group::ReturnType computeF ()
 Overloaded computeF().
virtual NOX::Abstract::Group::ReturnType computeJacobian ()
 Overloaded computeJacobian().
Implementation of LOCA::Abstract::TransposeSolveGroup methods.
virtual NOX::Abstract::Group::ReturnType applyJacobianTransposeInverse (Teuchos::ParameterList &params, const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const
 Solve Jacobian-tranpose system.
virtual NOX::Abstract::Group::ReturnType applyJacobianTransposeInverseMultiVector (Teuchos::ParameterList &params, const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const
 Solve Jacobian-tranpose system with multiple right-hand sides.
Implementation of LOCA::MultiContinuation::AbstractGroup virtual methods.
virtual void copy (const NOX::Abstract::Group &source)
 Copy.
virtual void setParams (const ParameterVector &p)
 Set the parameters.
virtual void setParam (int paramID, double val)
 Set parameter indexed by paramID.
virtual void setParam (string paramID, double val)
 Set parameter indexed by paramID.
const LOCA::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 paramID.
virtual double getParam (string paramID) const
 Return copy of parameter indexed by paramID.
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
 Call the user interface print() routine, solution vector.
virtual void printSolution (const NOX::Abstract::Vector &x, const double conParam) const
 Call the user interface print() routine, any vector.
virtual void scaleVector (NOX::Abstract::Vector &x) const
 Scales a vector using scaling vector.
Implementation of LOCA::Homotopy::AbstractGroup virtual methods.
virtual NOX::Abstract::Group::ReturnType augmentJacobianForHomotopy (double p)
 Replace Jacobian $J$ by $pJ+(1-p)I$ where $I$ is the identity matrix and $p$ is a scalar.
Implementation of LOCA::TimeDependent::AbstractGroup virtual methods.
virtual NOX::Abstract::Group::ReturnType computeShiftedMatrix (double alpha, double beta)
 Compute the shifted matrix.
virtual NOX::Abstract::Group::ReturnType applyShiftedMatrix (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const
 Multiply the shifted matrix by a vector.
virtual NOX::Abstract::Group::ReturnType applyShiftedMatrixMultiVector (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const
 Multiply the shifted matrix by a multi-vector.
virtual NOX::Abstract::Group::ReturnType applyShiftedMatrixInverseMultiVector (Teuchos::ParameterList &params, const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const
 Apply the inverse of the shifted matrix by a multi-vector, as needed by the shift-and-invert and generalized Cayley transformations.
Implementation of LOCA::Hopf::MooreSpence::AbstractGroup virtual methods.
virtual bool isComplex () const
 Is $J+i\omega B$ valid.
virtual NOX::Abstract::Group::ReturnType computeComplex (double frequency)
 Compute $J+i\omega B$.
virtual NOX::Abstract::Group::ReturnType applyComplex (const NOX::Abstract::Vector &input_real, const NOX::Abstract::Vector &input_imag, NOX::Abstract::Vector &result_real, NOX::Abstract::Vector &result_imag) const
 Compute $(J+i\omega B)(y+iz)$.
virtual NOX::Abstract::Group::ReturnType applyComplexMultiVector (const NOX::Abstract::MultiVector &input_real, const NOX::Abstract::MultiVector &input_imag, NOX::Abstract::MultiVector &result_real, NOX::Abstract::MultiVector &result_imag) const
 Compute $(J+i\omega B)(y+iz)$.
virtual NOX::Abstract::Group::ReturnType applyComplexInverseMultiVector (Teuchos::ParameterList &params, const NOX::Abstract::MultiVector &input_real, const NOX::Abstract::MultiVector &input_imag, NOX::Abstract::MultiVector &result_real, NOX::Abstract::MultiVector &result_imag) const
 Solve $(J+i\omega B)(y+iz) = a+ib$.

Protected Member Functions

virtual void resetIsValid ()
 resets the isValid flags to false

Protected Attributes

Teuchos::RefCountPtr< LOCA::GlobalDataglobalData
 Global data.
Teuchos::ParameterListprintParams
 Printing parameters.
LOCA::ParameterVector params
 Parameter vector.
Teuchos::RefCountPtr< LOCA::Epetra::Interface::RequireduserInterface
 Reference to the user supplied interface functions.
Teuchos::RefCountPtr< LOCA::Epetra::Interface::TimeDependentuserInterfaceTime
 Interface for shifted-matrix.
Teuchos::RefCountPtr< LOCA::Epetra::Interface::TimeDependentMatrixFreeuserInterfaceTimeMF
 Interface for matrix-free shifted-matrix.
Teuchos::RefCountPtr< NOX::SharedObject<
NOX::Epetra::LinearSystem,
LOCA::Epetra::Group > > 
shiftedSharedLinearSystem
 Shared shifted linear system.
bool isValidShiftedPrec
 Is preconditioner for shifted matrix valid.
double alpha_
 $\alpha$ for matrix-free shifted matrix
double beta_
 $\beta$ for matrix-free shifted matrix
Teuchos::RefCountPtr< Epetra_VectortmpVectorPtr2
 Extra vector needed for intermediate calculations of LOCA routines.
Teuchos::RefCountPtr< NOX::Abstract::VectorscaleVecPtr
 Stores a pointer to the scale vector.
Teuchos::RefCountPtr< LOCA::Epetra::TransposeLinearSystem::AbstractStrategytls_strategy
 Stores transpose linear solver strategy.
Teuchos::RefCountPtr< NOX::SharedObject<
NOX::Epetra::LinearSystem,
LOCA::Epetra::Group > > 
complexSharedLinearSystem
 Shared complex system.
Teuchos::RefCountPtr< EpetraExt::BlockCrsMatrix > complexMatrix
 Complex matrix.
Teuchos::RefCountPtr< EpetraExt::BlockVector > complexVec
 Complex vector.
bool isValidComplex
 Is complex matrix valid.
bool isValidComplexPrec
 Is complex matrix preconditioner valid.

Detailed Description

Extension of the NOX::Epetra::Group to LOCA.

This class extends the NOX::Epetra::Group to LOCA enabling continuation and bifurcation capabilities using Epetra. It is derived from the NOX::Epetra::Group (basic Epetra support), the LOCA::Abstract::Group (brings in all LOCA abstract base classes), and the LOCA::Abstract::TransposeSolveGroup (for applyJacobianTransposeInverse() methods). It stores a parameter vector for setting/retrieving parameter values and overloads the computeF() and computeJacobian() methods of the NOX::Epetra::Group parent class to set the entire contents of the parameter vector in the problem interface before calling the NOX::Epetra::Group computeF() and computeJacobian().

Since it is derived from the LOCA::Abstract::Group (which is in turn derived from all FiniteDifference groups), it uses the finite-difference implementations for all parameter derivatives and second derivatives. However this behavior can be modified by calling the setDerivUtils() method of the LOCA::MultiContinuation::FiniteDifferenceGroup parent class.

This class provides complete support for all continuation and bifurcation methods including shift-invert and Cayley methods for computing eigenvalues and Hopf bifurcations. However this support is only enabled by calling the appropriate constructor described below.


Constructor & Destructor Documentation

LOCA::Epetra::Group::Group const Teuchos::RefCountPtr< LOCA::GlobalData > &  global_data,
Teuchos::ParameterList printingParams,
const Teuchos::RefCountPtr< LOCA::Epetra::Interface::Required > &  i,
NOX::Epetra::Vector initialGuess,
const LOCA::ParameterVector p
 

Constructor with NO linear system (VERY LIMITED).

WARNING: If this constructor is used, then methods that require a Jacobian or preconditioning will not be available. You will be limited to simple algorithms like nonlinear-CG with no preconditioning.

LOCA::Epetra::Group::Group const Teuchos::RefCountPtr< LOCA::GlobalData > &  global_data,
Teuchos::ParameterList printingParams,
const Teuchos::RefCountPtr< LOCA::Epetra::Interface::Required > &  i,
NOX::Epetra::Vector initialGuess,
const Teuchos::RefCountPtr< NOX::Epetra::LinearSystem > &  linSys,
const LOCA::ParameterVector p
 

Standard Constructor enabling most LOCA support.

This is the most commonly used constructor and provides support for all LOCA algorithms except shift-invert and Cayley transformations and Hopf bifurcations.

LOCA::Epetra::Group::Group const Teuchos::RefCountPtr< LOCA::GlobalData > &  global_data,
Teuchos::ParameterList printingParams,
const Teuchos::RefCountPtr< LOCA::Epetra::Interface::TimeDependent > &  i,
NOX::Epetra::Vector initialGuess,
const Teuchos::RefCountPtr< NOX::Epetra::LinearSystem > &  linSys,
const Teuchos::RefCountPtr< NOX::Epetra::LinearSystem > &  shiftedLinSys,
const LOCA::ParameterVector p
 

Constructor with time-dependent interface and shifted linear system.

Use this constructor to enable shift-invert and Cayley transformations or Hopf bifurcations. It requires another interface to compute the shifted matrix $\alpha J + \beta M$ where $J$ is the Jacobian matrix and $M$ is the mass matrix, and a linear system object to solve this system. Setting linSys = shiftedLinSys is a valid option for passing the shifted solver, but this will cause the shifted matrix to overwrite the Jacobian possibly resulting in more matrix fills.

LOCA::Epetra::Group::Group const Teuchos::RefCountPtr< LOCA::GlobalData > &  global_data,
Teuchos::ParameterList printingParams,
const Teuchos::RefCountPtr< LOCA::Epetra::Interface::TimeDependentMatrixFree > &  i,
NOX::Epetra::Vector initialGuess,
const Teuchos::RefCountPtr< NOX::Epetra::LinearSystem > &  linSys,
const Teuchos::RefCountPtr< NOX::Epetra::LinearSystem > &  shiftedLinSys,
const LOCA::ParameterVector p
 

Constructor with time-dependent matrix-free interface and shifted linear system.

This constructor may also be used for shift-invert and Cayley transformations, but should be only be used for a matrix-free method for solving the shifted system.


Member Function Documentation

NOX::Abstract::Group::ReturnType LOCA::Epetra::Group::applyJacobianTransposeInverse Teuchos::ParameterList params,
const NOX::Abstract::Vector input,
NOX::Abstract::Vector result
const [virtual]
 

Solve Jacobian-tranpose system.

In addition to all regular linear solver parameters, this method references the following additional parameters:

  • "Transpose Solver Method" -- [string] (default: "Transpose Preconditioner") Method for preconditioning the transpose linear system (LOCA::Epetra::TransposeLinearSystem::Factory). Available choices are:
    • "Transpose Preconditioner" -- Use the transpose of the preconditioner for the original system.
    • "Left Preconditioning" -- Use the transpose of the preconditioner, and apply using left preconditioning.
    • "Explicit Transpose" -- Form the transpose of the matrix and compute the preconditioner. This method is available only if Trilinos is configured with EpetraExt support (--enable-epetraext).

Implements LOCA::Abstract::TransposeSolveGroup.

NOX::Abstract::Group::ReturnType LOCA::Epetra::Group::applyJacobianTransposeInverseMultiVector Teuchos::ParameterList params,
const NOX::Abstract::MultiVector input,
NOX::Abstract::MultiVector result
const [virtual]
 

Solve Jacobian-tranpose system with multiple right-hand sides.

In addition to all regular linear solver parameters, this method references the following additional parameters:

  • "Transpose Solver Method" -- [string] (default: "Transpose Preconditioner") Method for preconditioning the transpose linear system (LOCA::Epetra::TransposeLinearSystem::Factory). Available choices are:
    • "Transpose Preconditioner" -- Use the transpose of the preconditioner for the original system.
    • "Left Preconditioning" -- Use the transpose of the preconditioner, and apply using left preconditioning.
    • "Explicit Transpose" -- Form the transpose of the matrix and compute the preconditioner. This method is available only if Trilinos is configured with EpetraExt support (--enable-epetraext).

Implements LOCA::Abstract::TransposeSolveGroup.

NOX::Abstract::Group::ReturnType LOCA::Epetra::Group::computeComplex double  frequency  )  [virtual]
 

Compute $J+i\omega B$.

The argument frequency stores $\omega$.

Reimplemented from LOCA::Abstract::Group.

NOX::Abstract::Group::ReturnType LOCA::Epetra::Group::computeF  )  [virtual]
 

Overloaded computeF().

Calls LOCA::Epetra::Interface::setParams before evalulating F.

Reimplemented from NOX::Epetra::Group.

NOX::Abstract::Group::ReturnType LOCA::Epetra::Group::computeJacobian  )  [virtual]
 

Overloaded computeJacobian().

Calls LOCA::Epetra::Interface::setParams before evalulating J.

Reimplemented from NOX::Epetra::Group.

double LOCA::Epetra::Group::computeScaledDotProduct const NOX::Abstract::Vector a,
const NOX::Abstract::Vector b
const [virtual]
 

Compute a scaled dot product.

The implementation here uses the scaling vector $s$ if one is supplied:

\[ \sum_{i=1}^n a_i*b_i*s_i*s_i. \]

If the scaling vector is not provided, the standard dot product is used.

Reimplemented from LOCA::MultiContinuation::AbstractGroup.

void LOCA::Epetra::Group::projectToDraw const NOX::Abstract::Vector x,
double *  px
const [virtual]
 

Projects solution to a few scalars for multiparameter continuation.

This method is called every time a solution is saved by the multiparameter continuation code MF for later visualization and should project the solution vector down to a few scalars. The array px will be preallocated to the proper length given by projectToDrawDimension().

The implementation here is to call the corresponding method in the interface.

Reimplemented from LOCA::MultiContinuation::AbstractGroup.

int LOCA::Epetra::Group::projectToDrawDimension  )  const [virtual]
 

Returns the dimension of the project to draw array.

The implementation here is to call the corresponding method in the interface.

Reimplemented from LOCA::MultiContinuation::AbstractGroup.

void LOCA::Epetra::Group::scaleVector NOX::Abstract::Vector x  )  const [virtual]
 

Scales a vector using scaling vector.

The implementation here uses the scaling vector $s$ if one is supplied:

\[ x_i = a_i*s_i. \]

If the scaling vector is not provided, the vector is rescaled by the square root of its length.

Reimplemented from LOCA::MultiContinuation::AbstractGroup.


Member Data Documentation

Teuchos::RefCountPtr<Epetra_Vector> LOCA::Epetra::Group::tmpVectorPtr2 [protected]
 

Extra vector needed for intermediate calculations of LOCA routines.

NOTE: there already is a tmpVectorPtr in the NOX::Epetra::Group. This is a second temporary vector if that one extra isn't enough.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:38:31 2008 for NOX by doxygen 1.3.9.1