

Public Member Functions | |
| def | __init__ |
| def | SetUseTranspose |
| def | Apply |
| def | ApplyInverse |
| def | NormInf |
| def | Label |
| def | UseTranspose |
| def | HasNormInf |
| def | Comm |
| def | OperatorDomainMap |
| def | OperatorRangeMap |
| def | computeJacobian |
| def | setDifferenceMethod |
| def | setLambda |
| def | setComputePerturbation |
| def | setPerturbation |
| def | getPerturbation |
| def | setGroupForComputeF |
| def | setSolverForComputeJacobian |
Public Attributes | |
| this | |
Static Public Attributes | |
| Forward = ___init__.MatrixFree_Forward | |
| Backward = ___init__.MatrixFree_Backward | |
| Centered = ___init__.MatrixFree_Centered | |
Concrete implementation for creating an Epetra_Operator Jacobian based
on the Matrix-Free Newton-Krylov method.
Matrix-Free Newton-Krylov is a method that takes advantage of the fact
the Newton Krylov solvers do not require an explicit Jacobian matrix.
Newton-Krylov solvers only require the matrix-vector product $Jy$ in
the iteration sequence. This product can approximated by the
following:
\\[ Jy = \\frac{F(x + \\delta y) - F(x)}{\\delta} \\]
where $J$ is the Jacobian, $F$ is the function evaluation, $x$ is the
solution vector, $y$ is the vector to be operated on, and $\\delta$
is a scalar perturbation calculated by:
\\[ \\delta = \\lambda * (\\lambda + \\frac{\\|
x\\|}{\\| y\\|} ) \\]
where $ \\lambda = 1.0e-6 $.
C++ includes: NOX_Epetra_MatrixFree.H
| def PyTrilinos.NOX.Epetra.MatrixFree.__init__ | ( | self, | |
| args | |||
| ) |
__init__(NOX::Epetra::MatrixFree self, ParameterList printParams, Teuchos::RCP< NOX::Epetra::Interface::Required > const & i,
Vector cloneVector, bool useNewPerturbation=False) -> MatrixFree
MatrixFree::MatrixFree(Teuchos::ParameterList &printParams, const
Teuchos::RCP< NOX::Epetra::Interface::Required > &i, const
NOX::Epetra::Vector &cloneVector, bool useNewPerturbation=false)
Constructor.
The vector x is used to clone the solution vector.
Reimplemented from PyTrilinos.NOX.Epetra.Operator.
| def PyTrilinos.NOX.Epetra.MatrixFree.Apply | ( | self, | |
| args | |||
| ) |
Apply(MatrixFree self, Epetra_MultiVector X, Epetra_MultiVector Y) -> int int MatrixFree::Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y. Parameters: ----------- X: - A Epetra_MultiVector of dimension NumVectors to multiply with matrix. Y: -A Epetra_MultiVector of dimension NumVectors containing result. Integer error code, set to 0 if successful.
Reimplemented from PyTrilinos.NOX.Epetra.Operator.
| def PyTrilinos.NOX.Epetra.MatrixFree.ApplyInverse | ( | self, | |
| args | |||
| ) |
ApplyInverse(MatrixFree self, Epetra_MultiVector X, Epetra_MultiVector Y) -> int int MatrixFree::ApplyInverse(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y. Parameters: ----------- X: - A Epetra_MultiVector of dimension NumVectors to solve for. Y: -A Epetra_MultiVector of dimension NumVectors containing result. Integer error code, set to 0 if successful. WARNING: In order to work with AztecOO, any implementation of this method must support the case where X and Y are the same object.
Reimplemented from PyTrilinos.NOX.Epetra.Operator.
| def PyTrilinos.NOX.Epetra.MatrixFree.Comm | ( | self, | |
| args | |||
| ) |
Comm(MatrixFree self) -> Comm const Epetra_Comm & MatrixFree::Comm() const Returns a reference to the Epetra_Comm communicator associated with this operator.
Reimplemented from PyTrilinos.NOX.Epetra.Operator.
| def PyTrilinos.NOX.Epetra.MatrixFree.computeJacobian | ( | self, | |
| args | |||
| ) |
computeJacobian(MatrixFree self, Epetra_Vector x, Operator Jac) -> bool bool MatrixFree::computeJacobian(const Epetra_Vector &x, Epetra_Operator &Jac) Compute Jacobian given the specified input vector, x. Returns true if computation was successful.
Reimplemented from PyTrilinos.NOX.Epetra.Interface.Jacobian.
| def PyTrilinos.NOX.Epetra.MatrixFree.getPerturbation | ( | self, | |
| args | |||
| ) |
getPerturbation(MatrixFree self) -> double double MatrixFree::getPerturbation() const Returns the most recently used value of the perturbation parameter $ \\eta $.
| def PyTrilinos.NOX.Epetra.MatrixFree.HasNormInf | ( | self, | |
| args | |||
| ) |
HasNormInf(MatrixFree self) -> bool bool MatrixFree::HasNormInf() const Returns true if the this object can provide an approximate Inf-norm, false otherwise.
Reimplemented from PyTrilinos.NOX.Epetra.Operator.
| def PyTrilinos.NOX.Epetra.MatrixFree.Label | ( | self, | |
| args | |||
| ) |
Label(MatrixFree self) -> char const * const char * MatrixFree::Label() const Returns a character string describing the operator.
Reimplemented from PyTrilinos.NOX.Epetra.Operator.
| def PyTrilinos.NOX.Epetra.MatrixFree.NormInf | ( | self, | |
| args | |||
| ) |
NormInf(MatrixFree self) -> double double MatrixFree::NormInf() const Returns the infinity norm of the global matrix.
Reimplemented from PyTrilinos.NOX.Epetra.Operator.
| def PyTrilinos.NOX.Epetra.MatrixFree.OperatorDomainMap | ( | self, | |
| args | |||
| ) |
OperatorDomainMap(MatrixFree self) -> Map const Epetra_Map & MatrixFree::OperatorDomainMap() const Returns the Epetra_BlockMap object associated with the domain of this matrix operator.
Reimplemented from PyTrilinos.NOX.Epetra.Operator.
| def PyTrilinos.NOX.Epetra.MatrixFree.OperatorRangeMap | ( | self, | |
| args | |||
| ) |
OperatorRangeMap(MatrixFree self) -> Map const Epetra_Map & MatrixFree::OperatorRangeMap() const Returns the Epetra_BlockMap object associated with the range of this matrix operator.
Reimplemented from PyTrilinos.NOX.Epetra.Operator.
| def PyTrilinos.NOX.Epetra.MatrixFree.setComputePerturbation | ( | self, | |
| args | |||
| ) |
setComputePerturbation(MatrixFree self, bool bVal) void MatrixFree::setComputePerturbation(bool bVal) Flag that toggles whether MatrixFree should compute the perturbation parameter $ \\eta $ or use a value supplied by the user through setPerturbation().
| def PyTrilinos.NOX.Epetra.MatrixFree.setDifferenceMethod | ( | self, | |
| args | |||
| ) |
setDifferenceMethod(MatrixFree self, NOX::Epetra::MatrixFree::DifferenceType type) void MatrixFree::setDifferenceMethod(DifferenceType type) Set the type of perturbation method used (default is Forward)
| def PyTrilinos.NOX.Epetra.MatrixFree.setGroupForComputeF | ( | self, | |
| args | |||
| ) |
setGroupForComputeF(MatrixFree self, Group group) void MatrixFree::setGroupForComputeF(const NOX::Abstract::Group &group) Clone a NOX::Abstract::Group derived object and use the computeF() method of that group for the perturbation instead of the NOX::Epetra::Interface::Required::computeF() method. This is required for LOCA to get the operators correct during homotopy.
| def PyTrilinos.NOX.Epetra.MatrixFree.setLambda | ( | self, | |
| args | |||
| ) |
setLambda(MatrixFree self, double lambda_) void MatrixFree::setLambda(double lambda_) Allows the user to change the value of $ \\lambda $ in the perturbation calculation.
| def PyTrilinos.NOX.Epetra.MatrixFree.setPerturbation | ( | self, | |
| args | |||
| ) |
setPerturbation(MatrixFree self, double eta_) void MatrixFree::setPerturbation(double eta_) Set the perturbation parameter $ \\eta $.
| def PyTrilinos.NOX.Epetra.MatrixFree.setSolverForComputeJacobian | ( | self, | |
| args | |||
| ) |
setSolverForComputeJacobian(MatrixFree self, Teuchos::RCP< NOX::Solver::Generic > const & slvr) void MatrixFree::setSolverForComputeJacobian(const Teuchos::RCP< NOX::Solver::Generic > &slvr) Save a RCP to a solver, and use the Solver's current Group's computeF() in the computeJacobian call, which can save a function call by respecting the isValid flag.
| def PyTrilinos.NOX.Epetra.MatrixFree.SetUseTranspose | ( | self, | |
| args | |||
| ) |
SetUseTranspose(MatrixFree self, bool UseTranspose) -> int int MatrixFree::SetUseTranspose(bool UseTranspose) If set true, transpose of this operator will be applied. This flag allows the transpose of the given operator to be used implicitly. Setting this flag affects only the Apply() and ApplyInverse() methods. If the implementation of this interface does not support transpose use, this method should return a value of -1. Parameters: ----------- UseTranspose: -If true, multiply by the transpose of operator, otherwise just use operator. Integer error code, set to 0 if successful. Set to -1 if this implementation does not support transpose.
Reimplemented from PyTrilinos.NOX.Epetra.Operator.
| def PyTrilinos.NOX.Epetra.MatrixFree.UseTranspose | ( | self, | |
| args | |||
| ) |
UseTranspose(MatrixFree self) -> bool bool MatrixFree::UseTranspose() const Returns the current UseTranspose setting.
Reimplemented from PyTrilinos.NOX.Epetra.Operator.
1.7.6.1