NOX
Development
|
Public Member Functions | |
ExtendedGroup (const Teuchos::RCP< LOCA::GlobalData > gD, const Teuchos::RCP< Teuchos::ParameterList > &bifurcationparams_, const Teuchos::RCP< LOCA::PhaseTransition::AbstractGroup > &grp_) | |
Constructor. | |
ExtendedGroup (const LOCA::PhaseTransition::ExtendedGroup &source, NOX::CopyType type=NOX::DeepCopy) | |
Copy constructor. | |
~ExtendedGroup () | |
Destructor. | |
NOX::Abstract::Group & | operator= (const NOX::Abstract::Group &source) |
Copies the source group into this group. More... | |
NOX::Abstract::Group & | operator= (const LOCA::PhaseTransition::ExtendedGroup &source) |
See above. | |
virtual Teuchos::RCP < NOX::Abstract::Group > | clone (NOX::CopyType type=NOX::DeepCopy) const |
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. More... | |
void | print () const |
Print out the group. | |
virtual Teuchos::RCP< const LOCA::MultiContinuation::AbstractGroup > | getUnderlyingGroup () const |
Return underlying group. | |
virtual Teuchos::RCP < LOCA::MultiContinuation::AbstractGroup > | getUnderlyingGroup () |
Return underlying group. | |
virtual void | setParamsMulti (const std::vector< int > ¶mIDs, const NOX::Abstract::MultiVector::DenseMatrix &vals) |
Set parameters indexed by (integer) paramIDs. | |
virtual NOX::Abstract::Group::ReturnType | computeDfDpMulti (const std::vector< int > ¶mIDs, NOX::Abstract::MultiVector &dfdp, bool isValid_F) |
"Compute" functions. | |
void | setX (const NOX::Abstract::Vector &y) |
Set the solution vector x to y. More... | |
void | setX (const LOCA::PhaseTransition::ExtendedVector &y) |
See above. | |
void | computeX (const NOX::Abstract::Group &grp, const NOX::Abstract::Vector &d, double step) |
Compute x = grp.x + step * d. More... | |
void | computeX (const LOCA::PhaseTransition::ExtendedGroup &grp, const LOCA::PhaseTransition::ExtendedVector &d, double step) |
See above. | |
NOX::Abstract::Group::ReturnType | computeF () |
Compute and store F(x). More... | |
NOX::Abstract::Group::ReturnType | computeJacobian () |
Compute and store Jacobian. More... | |
NOX::Abstract::Group::ReturnType | computeNewton (Teuchos::ParameterList ¶ms) |
Compute the Newton direction, using parameters for the linear solve. More... | |
Jacobian operations. | |
Operations using the Jacobian matrix. These may not be defined in matrix-free scenarios. | |
NOX::Abstract::Group::ReturnType | applyJacobian (const LOCA::PhaseTransition::ExtendedVector &input, LOCA::PhaseTransition::ExtendedVector &result) const |
NOX::Abstract::Group::ReturnType | applyJacobian (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const |
See above. | |
NOX::Abstract::Group::ReturnType | applyJacobianInverse (Teuchos::ParameterList ¶ms, const LOCA::PhaseTransition::ExtendedVector &input, LOCA::PhaseTransition::ExtendedVector &result) const |
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. More... | |
"Is" functions | |
Checks to see if various objects have been computed. Returns true if the corresponding "compute" function has been called since the last update to the solution vector (via instantiation or computeX). | |
bool | isF () const |
Return true if F is valid. | |
bool | isJacobian () const |
Return true if the Jacobian is valid. More... | |
bool | isNewton () const |
Return true if the Newton direction is valid. More... | |
"Get" functions | |
Note that these function do not check whether or not the vectors are valid. Must use the "Is" functions for that purpose. | |
const NOX::Abstract::Vector & | getX () const |
Return solution vector. | |
const NOX::Abstract::Vector & | getF () const |
Return F(x) | |
double | getNormF () const |
Return 2-norm of F(x). More... | |
const NOX::Abstract::Vector & | getNewton () const |
Return Newton direction. | |
const NOX::Abstract::Vector & | getGradient () const |
Return gradient. | |
Teuchos::RCP< const NOX::Abstract::Vector > | getXPtr () const |
Return RCP to solution vector. | |
Teuchos::RCP< const NOX::Abstract::Vector > | getFPtr () const |
Return RCP to F(x) | |
Teuchos::RCP< const NOX::Abstract::Vector > | getNewtonPtr () const |
Return RCP to Newton direction. | |
Teuchos::RCP< const NOX::Abstract::Vector > | getGradientPtr () const |
Return RCP to gradient. | |
void | copy (const NOX::Abstract::Group &source) |
Start methods for LOCA::Abstract::Group. | |
void | setParams (const LOCA::ParameterVector &p) |
Set the parameter vector in the group to p (pVector = p). | |
void | setParam (int paramID, double val) |
Set parameter indexed by (integer) paramID. | |
void | setParam (std::string paramID, double val) |
Set parameter indexed by (std::string) paramID. | |
const LOCA::ParameterVector & | getParams () const |
Return a const reference to the ParameterVector owned by the group. | |
double | getParam (int paramID) const |
Return copy of parameter indexed by (integer) paramID. | |
double | getParam (std::string paramID) const |
Return copy of parameter indexed by (std::string) paramID. | |
void | printSolution (const NOX::Abstract::Vector &solution, const double param) const |
Set parameter indexed by (std::string) paramID. | |
void | printSolution (const double param) const |
Function to print out solution and parameter after successful step. More... | |
Public Member Functions inherited from LOCA::Extended::MultiAbstractGroup | |
MultiAbstractGroup () | |
Default constructor. | |
virtual | ~MultiAbstractGroup () |
Destructor. | |
virtual Teuchos::RCP < NOX::Abstract::Group > | getNestedGroup () |
Override from NOX::Abstract::Group base class. Calls getUnderlyingGroup() from this class. | |
virtual Teuchos::RCP< const NOX::Abstract::Group > | getNestedGroup () const |
Override from NOX::Abstract::Group base class. Calls getUnderlyingGroup() from this class. | |
virtual Teuchos::RCP< const LOCA::MultiContinuation::AbstractGroup > | getBaseLevelUnderlyingGroup () const |
Return base-level underlying group. More... | |
virtual Teuchos::RCP < LOCA::MultiContinuation::AbstractGroup > | getBaseLevelUnderlyingGroup () |
Return base-level underlying group. More... | |
Public Member Functions inherited from NOX::Abstract::Group | |
Group () | |
Constructor. More... | |
virtual | ~Group () |
Destructor. | |
virtual NOX::Abstract::Group::ReturnType | computeGradient () |
Compute and store gradient. More... | |
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. More... | |
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. More... | |
virtual NOX::Abstract::Group::ReturnType | applyJacobianMultiVector (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const |
applyJacobian for multiple right-hand sides More... | |
virtual NOX::Abstract::Group::ReturnType | applyJacobianTransposeMultiVector (const NOX::Abstract::MultiVector &input, NOX::Abstract::MultiVector &result) const |
applyJacobianTranspose for multiple right-hand sides More... | |
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 More... | |
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 More... | |
virtual bool | isGradient () const |
Return true if the gradient is valid. More... | |
virtual const NOX::Abstract::Vector & | getScaledX () const |
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(). More... | |
Public Member Functions inherited from LOCA::MultiContinuation::AbstractGroup | |
AbstractGroup () | |
Default constructor. | |
virtual | ~AbstractGroup () |
Destructor. | |
virtual void | preProcessContinuationStep (LOCA::Abstract::Iterator::StepStatus stepStatus) |
Perform any preprocessing before a continuation step starts. More... | |
virtual void | postProcessContinuationStep (LOCA::Abstract::Iterator::StepStatus stepStatus) |
Perform any postprocessing after a continuation step finishes. More... | |
virtual void | projectToDraw (const NOX::Abstract::Vector &x, double *px) const |
Projects solution to a few scalars for multiparameter continuation. More... | |
virtual int | projectToDrawDimension () const |
Returns the dimension of the project to draw array. More... | |
virtual double | computeScaledDotProduct (const NOX::Abstract::Vector &a, const NOX::Abstract::Vector &b) const |
Compute a scaled dot product. More... | |
virtual void | scaleVector (NOX::Abstract::Vector &x) const |
Scales a vector using scaling vector. More... | |
Protected Member Functions | |
void | resetIsValid () |
resets the isValid flags to false | |
Protected Attributes | |
Teuchos::RCP < LOCA::PhaseTransition::AbstractGroup > | grp |
Solution vector. | |
double | normF |
const Teuchos::RCP < LOCA::GlobalData > | globalData |
int | bifParamID |
Vectors | |
Teuchos::RCP < LOCA::PhaseTransition::ExtendedVector > | xVector |
Solution vector. | |
Teuchos::RCP < LOCA::PhaseTransition::ExtendedVector > | fVector |
Right-hand-side vector (function evaluation). | |
Teuchos::RCP < LOCA::PhaseTransition::ExtendedVector > | newtonVector |
Newton direction vector. | |
IsValid flags | |
True if the current solution is up-to-date with respect to the currect xVector. | |
bool | isValidF |
bool | isValidJacobian |
bool | isValidNewton |
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... | |
|
virtual |
Applies the inverse of the Jacobian matrix to the given input vector and puts the answer in result.
Computes
where is the Jacobian, is the input vector, and is the result vector.
The "Tolerance" parameter specifies that the solution should be such that
params
The parameter "Tolerance" may be added/modified in the list of parameters - this is the ideal solution tolerance for an iterative linear solve.
Reimplemented from NOX::Abstract::Group.
|
virtual |
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.
If type is NOX::DeepCopy, then we need to create an exact replica of "this". Otherwise, if type is NOX::ShapeCopy, we need only replicate the shape of "this" (only the memory is allocated, the values are not copied into the vectors and Jacobian). Returns NULL if clone is not supported.
Implements NOX::Abstract::Group.
References Teuchos::rcp().
|
virtual |
Compute for each parameter indexed by paramIDs. The first column of dfdp holds F, which is valid if isValidF is true. Otherwise F must be computed.
Implements LOCA::MultiContinuation::AbstractGroup.
References NOX::Abstract::Group::BadDependency.
|
virtual |
Compute and store F(x).
Implements NOX::Abstract::Group.
References NOX::Abstract::Group::Ok.
|
virtual |
Compute and store Jacobian.
Recall that
The Jacobian is denoted by and defined by
Reimplemented from NOX::Abstract::Group.
References NOX::Abstract::Group::Ok.
|
virtual |
Compute the Newton direction, using parameters for the linear solve.
The Newton direction is the solution, s, of
The parameters are from the "Linear %Solver" sublist of the "Direction" sublist that is passed to solver during construction.
The "Tolerance" parameter may be added/modified in the sublist of "Linear Solver" parameters that is passed into this function. The solution should be such that
params
Reimplemented from NOX::Abstract::Group.
References NOX::Abstract::Group::Ok.
|
virtual |
Compute x = grp.x + step * d.
Let denote this group's solution vector. Let denote the result of grp.getX(). Then set
Implements NOX::Abstract::Group.
|
virtual |
|
virtual |
Return true if the Jacobian is valid.
Reimplemented from NOX::Abstract::Group.
|
virtual |
Return true if the Newton direction is valid.
Reimplemented from NOX::Abstract::Group.
|
virtual |
Copies the source group into this group.
Implements NOX::Abstract::Group.
|
virtual |
Function to print out solution and parameter after successful step.
Empty default definition.
Reimplemented from LOCA::MultiContinuation::AbstractGroup.
|
virtual |
Set the solution vector x to y.
Implements NOX::Abstract::Group.