Public Member Functions | |
Group (const Playa::Vector< double > &initcond, const Playa::NonlinearOperator< double > &nonlinOp, const Playa::LinearSolver< double > &solver) | |
Constructor. | |
Group (const Playa::NonlinearOperator< double > &nonlinOp, const Playa::LinearSolver< double > &solver) | |
Constructor. | |
Group (const Playa::Vector< double > &initcond, const Playa::NonlinearOperator< double > &nonlinOp, const Playa::LinearSolver< double > &solver, int numdigits) | |
Constructor. | |
Group (const Playa::NonlinearOperator< double > &nonlinOp, const Playa::LinearSolver< double > &solver, int numdigits) | |
Constructor. | |
Group (const NOX::NOXPlaya::Group &source, NOX::CopyType type=DeepCopy) | |
Copy constructor. | |
~Group () | |
Destructor. | |
NOX::Abstract::Group & | operator= (const NOX::Abstract::Group &source) |
NOX::Abstract::Group & | operator= (const NOX::NOXPlaya::Group &source) |
See above. | |
virtual RCP< NOX::Abstract::Group > | clone (NOX::CopyType type=NOX::DeepCopy) const |
void | print () const |
Print out the group. | |
"Compute" functions. | |
void | setX (const NOX::Abstract::Vector &y) |
void | setX (const NOX::NOXPlaya::Vector &y) |
See above. | |
void | computeX (const NOX::Abstract::Group &grp, const NOX::Abstract::Vector &d, double step) |
void | computeX (const NOX::NOXPlaya::Group &grp, const NOX::NOXPlaya::Vector &d, double step) |
See above. | |
NOX::Abstract::Group::ReturnType | computeF () |
NOX::Abstract::Group::ReturnType | computeJacobian () |
NOX::Abstract::Group::ReturnType | computeGradient () |
NOX::Abstract::Group::ReturnType | computeNewton (Teuchos::ParameterList ¶ms) |
Jacobian operations. | |
Operations using the Jacobian matrix. These may not be defined in matrix-free scenarios. | |
NOX::Abstract::Group::ReturnType | applyJacobian (const NOX::NOXPlaya::Vector &input, NOX::NOXPlaya::Vector &result) const |
NOX::Abstract::Group::ReturnType | applyJacobian (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const |
See above. | |
NOX::Abstract::Group::ReturnType | applyJacobianTranspose (const NOX::NOXPlaya::Vector &input, NOX::NOXPlaya::Vector &result) const |
NOX::Abstract::Group::ReturnType | applyJacobianTranspose (const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const |
See above. | |
NOX::Abstract::Group::ReturnType | applyJacobianInverse (Teuchos::ParameterList ¶ms, const NOX::NOXPlaya::Vector &input, NOX::NOXPlaya::Vector &result) const |
NOX::Abstract::Group::ReturnType | applyJacobianInverse (Teuchos::ParameterList ¶ms, const NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const |
"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 |
bool | isJacobian () const |
bool | isGradient () const |
bool | isNewton () const |
"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 |
const NOX::Abstract::Vector & | getF () const |
double | getNormF () const |
const NOX::Abstract::Vector & | getGradient () const |
const NOX::Abstract::Vector & | getNewton () const |
virtual Teuchos::RCP< const NOX::Abstract::Vector > | getXPtr () const |
Return RCP to solution vector. | |
virtual Teuchos::RCP< const NOX::Abstract::Vector > | getFPtr () const |
Return RCP to F(x). | |
virtual Teuchos::RCP< const NOX::Abstract::Vector > | getGradientPtr () const |
Return RCP to gradient. | |
virtual Teuchos::RCP< const NOX::Abstract::Vector > | getNewtonPtr () const |
Return RCP to Newton direction. | |
Protected Member Functions | |
void | resetIsValid () |
resets all isValid flags to false | |
Protected Attributes | |
int | precision |
user-specified precision | |
Playa::LinearSolver< double > | solver |
Linear solver that will be used to solve J*step = resid. | |
Playa::LinearOperator< double > | jacobian |
Linear solver that will be used to solve J*step = resid. | |
Playa::NonlinearOperator< double > | nonlinearOp |
Problem interface: reference to nonlinear operator passed to group. | |
double | normF |
Norm of F. | |
Vectors | |
RCP< NOX::NOXPlaya::Vector > | xVector |
Solution vector. | |
RCP< NOX::NOXPlaya::Vector > | fVector |
Right-hand-side vector (function evaluation). | |
RCP< NOX::NOXPlaya::Vector > | newtonVector |
Newton direction vector. | |
RCP< NOX::NOXPlaya::Vector > | gradientVector |
Gradient vector (steepest descent vector). | |
IsValid flags | |
True if the current solution is up-to-date with respect to the currect xVector. | |
bool | isValidF |
bool | isValidJacobian |
bool | isValidGradient |
bool | isValidNewton |
Definition at line 38 of file NOX_Playa_Group.hpp.
NOX::NOXPlaya::Group::Group | ( | const Playa::Vector< double > & | initcond, | |
const Playa::NonlinearOperator< double > & | nonlinOp, | |||
const Playa::LinearSolver< double > & | solver | |||
) |
Constructor.
Construct a group given an initial condition, the nonlinear operator that describes the problem to be solved, and the linear solver
Definition at line 19 of file NOX_Playa_Group.cpp.
References nonlinearOp, resetIsValid(), Playa::NonlinearOperator< Scalar >::setEvalPt(), and xVector.
NOX::NOXPlaya::Group::Group | ( | const Playa::NonlinearOperator< double > & | nonlinOp, | |
const Playa::LinearSolver< double > & | solver | |||
) |
Constructor.
Construct a group given an initial condition and the nonlinear operator that describes the problem to be solved.
Definition at line 37 of file NOX_Playa_Group.cpp.
References nonlinearOp, resetIsValid(), Playa::NonlinearOperator< Scalar >::setEvalPt(), and xVector.
NOX::NOXPlaya::Group::Group | ( | const Playa::Vector< double > & | initcond, | |
const Playa::NonlinearOperator< double > & | nonlinOp, | |||
const Playa::LinearSolver< double > & | solver, | |||
int | numdigits | |||
) |
Constructor.
Construct a group given an initial condition, the nonlinear operator that describes the problem to be solved, the linear solver, and user-specified precision.
Definition at line 54 of file NOX_Playa_Group.cpp.
References nonlinearOp, resetIsValid(), Playa::NonlinearOperator< Scalar >::setEvalPt(), and xVector.
NOX::NOXPlaya::Group::Group | ( | const Playa::NonlinearOperator< double > & | nonlinOp, | |
const Playa::LinearSolver< double > & | solver, | |||
int | numdigits | |||
) |
Constructor.
Construct a group given an initial condition, the nonlinear operator that describes the problem to be solved, and user-specified precision.
Definition at line 73 of file NOX_Playa_Group.cpp.
References nonlinearOp, resetIsValid(), Playa::NonlinearOperator< Scalar >::setEvalPt(), and xVector.
NOX::NOXPlaya::Group::Group | ( | const NOX::NOXPlaya::Group & | source, | |
NOX::CopyType | type = DeepCopy | |||
) |
Copy constructor.
Construct a new group given an existing group to copy from.
Definition at line 92 of file NOX_Playa_Group.cpp.
References isValidF, isValidGradient, isValidJacobian, isValidNewton, normF, and resetIsValid().
NOX::NOXPlaya::Group::~Group | ( | ) |
NOX::Abstract::Group::ReturnType NOX::NOXPlaya::Group::applyJacobian | ( | const NOX::Abstract::Vector & | input, | |
NOX::Abstract::Vector & | result | |||
) | const |
See above.
NOX::Abstract::Group::ReturnType NOX::NOXPlaya::Group::applyJacobian | ( | const NOX::NOXPlaya::Vector & | input, | |
NOX::NOXPlaya::Vector & | result | |||
) | const |
Definition at line 369 of file NOX_Playa_Group.cpp.
References Playa::LinearOperator< Scalar >::apply(), NOX::NOXPlaya::Vector::getPlayaVector(), isJacobian(), and jacobian.
NOX::Abstract::Group::ReturnType NOX::NOXPlaya::Group::applyJacobianInverse | ( | Teuchos::ParameterList & | params, | |
const NOX::Abstract::Vector & | input, | |||
NOX::Abstract::Vector & | result | |||
) | const |
NOX::Abstract::Group::ReturnType NOX::NOXPlaya::Group::applyJacobianInverse | ( | Teuchos::ParameterList & | params, | |
const NOX::NOXPlaya::Vector & | input, | |||
NOX::NOXPlaya::Vector & | result | |||
) | const |
Definition at line 422 of file NOX_Playa_Group.cpp.
References Playa::SolverState< Scalar >::finalState(), NOX::NOXPlaya::Vector::getPlayaVector(), isJacobian(), jacobian, nonlinearOp, Playa::Vector< Scalar >::print(), Playa::Handle< PointerType >::print(), Playa::LinearSolver< Scalar >::solve(), Playa::SolveConverged, solver, and Playa::Handle< PointerType >::verb().
Referenced by computeNewton().
NOX::Abstract::Group::ReturnType NOX::NOXPlaya::Group::applyJacobianTranspose | ( | const NOX::Abstract::Vector & | input, | |
NOX::Abstract::Vector & | result | |||
) | const |
NOX::Abstract::Group::ReturnType NOX::NOXPlaya::Group::applyJacobianTranspose | ( | const NOX::NOXPlaya::Vector & | input, | |
NOX::NOXPlaya::Vector & | result | |||
) | const |
Definition at line 395 of file NOX_Playa_Group.cpp.
References Playa::LinearOperator< Scalar >::applyTranspose(), NOX::NOXPlaya::Vector::getPlayaVector(), isJacobian(), and jacobian.
Referenced by applyJacobianTranspose(), and computeGradient().
RCP< NOX::Abstract::Group > NOX::NOXPlaya::Group::clone | ( | NOX::CopyType | type = NOX::DeepCopy |
) | const [virtual] |
Definition at line 144 of file NOX_Playa_Group.cpp.
NOX::Abstract::Group::ReturnType NOX::NOXPlaya::Group::computeF | ( | ) |
Definition at line 220 of file NOX_Playa_Group.cpp.
References fVector, Playa::NonlinearOperator< Scalar >::getFunctionValue(), isValidF, nonlinearOp, normF, Playa::NonlinearOperator< Scalar >::setEvalPt(), Playa::Handle< PointerType >::verb(), and xVector.
NOX::Abstract::Group::ReturnType NOX::NOXPlaya::Group::computeGradient | ( | ) |
Definition at line 274 of file NOX_Playa_Group.cpp.
References applyJacobianTranspose(), fVector, gradientVector, isF(), isJacobian(), isValidGradient, nonlinearOp, and Playa::Handle< PointerType >::verb().
NOX::Abstract::Group::ReturnType NOX::NOXPlaya::Group::computeJacobian | ( | ) |
Definition at line 251 of file NOX_Playa_Group.cpp.
References Playa::NonlinearOperator< Scalar >::getJacobian(), isValidJacobian, jacobian, nonlinearOp, Playa::NonlinearOperator< Scalar >::setEvalPt(), Playa::Handle< PointerType >::verb(), and xVector.
NOX::Abstract::Group::ReturnType NOX::NOXPlaya::Group::computeNewton | ( | Teuchos::ParameterList & | params | ) |
Definition at line 310 of file NOX_Playa_Group.cpp.
References applyJacobianInverse(), fVector, isF(), isJacobian(), isNewton(), isValidNewton, newtonVector, nonlinearOp, and Playa::Handle< PointerType >::verb().
void NOX::NOXPlaya::Group::computeX | ( | const NOX::NOXPlaya::Group & | grp, | |
const NOX::NOXPlaya::Vector & | d, | |||
double | step | |||
) |
See above.
Definition at line 213 of file NOX_Playa_Group.cpp.
References resetIsValid(), and xVector.
void NOX::NOXPlaya::Group::computeX | ( | const NOX::Abstract::Group & | grp, | |
const NOX::Abstract::Vector & | d, | |||
double | step | |||
) |
Definition at line 203 of file NOX_Playa_Group.cpp.
const NOX::Abstract::Vector & NOX::NOXPlaya::Group::getF | ( | ) | const |
Definition at line 494 of file NOX_Playa_Group.cpp.
References fVector, isF(), nonlinearOp, and Playa::Handle< PointerType >::verb().
virtual Teuchos::RCP< const NOX::Abstract::Vector > NOX::NOXPlaya::Group::getFPtr | ( | ) | const [inline, virtual] |
const NOX::Abstract::Vector & NOX::NOXPlaya::Group::getGradient | ( | ) | const |
virtual Teuchos::RCP< const NOX::Abstract::Vector > NOX::NOXPlaya::Group::getGradientPtr | ( | ) | const [inline, virtual] |
Return RCP to gradient.
Definition at line 200 of file NOX_Playa_Group.hpp.
References gradientVector.
const NOX::Abstract::Vector & NOX::NOXPlaya::Group::getNewton | ( | ) | const |
virtual Teuchos::RCP< const NOX::Abstract::Vector > NOX::NOXPlaya::Group::getNewtonPtr | ( | ) | const [inline, virtual] |
Return RCP to Newton direction.
Definition at line 204 of file NOX_Playa_Group.hpp.
References newtonVector.
double NOX::NOXPlaya::Group::getNormF | ( | ) | const |
Definition at line 505 of file NOX_Playa_Group.cpp.
References isF(), nonlinearOp, normF, and Playa::Handle< PointerType >::verb().
Referenced by Playa::NOXSolver::solve().
const NOX::Abstract::Vector & NOX::NOXPlaya::Group::getX | ( | ) | const |
Definition at line 489 of file NOX_Playa_Group.cpp.
References xVector.
Referenced by Playa::NOXSolver::solve().
virtual Teuchos::RCP< const NOX::Abstract::Vector > NOX::NOXPlaya::Group::getXPtr | ( | ) | const [inline, virtual] |
Return RCP to solution vector.
Definition at line 190 of file NOX_Playa_Group.hpp.
References xVector.
bool NOX::NOXPlaya::Group::isF | ( | ) | const |
Definition at line 469 of file NOX_Playa_Group.cpp.
References isValidF.
Referenced by computeGradient(), computeNewton(), getF(), and getNormF().
bool NOX::NOXPlaya::Group::isGradient | ( | ) | const |
bool NOX::NOXPlaya::Group::isJacobian | ( | ) | const |
Definition at line 474 of file NOX_Playa_Group.cpp.
References isValidJacobian.
Referenced by applyJacobian(), applyJacobianInverse(), applyJacobianTranspose(), computeGradient(), and computeNewton().
bool NOX::NOXPlaya::Group::isNewton | ( | ) | const |
Definition at line 484 of file NOX_Playa_Group.cpp.
References isValidNewton.
Referenced by computeNewton().
NOX::Abstract::Group & NOX::NOXPlaya::Group::operator= | ( | const NOX::NOXPlaya::Group & | source | ) |
See above.
Definition at line 154 of file NOX_Playa_Group.cpp.
References fVector, gradientVector, isValidF, isValidGradient, isValidJacobian, isValidNewton, jacobian, newtonVector, nonlinearOp, normF, precision, solver, and xVector.
NOX::Abstract::Group & NOX::NOXPlaya::Group::operator= | ( | const NOX::Abstract::Group & | source | ) |
Definition at line 149 of file NOX_Playa_Group.cpp.
void NOX::NOXPlaya::Group::print | ( | ) | const |
void NOX::NOXPlaya::Group::resetIsValid | ( | ) | [protected] |
resets all isValid flags to false
Definition at line 135 of file NOX_Playa_Group.cpp.
References isValidF, isValidGradient, isValidJacobian, and isValidNewton.
Referenced by computeX(), Group(), and setX().
void NOX::NOXPlaya::Group::setX | ( | const NOX::NOXPlaya::Vector & | y | ) |
See above.
Definition at line 196 of file NOX_Playa_Group.cpp.
References NOX::NOXPlaya::Vector::getPlayaVector(), nonlinearOp, resetIsValid(), Playa::NonlinearOperator< Scalar >::setEvalPt(), and xVector.
void NOX::NOXPlaya::Group::setX | ( | const NOX::Abstract::Vector & | y | ) |
Definition at line 191 of file NOX_Playa_Group.cpp.
RCP<NOX::NOXPlaya::Vector> NOX::NOXPlaya::Group::fVector [protected] |
Right-hand-side vector (function evaluation).
Definition at line 232 of file NOX_Playa_Group.hpp.
Referenced by computeF(), computeGradient(), computeNewton(), getF(), getFPtr(), operator=(), and print().
RCP<NOX::NOXPlaya::Vector> NOX::NOXPlaya::Group::gradientVector [protected] |
Gradient vector (steepest descent vector).
Definition at line 236 of file NOX_Playa_Group.hpp.
Referenced by computeGradient(), getGradient(), getGradientPtr(), and operator=().
bool NOX::NOXPlaya::Group::isValidF [protected] |
Definition at line 254 of file NOX_Playa_Group.hpp.
Referenced by computeF(), Group(), isF(), operator=(), print(), and resetIsValid().
bool NOX::NOXPlaya::Group::isValidGradient [protected] |
Definition at line 256 of file NOX_Playa_Group.hpp.
Referenced by computeGradient(), Group(), isGradient(), operator=(), and resetIsValid().
bool NOX::NOXPlaya::Group::isValidJacobian [protected] |
Definition at line 255 of file NOX_Playa_Group.hpp.
Referenced by computeJacobian(), Group(), isJacobian(), operator=(), and resetIsValid().
bool NOX::NOXPlaya::Group::isValidNewton [protected] |
Definition at line 257 of file NOX_Playa_Group.hpp.
Referenced by computeNewton(), Group(), isNewton(), operator=(), and resetIsValid().
Playa::LinearOperator<double> NOX::NOXPlaya::Group::jacobian [protected] |
Linear solver that will be used to solve J*step = resid.
Definition at line 243 of file NOX_Playa_Group.hpp.
Referenced by applyJacobian(), applyJacobianInverse(), applyJacobianTranspose(), computeJacobian(), and operator=().
RCP<NOX::NOXPlaya::Vector> NOX::NOXPlaya::Group::newtonVector [protected] |
Newton direction vector.
Definition at line 234 of file NOX_Playa_Group.hpp.
Referenced by computeNewton(), getNewton(), getNewtonPtr(), and operator=().
Playa::NonlinearOperator<double> NOX::NOXPlaya::Group::nonlinearOp [protected] |
Problem interface: reference to nonlinear operator passed to group.
Definition at line 247 of file NOX_Playa_Group.hpp.
Referenced by applyJacobianInverse(), computeF(), computeGradient(), computeJacobian(), computeNewton(), getF(), getNormF(), Group(), operator=(), and setX().
double NOX::NOXPlaya::Group::normF [protected] |
Norm of F.
Definition at line 261 of file NOX_Playa_Group.hpp.
Referenced by computeF(), getNormF(), Group(), operator=(), and print().
int NOX::NOXPlaya::Group::precision [protected] |
user-specified precision
Definition at line 225 of file NOX_Playa_Group.hpp.
Referenced by operator=().
Playa::LinearSolver<double> NOX::NOXPlaya::Group::solver [mutable, protected] |
Linear solver that will be used to solve J*step = resid.
Definition at line 240 of file NOX_Playa_Group.hpp.
Referenced by applyJacobianInverse(), and operator=().
RCP<NOX::NOXPlaya::Vector> NOX::NOXPlaya::Group::xVector [protected] |
Solution vector.
Definition at line 230 of file NOX_Playa_Group.hpp.
Referenced by computeF(), computeJacobian(), computeX(), getX(), getXPtr(), Group(), operator=(), print(), and setX().