#include <NOX_Epetra_MatrixFree.H>
Inheritance diagram for NOX::Epetra::MatrixFree:
Public Types | |
| enum | DifferenceType { Forward, Backward, Centered } |
Define types for use of the perturbation parameter . | |
Public Member Functions | |
| MatrixFree (Interface &i, const Epetra_Vector &x, double lambda=1.0e-6) | |
| Constructor. | |
| virtual | ~MatrixFree () |
| Pure virtual destructor. | |
| virtual int | SetUseTranspose (bool UseTranspose) |
| If set true, transpose of this operator will be applied. | |
| virtual int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
| Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y. | |
| virtual int | 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. | |
| virtual double | NormInf () const |
| Returns the infinity norm of the global matrix. | |
| virtual const char * | Label () const |
| Returns a character string describing the operator. | |
| virtual bool | UseTranspose () const |
| Returns the current UseTranspose setting. | |
| virtual bool | HasNormInf () const |
| Returns true if the this object can provide an approximate Inf-norm, false otherwise. | |
| virtual const Epetra_Comm & | Comm () const |
| Returns a reference to the Epetra_Comm communicator associated with this operator. | |
| virtual const Epetra_Map & | OperatorDomainMap () const |
| Returns the Epetra_BlockMap object associated with the domain of this matrix operator. | |
| virtual const Epetra_Map & | OperatorRangeMap () const |
| Returns the Epetra_BlockMap object associated with the range of this matrix operator. | |
| virtual bool | computeJacobian (const Epetra_Vector &x, Epetra_Operator &Jac) |
| Compute Jacobian given the specified input vector, x. Returns true if computation was successful. | |
| virtual void | setDifferenceMethod (DifferenceType type) |
| Set the type of perturbation method used (default is Forward). | |
| void | setLambda (double lambda_) |
Allows the user to change the value of in the perturbation calculation. | |
| void | setComputePerturbation (bool bVal) |
Flag that toggles whether MatrixFree should compute the perturbation parameter or use a value supplied by the user through setPerturbation(). | |
| void | setPerturbation (double eta_) |
Set the perturbation parameter . | |
| double | getPerturbation () const |
Returns the most recently used value of the perturbation parameter . | |
Protected Attributes | |
| string | label |
| Label for matrix. | |
| Interface & | interface |
| User provided interface function. | |
| Epetra_Vector | currentX |
| The current solution vector. | |
| Epetra_Vector | perturbX |
| Perturbed solution vector. | |
| Epetra_Vector | fo |
| Function evaluation at currentX. | |
| Epetra_Vector | fp |
| Function evaluation at perturbX. | |
| Epetra_Vector * | fmPtr |
| Optional pointer to function evaluation at -perturbX - needed only for centered finite differencing. | |
| const Epetra_Map * | epetraMap |
| Epetra_Map object used in the returns of the Epetra_Operator derived methods. | |
| bool | ownsMap |
| Set to true if the epetraMap is created by NOX::Epetra::MatrixFree. | |
| DifferenceType | diffType |
Define types for use of the perturbation parameter . | |
| double | lambda |
| Scale factor for eta calculation. | |
| double | eta |
| Perturbation value to use in the directional derivative. | |
| double | userEta |
| User specified perturbation value to use in the directional derivative. Set by setPerturbation(). | |
| bool | computeEta |
| Flag that determines if we should calculate eta or use a value set by the user. | |
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
in the iteration sequence. This product can approximated by the following:
where
is the Jacobian,
is the function evaluation,
is the solution vector,
is the vector to be operated on, and
is a scalar perturbation calculated by:
where
.
|
||||||||||||
|
Returns the result of a Epetra_Operator applied to a Epetra_MultiVector X in Y.
Implements Epetra_Operator. |
|
||||||||||||
|
Returns the result of a Epetra_Operator inverse applied to an Epetra_MultiVector X in Y.
Implements Epetra_Operator. |
|
|
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.
Implements Epetra_Operator. |
|
|
Epetra_Map object used in the returns of the Epetra_Operator derived methods. If the user is using Epetra_BlockMaps, then NOX::Epetra::MatrixFree must create an equivalent Epetra_Map from the Epetra_BlockMap that can be used as the return object of the OperatorDomainMap() and OperatorRangeMap() methods. |
|
|
Set to true if the epetraMap is created by NOX::Epetra::MatrixFree. If the user is using Epetra_BlockMaps, then NOX::Epetra::MatrixFree must create an equivalent Epetra_Map from the Epetra_BlockMap that can be used as the return object of the OperatorDomainMap() and OperatorRangeMap() methods. This flag tells the destructor whether or not to destroy the Epetra_Map. |
1.3.9.1