NOX Development
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
LOCA::MultiContinuation::FiniteDifferenceGroup Class Reference

Concrete class that provides a concrete implementation of the computeDfDp() method of the LOCA::Continuation::AbstractGroup using first-order finite differencing. More...

#include <LOCA_MultiContinuation_FiniteDifferenceGroup.H>

Inheritance diagram for LOCA::MultiContinuation::FiniteDifferenceGroup:
Inheritance graph
[legend]
Collaboration diagram for LOCA::MultiContinuation::FiniteDifferenceGroup:
Collaboration graph
[legend]

Public Member Functions

 FiniteDifferenceGroup ()
 Constructor.
 
 FiniteDifferenceGroup (const FiniteDifferenceGroup &source, NOX::CopyType type=NOX::DeepCopy)
 Copy constructor.
 
virtual ~FiniteDifferenceGroup ()
 Destructor.
 
virtual void copy (const NOX::Abstract::Group &source)
 Copy.
 
virtual NOX::Abstract::Groupoperator= (const NOX::Abstract::Group &source)
 Assignment.
 
virtual void setDerivUtils (const Teuchos::RCP< LOCA::DerivUtils > &deriv)
 Set the LOCA::DerivUtils object.
 
virtual NOX::Abstract::Group::ReturnType computeDfDpMulti (const std::vector< int > &paramIDs, NOX::Abstract::MultiVector &dfdp, bool isValidF)
 
- Public Member Functions inherited from LOCA::MultiContinuation::AbstractGroup
 AbstractGroup ()
 Default constructor.
 
virtual ~AbstractGroup ()
 Destructor.
 
virtual void setParamsMulti (const std::vector< int > &paramIDs, 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::ParameterVectorgetParams () 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 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) 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.
 
- Public Member Functions inherited from NOX::Abstract::Group
 Group ()
 Constructor.
 
virtual ~Group ()
 Destructor.
 
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 &params)
 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 &params, 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 &params, 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 &params, 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 &params, 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::VectorgetX () const =0
 Return solution vector.
 
virtual const NOX::Abstract::VectorgetScaledX () const
 
virtual const NOX::Abstract::VectorgetF () const =0
 Return F(x)
 
virtual double getNormF () const =0
 Return 2-norm of F(x).
 
virtual const NOX::Abstract::VectorgetGradient () const =0
 Return gradient.
 
virtual const NOX::Abstract::VectorgetNewton () const =0
 Return Newton direction.
 
virtual Teuchos::RCP< const NOX::Abstract::VectorgetXPtr () const =0
 Return RCP to solution vector.
 
virtual Teuchos::RCP< const NOX::Abstract::VectorgetFPtr () const =0
 Return RCP to F(x)
 
virtual Teuchos::RCP< const NOX::Abstract::VectorgetGradientPtr () const =0
 Return RCP to gradient.
 
virtual Teuchos::RCP< const NOX::Abstract::VectorgetNewtonPtr () 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::Groupclone (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.
 

Protected Attributes

Teuchos::RCP< DerivUtilsderivPtr
 Pointer to current DerivUtils derivative computation object.
 

Additional Inherited Members

- Public Types inherited from NOX::Abstract::Group
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...
 

Detailed Description

Concrete class that provides a concrete implementation of the computeDfDp() method of the LOCA::Continuation::AbstractGroup using first-order finite differencing.

The finite-differencing calculations are actually implemented by the LOCA::DerivUtils class, and a custom DerivUtils object can be set by the setDerivUtils() method. However, in the future the calculations encapsulated in the DerivUtils class may be incorporated directly into this class and other finite-differencing child classes.

Constructor & Destructor Documentation

◆ ~FiniteDifferenceGroup()

LOCA::MultiContinuation::FiniteDifferenceGroup::~FiniteDifferenceGroup ( )
virtual

Member Function Documentation

◆ computeDfDpMulti()

NOX::Abstract::Group::ReturnType LOCA::MultiContinuation::FiniteDifferenceGroup::computeDfDpMulti ( const std::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.

The calculation is implemented by calling the corresponding LOCA::DerivUtils::computeDfDp() method of the passed LOCA::DerivUtils object.

Implements LOCA::MultiContinuation::AbstractGroup.

Reimplemented in LOCA::Thyra::Group, and LOCA::MultiContinuation::ConstrainedGroup.

◆ copy()

void LOCA::MultiContinuation::FiniteDifferenceGroup::copy ( const NOX::Abstract::Group & source)
virtual

◆ operator=()

NOX::Abstract::Group & LOCA::MultiContinuation::FiniteDifferenceGroup::operator= ( const NOX::Abstract::Group & source)
virtual

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