NOX Development
|
LOCA abstract interface for continuation, derived from the NOX::Abstract::Group. This abstract class provides the interface necessary to perform continuation, i.e., compute families of solutions to
#include <LOCA_MultiContinuation_AbstractGroup.H>
Public Member Functions | |
AbstractGroup () | |
Default constructor. | |
virtual | ~AbstractGroup () |
Destructor. | |
Pure virtual methods | |
These methods must be defined by any concrete implementation | |
virtual void | copy (const NOX::Abstract::Group &source)=0 |
Copy the group (replaces operator = ) | |
virtual void | setParamsMulti (const std::vector< int > ¶mIDs, const NOX::Abstract::MultiVector::DenseMatrix &vals)=0 |
Set parameters indexed by (integer) paramIDs. | |
virtual void | setParams (const LOCA::ParameterVector &p)=0 |
Set the parameter vector in the group to p (pVector = p). | |
virtual void | setParam (int paramID, double val)=0 |
Set parameter indexed by (integer) paramID. | |
virtual void | setParam (std::string paramID, double val)=0 |
Set parameter indexed by (std::string) paramID. | |
virtual const LOCA::ParameterVector & | getParams () const =0 |
Return a const reference to the ParameterVector owned by the group. | |
virtual double | getParam (int paramID) const =0 |
Return copy of parameter indexed by (integer) paramID. | |
virtual double | getParam (std::string paramID) const =0 |
Return copy of parameter indexed by (std::string) paramID. | |
virtual NOX::Abstract::Group::ReturnType | computeDfDpMulti (const std::vector< int > ¶mIDs, NOX::Abstract::MultiVector &dfdp, bool isValidF)=0 |
Virtual methods with default implementations | |
These methods should be overloaded in a concrete implementation if more appropriate/efficient approaches are available. | |
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 methods with empty or trivial implementations | |
These methods should be overloaded in a concrete implementation but their implementation is not critical to the rest of LOCA and therefore have empty or trivial implementations. | |
virtual void | printSolution (const double) const |
Function to print out solution and parameter after successful step. | |
virtual void | printSolution (const NOX::Abstract::Vector &, const double) 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. | |
![]() | |
Group () | |
Constructor. | |
virtual | ~Group () |
Destructor. | |
virtual NOX::Abstract::Group & | operator= (const NOX::Abstract::Group &source)=0 |
Copies the source group into this group. | |
virtual void | setX (const NOX::Abstract::Vector &y)=0 |
Set the solution vector x to y. | |
virtual void | computeX (const NOX::Abstract::Group &grp, const NOX::Abstract::Vector &d, double step)=0 |
Compute x = grp.x + step * d. | |
virtual NOX::Abstract::Group::ReturnType | computeF ()=0 |
Compute and store F(x). | |
virtual NOX::Abstract::Group::ReturnType | computeJacobian () |
Compute and store Jacobian. | |
virtual NOX::Abstract::Group::ReturnType | computeGradient () |
Compute and store gradient. | |
virtual NOX::Abstract::Group::ReturnType | computeNewton (Teuchos::ParameterList ¶ms) |
Compute the Newton direction, using parameters for the linear solve. | |
virtual NOX::Abstract::Group::ReturnType | applyJacobian (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const |
Applies Jacobian to the given input vector and puts the answer in the result. | |
virtual NOX::Abstract::Group::ReturnType | applyJacobianTranspose (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const |
Applies Jacobian-Transpose to the given input vector and puts the answer in the result. | |
virtual NOX::Abstract::Group::ReturnType | applyJacobianInverse (Teuchos::ParameterList ¶ms, const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const |
Applies the inverse of the Jacobian matrix to the given input vector and puts the answer in result. | |
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 | applyJacobianMultiVector (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const |
applyJacobian for multiple right-hand sides | |
virtual NOX::Abstract::Group::ReturnType | applyJacobianTransposeMultiVector (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const |
applyJacobianTranspose for multiple right-hand sides | |
virtual NOX::Abstract::Group::ReturnType | applyJacobianInverseMultiVector (Teuchos::ParameterList ¶ms, const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const |
applyJacobianInverse for multiple right-hand sides | |
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 bool | isF () const =0 |
Return true if F is valid. | |
virtual bool | isJacobian () const |
Return true if the Jacobian is valid. | |
virtual bool | isGradient () const |
Return true if the gradient is valid. | |
virtual bool | isNewton () const |
Return true if the Newton direction is valid. | |
virtual const NOX::Abstract::Vector & | getX () const =0 |
Return solution vector. | |
virtual const NOX::Abstract::Vector & | getScaledX () const |
virtual const NOX::Abstract::Vector & | getF () const =0 |
Return F(x) | |
virtual double | getNormF () const =0 |
Return 2-norm of F(x). | |
virtual const NOX::Abstract::Vector & | getGradient () const =0 |
Return gradient. | |
virtual const NOX::Abstract::Vector & | getNewton () const =0 |
Return Newton direction. | |
virtual Teuchos::RCP< const NOX::Abstract::Vector > | getXPtr () const =0 |
Return RCP to solution vector. | |
virtual Teuchos::RCP< const NOX::Abstract::Vector > | getFPtr () const =0 |
Return RCP to F(x) | |
virtual Teuchos::RCP< const NOX::Abstract::Vector > | getGradientPtr () const =0 |
Return RCP to gradient. | |
virtual Teuchos::RCP< const NOX::Abstract::Vector > | getNewtonPtr () const =0 |
Return RCP to Newton direction. | |
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(). | |
virtual Teuchos::RCP< NOX::Abstract::Group > | clone (NOX::CopyType type=NOX::DeepCopy) const =0 |
Create a new Group of the same derived type as this one by cloning this one, and return a ref count pointer to the new 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... | |
LOCA abstract interface for continuation, derived from the NOX::Abstract::Group. This abstract class provides the interface necessary to perform continuation, i.e., compute families of solutions to
Concrete implemenations of this interface must provide implementations of all of the methods in the NOX::Abstract::Group interface as well as the additional interface defined here.
|
inlinevirtual |
Destructor.
Reimplemented in LOCA::Homotopy::AbstractGroup, LOCA::Hopf::MinimallyAugmented::AbstractGroup, LOCA::Hopf::MooreSpence::AbstractGroup, LOCA::PhaseTransition::AbstractGroup, LOCA::Pitchfork::MinimallyAugmented::AbstractGroup, LOCA::Pitchfork::MooreSpence::AbstractGroup, LOCA::TimeDependent::AbstractGroup, LOCA::TurningPoint::MinimallyAugmented::AbstractGroup, and LOCA::TurningPoint::MooreSpence::AbstractGroup.
|
pure virtual |
Compute
Implemented in LOCA::PhaseTransition::ExtendedGroup, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Homotopy::Group, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::MultiContinuation::FiniteDifferenceGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, and LOCA::TurningPoint::MooreSpence::ExtendedGroup.
Referenced by LOCA::Thyra::Group::computeDfDpMulti().
|
virtual |
Compute a scaled dot product.
The default implementation here just computes a.dot(b) but should be overloaded for any problem that his difficult scaling.
Reimplemented in LOCA::Epetra::Group, LOCA::LAPACK::Group, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, and LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup.
References NOX::Abstract::Vector::innerProduct().
|
pure virtual |
Copy the group (replaces operator = )
Implemented in LOCA::Epetra::Group, LOCA::LAPACK::Group, LOCA::Thyra::Group, LOCA::Abstract::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Homotopy::Group, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::MultiContinuation::FiniteDifferenceGroup, LOCA::PhaseTransition::ExtendedGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, and LOCA::TurningPoint::MooreSpence::ExtendedGroup.
|
pure virtual |
Return copy of parameter indexed by (integer) paramID.
Implemented in LOCA::Epetra::Group, LOCA::LAPACK::Group, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Homotopy::Group, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::PhaseTransition::ExtendedGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, and LOCA::TurningPoint::MooreSpence::ExtendedGroup.
Referenced by LOCA::DerivUtils::perturbParam().
|
pure virtual |
Return copy of parameter indexed by (std::string) paramID.
Implemented in LOCA::Epetra::Group, LOCA::LAPACK::Group, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Homotopy::Group, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::PhaseTransition::ExtendedGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, and LOCA::TurningPoint::MooreSpence::ExtendedGroup.
|
pure virtual |
Return a const reference to the ParameterVector owned by the group.
Implemented in LOCA::Epetra::Group, LOCA::LAPACK::Group, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Homotopy::Group, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::PhaseTransition::ExtendedGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, and LOCA::TurningPoint::MooreSpence::ExtendedGroup.
|
virtual |
Perform any postprocessing after a continuation step finishes.
The stepStatus
argument indicates whether the step was successful. The default implementation to empty.
Reimplemented in LOCA::Epetra::Group, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Homotopy::Group, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, and LOCA::TurningPoint::MooreSpence::ExtendedGroup.
|
virtual |
Perform any preprocessing before a continuation step starts.
The stepStatus
argument indicates whether the previous step was successful. The default implementation to empty.
Reimplemented in LOCA::Epetra::Group, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Homotopy::Group, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, and LOCA::TurningPoint::MooreSpence::ExtendedGroup.
|
inlinevirtual |
Function to print out solution and parameter after successful step.
Empty default definition.
Reimplemented in LOCA::Epetra::Group, LOCA::LAPACK::Group, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Homotopy::Group, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, LOCA::TurningPoint::MooreSpence::ExtendedGroup, and LOCA::PhaseTransition::ExtendedGroup.
|
inlinevirtual |
Function to print out a vector and parameter after successful step.
Empty default definition.
Reimplemented in LOCA::PhaseTransition::ExtendedGroup, LOCA::Epetra::Group, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::LAPACK::Group, LOCA::Homotopy::Group, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, and LOCA::TurningPoint::MooreSpence::ExtendedGroup.
|
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 default implementation is the max norm of the vector.
Reimplemented in LOCA::Epetra::Group, LOCA::LAPACK::Group, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Homotopy::Group, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, and LOCA::TurningPoint::MooreSpence::ExtendedGroup.
References NOX::Abstract::Vector::MaxNorm, and NOX::Abstract::Vector::norm().
|
virtual |
Returns the dimension of the project to draw array.
The default implementation is to return 1 since the default projection is the max norm of the vector (a scalar).
Reimplemented in LOCA::Epetra::Group, LOCA::LAPACK::Group, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Homotopy::Group, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, and LOCA::TurningPoint::MooreSpence::ExtendedGroup.
|
virtual |
Scales a vector using scaling vector.
The default definition here is to do nothing, i.e., no scaling
Reimplemented in LOCA::Epetra::Group, LOCA::LAPACK::Group, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, and LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup.
|
pure virtual |
Set parameter indexed by (integer) paramID.
Implemented in LOCA::Epetra::Group, LOCA::LAPACK::Group, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Homotopy::Group, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::PhaseTransition::ExtendedGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, and LOCA::TurningPoint::MooreSpence::ExtendedGroup.
Referenced by LOCA::DerivUtils::computeDCeDp(), LOCA::DerivUtils::computeDfDp(), LOCA::DerivUtils::computeDJnDp(), LOCA::DerivUtils::computeDwtCeDp(), LOCA::DerivUtils::computeDwtJDp(), LOCA::DerivUtils::computeDwtJnDp(), and LOCA::DerivUtils::perturbParam().
|
pure virtual |
Set parameter indexed by (std::string) paramID.
Implemented in LOCA::Epetra::Group, LOCA::LAPACK::Group, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Homotopy::Group, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::PhaseTransition::ExtendedGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, and LOCA::TurningPoint::MooreSpence::ExtendedGroup.
|
pure virtual |
Set the parameter vector in the group to p (pVector = p).
Implemented in LOCA::LAPACK::Group, LOCA::PhaseTransition::ExtendedGroup, LOCA::Epetra::Group, LOCA::Thyra::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Homotopy::Group, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, and LOCA::TurningPoint::MooreSpence::ExtendedGroup.
|
pure virtual |
Set parameters indexed by (integer) paramIDs.
Implemented in LOCA::Abstract::Group, LOCA::Homotopy::DeflatedGroup, LOCA::Homotopy::Group, LOCA::Hopf::MinimallyAugmented::ExtendedGroup, LOCA::Hopf::MooreSpence::ExtendedGroup, LOCA::MultiContinuation::ConstrainedGroup, LOCA::PhaseTransition::ExtendedGroup, LOCA::Pitchfork::MinimallyAugmented::ExtendedGroup, LOCA::Pitchfork::MooreSpence::ExtendedGroup, LOCA::TurningPoint::MinimallyAugmented::ExtendedGroup, and LOCA::TurningPoint::MooreSpence::ExtendedGroup.