

Public Member Functions | |
| def | __init__ |
| def | setX |
| def | computeX |
| def | computeF |
| def | computeJacobian |
| def | computeGradient |
| def | computeNewton |
| def | applyJacobian |
| def | applyJacobianTranspose |
| def | applyJacobianInverse |
| def | applyRightPreconditioning |
| def | isF |
| def | isJacobian |
| def | isGradient |
| def | isNewton |
| def | isNormNewtonSolveResidual |
| def | isPreconditioner |
| def | isConditionNumber |
| def | getNormF |
| def | getX |
| def | getF |
| def | getGradient |
| def | getNewton |
| def | getNormLastLinearSolveResidual |
| def | clone |
| def | getRequiredInterface |
| def | getLinearSystem |
| def | computeJacobianConditionNumber |
| def | getJacobianConditionNumber |
| def | disableLinearResidualComputation |
Public Attributes | |
| this | |
Concrete implementation of NOX::Abstract::Group for Trilinos/Epetra. This group is set up to use the linear algebra services provided through the Trilinos/Epetra package with AztecOO for the linear solver. C++ includes: NOX_Epetra_Group.H
| def PyTrilinos.NOX.Epetra.Group.__init__ | ( | self, | |
| args | |||
| ) |
__init__(NOX::Epetra::Group self, ParameterList printingParams, Teuchos::RCP< NOX::Epetra::Interface::Required > const & i,
Vector initialGuess) -> Group
__init__(NOX::Epetra::Group self, ParameterList printingParams, Teuchos::RCP< NOX::Epetra::Interface::Required > const & i,
Vector initialGuess, Teuchos::RCP< NOX::Epetra::LinearSystem > const & linSys) -> Group
__init__(NOX::Epetra::Group self, Group source, NOX::CopyType type=DeepCopy) -> Group
Group::Group(const
NOX::Epetra::Group &source, NOX::CopyType type=NOX::DeepCopy)
Copy constructor. If type is DeepCopy, takes ownership of valid shared
linear system.
| def PyTrilinos.NOX.Epetra.Group.applyJacobian | ( | self, | |
| args | |||
| ) |
applyJacobian(Group self, Vector input, Vector result) -> NOX::Abstract::Group::ReturnType applyJacobian(Group self, Vector input, Vector result) -> NOX::Abstract::Group::ReturnType Abstract::Group::ReturnType Group::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. Computes \\[ v = J u, \\] where $J$ is the Jacobian, $u$ is the input vector, and $v$ is the result vector. NOX::Abstract::Group::NotDefined - Returned by default implementation in NOX::Abstract::Group NOX::Abstract::Group::BadDependency - If the Jacobian $J$ has not been computed NOX::Abstract::Group::Failed - If the computation fails NOX::Abstract::Group::Ok - Otherwise
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.applyJacobianInverse | ( | self, | |
| args | |||
| ) |
applyJacobianInverse(Group self, ParameterList params, Vector input, Vector result) -> NOX::Abstract::Group::ReturnType
applyJacobianInverse(Group self, ParameterList params, Vector input, Vector result) -> NOX::Abstract::Group::ReturnType
Abstract::Group::ReturnType
Group::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.
Computes \\[ v = J^{-1} u, \\] where $J$ is the Jacobian, $u$ is
the input vector, and $v$ is the result vector.
The "Tolerance" parameter specifies that the solution should be such
that \\[ \\frac{\\| J v - u \\|_2}{\\max \\{ 1,
\\|u\\|_2\\} } < \\mbox{Tolerance} \\]
NOX::Abstract::Group::NotDefined - Returned by default implementation
in NOX::Abstract::Group
NOX::Abstract::Group::BadDependency - If $J$ has not been computed
NOX::Abstract::Group::NotConverged - If the linear solve fails to
satisfy the "Tolerance" specified in params
NOX::Abstract::Group::Failed - If the computation fails
NOX::Abstract::Group::Ok - Otherwise
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 PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.applyJacobianTranspose | ( | self, | |
| args | |||
| ) |
applyJacobianTranspose(Group self, Vector input, Vector result) -> NOX::Abstract::Group::ReturnType applyJacobianTranspose(Group self, Vector input, Vector result) -> NOX::Abstract::Group::ReturnType Abstract::Group::ReturnType Group::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. Computes \\[ v = J^T u, \\] where $J$ is the Jacobian, $u$ is the input vector, and $v$ is the result vector. NOX::Abstract::Group::NotDefined - Returned by default implementation in NOX::Abstract::Group NOX::Abstract::Group::BadDependency - If $J$ has not been computed NOX::Abstract::Group::Failed - If the computation fails NOX::Abstract::Group::Ok - Otherwise
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.applyRightPreconditioning | ( | self, | |
| args | |||
| ) |
applyRightPreconditioning(Group self, bool useTranspose, ParameterList params, Vector input, Vector result) -> NOX::Abstract::Group::ReturnType
applyRightPreconditioning(Group self, bool useTranspose, ParameterList params, Vector input, Vector result) -> NOX::Abstract::Group::ReturnType
Abstract::Group::ReturnType Group::applyRightPreconditioning(bool
useTranspose, Teuchos::ParameterList ¶ms, const
NOX::Abstract::Vector &input, NOX::Abstract::Vector &result) const
Apply right preconditiong to the given input vector.
Let $M$ be a right preconditioner for the Jacobian $J$; in other
words, $M$ is a matrix such that \\[ JM \\approx I. \\]
Compute \\[ u = M^{-1} v, \\] where $u$ is the input vector and
$v$ is the result vector.
If useTranspose is true, then the transpose of the preconditioner is
applied: \\[ u = {M^{-1}}^T v, \\] The transpose preconditioner is
currently only required for Tensor methods.
The "Tolerance" parameter specifies that the solution should be such
that \\[ \\frac{\\| M v - u \\|_2}{\\max \\{ 1,
\\|u\\|_2\\} } < \\mbox{Tolerance} \\]
NOX::Abstract::Group::NotDefined - Returned by default implementation
in NOX::Abstract::Group
NOX::Abstract::Group::NotConverged - If the linear solve fails to
satisfy the "Tolerance" specified in params
NOX::Abstract::Group::Failed - If the computation fails
NOX::Abstract::Group::Ok - Otherwise
The parameters are from the "Linear %Solver" sublist of the
"Direction" sublist that is passed to solver during construction.
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.clone | ( | self, | |
| args | |||
| ) |
clone(Group self, NOX::CopyType type=DeepCopy) -> Teuchos::RCP< NOX::Abstract::Group > Teuchos::RCP< NOX::Abstract::Group > Group::clone(CopyType type=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. 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. Any shared data should have its ownership transfered to this group from the source for a NOX::DeepCopy.
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.computeF | ( | self, | |
| args | |||
| ) |
computeF(Group self) -> NOX::Abstract::Group::ReturnType Abstract::Group::ReturnType Group::computeF() Compute and store F(x). It's generally useful to also compute and store the 2-norm of F(x) at this point for later access by the getNormF() function. NOX::Abstract::Group::Failed - If the computation fails in any way NOX::Abstract::Group::Ok - Otherwise
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.computeGradient | ( | self, | |
| args | |||
| ) |
computeGradient(Group self) -> NOX::Abstract::Group::ReturnType
Abstract::Group::ReturnType Group::computeGradient()
Compute and store gradient.
We can pose the nonlinear equation problem $F(x) = 0$ as an
optimization problem as follows: \\[ \\min f(x) \\equiv
\\frac{1}{2} \\|F(x)\\|_2^2. \\]
In that case, the gradient (of $f$) is defined as \\[ g \\equiv
J^T F. \\]
NOX::Abstract::Group::NotDefined - Returned by default implementation
in NOX::Abstract::Group
NOX::Abstract::Group::BadDependency - If either $F$ or $J$ has not
been computed
NOX::Abstract::Group::Failed - If the computation fails in any other
way
NOX::Abstract::Group::Ok - Otherwise
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.computeJacobian | ( | self, | |
| args | |||
| ) |
computeJacobian(Group self) -> NOX::Abstract::Group::ReturnType
Abstract::Group::ReturnType Group::computeJacobian()
Compute and store Jacobian.
Recall that \\[ F(x) = \\left[ \\begin{array}{c} F_1(x) \\\\
F_2(x) \\\\ \\vdots \\\\ F_n(x) \\\\ \\end{array}
\\right]. \\]
The Jacobian is denoted by $J$ and defined by \\[ J_{ij} =
\\frac{\\partial F_i}{\\partial x_j} (x). \\]
If this is a shared object, this group should taken ownership of the
Jacobian before it computes it.
NOX::Abstract::Group::NotDefined - Returned by default implementation
in NOX::Abstract::Group
NOX::Abstract::Group::Failed - If the computation fails in any other
way
NOX::Abstract::Group::Ok - Otherwise
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.computeJacobianConditionNumber | ( | self, | |
| args | |||
| ) |
computeJacobianConditionNumber(Group self, int maxIters, double tolerance, int krylovSubspaceSize=100, bool printOutput=False) -> NOX::Abstract::Group::ReturnType Abstract::Group::ReturnType NOX::Epetra::Group::computeJacobianConditionNumber(int maxIters, double tolerance, int krylovSubspaceSize=100, bool printOutput=false)
| def PyTrilinos.NOX.Epetra.Group.computeNewton | ( | self, | |
| args | |||
| ) |
computeNewton(Group self, ParameterList params) -> NOX::Abstract::Group::ReturnType
Abstract::Group::ReturnType
Group::computeNewton(Teuchos::ParameterList ¶ms)
Compute the Newton direction, using parameters for the linear solve.
The Newton direction is the solution, s, of \\[ J s = -F. \\]
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 \\[ \\frac{\\| J s - (-F)
\\|_2}{\\max \\{ 1, \\|F\\|_2\\} } < \\mbox{Tolerance}
\\]
NOX::Abstract::Group::NotDefined - Returned by default implementation
in NOX::Abstract::Group
NOX::Abstract::Group::BadDependency - If either $F$ or $J$ has not
been computed
NOX::Abstract::Group::NotConverged - If the linear solve fails to
satisfy the "Tolerance" specified in params
NOX::Abstract::Group::Failed - If the computation fails in any other
way
NOX::Abstract::Group::Ok - Otherwise
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.computeX | ( | self, | |
| args | |||
| ) |
computeX(Group self, Group grp, Vector d, double step)
computeX(Group self, Group grp, Vector d, double step)
void
Group::computeX(const NOX::Abstract::Group &grp, const
NOX::Abstract::Vector &d, double step)
Compute x = grp.x + step * d.
Let $x$ denote this group's solution vector. Let $\\hat x$ denote
the result of grp.getX(). Then set \\[ x = \\hat x +
\\mbox{step} \\; d. \\]
This should invalidate the function value, Jacobian, gradient, and
Newton direction.
Throw an error if the copy fails.
Reference to this object
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.disableLinearResidualComputation | ( | self, | |
| args | |||
| ) |
disableLinearResidualComputation(Group self, bool const disableChoice) void NOX::Epetra::Group::disableLinearResidualComputation(const bool disableChoice) Sets option to disable linear resid computation. If disabled, this saves on a MatVec per Newton but disallows inexact Newton methods.
| def PyTrilinos.NOX.Epetra.Group.getF | ( | self, | |
| args | |||
| ) |
getF(Group self) -> Teuchos::RCP< NOX::Abstract::Vector const > virtual Teuchos::RCP< const NOX::Abstract::Vector > NOX::Epetra::Group::getFPtr() const Return RCP to F(x)
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.getGradient | ( | self, | |
| args | |||
| ) |
getGradient(Group self) -> Teuchos::RCP< NOX::Abstract::Vector const > virtual Teuchos::RCP< const NOX::Abstract::Vector > NOX::Epetra::Group::getGradientPtr() const Return RCP to gradient.
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.getJacobianConditionNumber | ( | self, | |
| args | |||
| ) |
getJacobianConditionNumber(Group self) -> double double NOX::Epetra::Group::getJacobianConditionNumber() const Returns the condition number of the Jacobian matrix.
| def PyTrilinos.NOX.Epetra.Group.getLinearSystem | ( | self, | |
| args | |||
| ) |
getLinearSystem(Group self) -> Teuchos::RCP< NOX::Epetra::LinearSystem const > getLinearSystem(Group self) -> Teuchos::RCP< NOX::Epetra::LinearSystem > Teuchos::RCP< NOX::Epetra::LinearSystem > Group::getLinearSystem() Return the Linear System.
| def PyTrilinos.NOX.Epetra.Group.getNewton | ( | self, | |
| args | |||
| ) |
getNewton(Group self) -> Teuchos::RCP< NOX::Abstract::Vector const > virtual Teuchos::RCP< const NOX::Abstract::Vector > NOX::Epetra::Group::getNewtonPtr() const Return RCP to Newton direction.
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.getNormF | ( | self, | |
| args | |||
| ) |
getNormF(Group self) -> double
double
Group::getNormF() const
Return 2-norm of F(x).
In other words, \\[ \\sqrt{\\sum_{i=1}^n F_i^2} \\]
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.getNormLastLinearSolveResidual | ( | self, | |
| args | |||
| ) |
getNormLastLinearSolveResidual(Group self, double & residual) -> NOX::Abstract::Group::ReturnType Abstract::Group::ReturnType NOX::Epetra::Group::getNormLastLinearSolveResidual(double &residual) const Returns the 2-norm of the residual of the linear model used in the Newton solve computation, ||Js+f||. This does not account for line search adjustments to the step length!
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.getRequiredInterface | ( | self, | |
| args | |||
| ) |
getRequiredInterface(Group self) -> Teuchos::RCP< NOX::Epetra::Interface::Required > Teuchos::RCP< NOX::Epetra::Interface::Required > Group::getRequiredInterface() Return the userInterface.
| def PyTrilinos.NOX.Epetra.Group.getX | ( | self, | |
| args | |||
| ) |
getX(Group self) -> Teuchos::RCP< NOX::Abstract::Vector const > virtual Teuchos::RCP< const NOX::Abstract::Vector > NOX::Epetra::Group::getXPtr() const Return RCP to solution vector.
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.isConditionNumber | ( | self, | |
| args | |||
| ) |
isConditionNumber(Group self) -> bool bool Group::isConditionNumber() const Returns true if the condition number has been computed.
| def PyTrilinos.NOX.Epetra.Group.isF | ( | self, | |
| args | |||
| ) |
isF(Group self) -> bool bool Group::isF() const Return true if F is valid.
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.isGradient | ( | self, | |
| args | |||
| ) |
isGradient(Group self) -> bool bool Group::isGradient() const Return true if the gradient is valid. Default implementation in NOX::Abstract::Group returns false.
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.isJacobian | ( | self, | |
| args | |||
| ) |
isJacobian(Group self) -> bool bool Group::isJacobian() const Return true if the Jacobian is valid. Default implementation in NOX::Abstract::Group returns false.
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.isNewton | ( | self, | |
| args | |||
| ) |
isNewton(Group self) -> bool bool Group::isNewton() const Return true if the Newton direction is valid. Default implementation in NOX::Abstract::Group returns false.
Reimplemented from PyTrilinos.NOX.Abstract.Group.
| def PyTrilinos.NOX.Epetra.Group.isNormNewtonSolveResidual | ( | self, | |
| args | |||
| ) |
isNormNewtonSolveResidual(Group self) -> bool bool Group::isNormNewtonSolveResidual() const Returns true if the value of the Norm of the linear model for a full Newton step ||Js + f|| is valid with respect to the current solution vector.
| def PyTrilinos.NOX.Epetra.Group.isPreconditioner | ( | self, | |
| args | |||
| ) |
isPreconditioner(Group self) -> bool bool Group::isPreconditioner() const Returns true if an explicitly constructed preconditioner exists (i.e. one that is computed and saved for further use in multiple calls to applyRightPreconditioner).
| def PyTrilinos.NOX.Epetra.Group.setX | ( | self, | |
| args | |||
| ) |
setX(Group self, Vector y) setX(Group self, Vector y) void Group::setX(const NOX::Abstract::Vector &y) Set the solution vector x to y. This should invalidate the function value, Jacobian, gradient, and Newton direction. Throw an error if the copy fails. Reference to this object
Reimplemented from PyTrilinos.NOX.Abstract.Group.
1.7.6.1