|
NOX Development
|
An Epetra row matrix for implementing the operator
.
More...
#include <LOCA_Epetra_LowRankUpdateRowMatrix.H>


Public Member Functions | |
| LowRankUpdateRowMatrix (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< Epetra_RowMatrix > &jacRowMatrix, const Teuchos::RCP< Epetra_MultiVector > &U_multiVec, const Teuchos::RCP< Epetra_MultiVector > &V_multiVec, bool setup_for_solve, bool include_UV_terms) | |
| Constructor. More... | |
| virtual | ~LowRankUpdateRowMatrix () |
| Destructor. | |
| virtual const Epetra_BlockMap & | Map () const |
| Returns a reference to the Epetra_BlockMap for this object. More... | |
| virtual int | NumMyRowEntries (int MyRow, int &NumEntries) const |
| Returns the number of nonzero entries in MyRow. More... | |
| virtual int | MaxNumEntries () const |
| Returns the maximum of NumMyRowEntries() over all rows. More... | |
| virtual int | ExtractMyRowCopy (int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const |
| Returns a copy of the specified local row in user-provided arrays. More... | |
| virtual int | ExtractDiagonalCopy (Epetra_Vector &Diagonal) const |
| Returns a copy of the main diagonal in a user-provided vector. More... | |
| virtual int | Multiply (bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
| Returns the result of a Epetra_RowMatrix multiplied by a Epetra_MultiVector X in Y. More... | |
| virtual int | Solve (bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
| Returns result of a local-only solve using a triangular Epetra_RowMatrix with Epetra_MultiVectors X and Y. More... | |
| virtual int | InvRowSums (Epetra_Vector &x) const |
| Computes the sum of absolute values of the rows of the Epetra_RowMatrix, results returned in x. More... | |
| virtual int | LeftScale (const Epetra_Vector &x) |
| Scales the Epetra_RowMatrix on the left with a Epetra_Vector x. More... | |
| virtual int | InvColSums (Epetra_Vector &x) const |
| Computes the sum of absolute values of the columns of the Epetra_RowMatrix, results returned in x. More... | |
| virtual int | RightScale (const Epetra_Vector &x) |
| Scales the Epetra_RowMatrix on the right with a Epetra_Vector x. More... | |
| virtual bool | Filled () const |
| If FillComplete() has been called, this query returns true, otherwise it returns false. More... | |
| virtual double | NormInf () const |
| Returns the infinity norm of the global matrix. More... | |
| virtual double | NormOne () const |
| Returns the one norm of the global matrix. More... | |
| virtual int | NumGlobalNonzeros () const |
| Returns the number of nonzero entries in the global matrix. More... | |
| virtual long long | NumGlobalNonzeros64 () const |
| virtual int | NumGlobalRows () const |
| Returns the number of global matrix rows. More... | |
| virtual long long | NumGlobalRows64 () const |
| virtual int | NumGlobalCols () const |
| Returns the number of global matrix columns. More... | |
| virtual long long | NumGlobalCols64 () const |
| virtual int | NumGlobalDiagonals () const |
| Returns the number of global nonzero diagonal entries, based on global row/column index comparisons. More... | |
| virtual long long | NumGlobalDiagonals64 () const |
| virtual int | NumMyNonzeros () const |
| Returns the number of nonzero entries in the calling processor's portion of the matrix. More... | |
| virtual int | NumMyRows () const |
| Returns the number of matrix rows owned by the calling processor. More... | |
| virtual int | NumMyCols () const |
| Returns the number of matrix columns owned by the calling processor. More... | |
| virtual int | NumMyDiagonals () const |
| Returns the number of local nonzero diagonal entries, based on global row/column index comparisons. More... | |
| virtual bool | LowerTriangular () const |
| If matrix is lower triangular in local index space, this query returns true, otherwise it returns false. More... | |
| virtual bool | UpperTriangular () const |
| If matrix is upper triangular in local index space, this query returns true, otherwise it returns false. More... | |
| virtual const Epetra_Map & | RowMatrixRowMap () const |
| Returns the Epetra_Map object associated with the rows of this matrix. More... | |
| virtual const Epetra_Map & | RowMatrixColMap () const |
| Returns the Epetra_Map object associated with the columns of this matrix. More... | |
| virtual const Epetra_Import * | RowMatrixImporter () const |
| Returns the Epetra_Import object that contains the import operations for distributed operations. More... | |
Public Member Functions inherited from LOCA::Epetra::LowRankUpdateOp | |
| LowRankUpdateOp (const Teuchos::RCP< LOCA::GlobalData > &global_data, const Teuchos::RCP< Epetra_Operator > &jacOperator, const Teuchos::RCP< const Epetra_MultiVector > &U_multiVec, const Teuchos::RCP< const Epetra_MultiVector > &V_multiVec, bool setup_for_solve) | |
| Constructor. More... | |
| virtual | ~LowRankUpdateOp () |
| Destructor. | |
| virtual int | SetUseTranspose (bool UseTranspose) |
| Set to true if the transpose of the operator is requested. More... | |
| virtual int | Apply (const Epetra_MultiVector &Input, Epetra_MultiVector &Result) const |
| Returns the result of a Epetra_Operator applied to a Epetra_MultiVector Input in Result as described above. More... | |
| virtual int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const |
| This method does nothing. More... | |
| virtual double | NormInf () const |
| Returns an approximate infinity norm of the operator matrix. More... | |
| virtual const char * | Label () const |
| Returns a character std::string describing the operator. More... | |
| virtual bool | UseTranspose () const |
| Returns the current UseTranspose setting. Always returns false. More... | |
| virtual bool | HasNormInf () const |
| Returns true if the this object can provide an approximate Inf-norm, false otherwise. More... | |
| virtual const Epetra_Comm & | Comm () const |
| Returns a reference to the Epetra_Comm communicator associated with this operator. More... | |
| virtual const Epetra_Map & | OperatorDomainMap () const |
| Returns the Epetra_Map object associated with the domain of this matrix operator. More... | |
| virtual const Epetra_Map & | OperatorRangeMap () const |
| Returns the Epetra_Map object associated with the range of this matrix operator. More... | |
| virtual int | SetUseTranspose (bool UseTranspose)=0 |
| virtual int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
| virtual int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
| virtual double | NormInf () const=0 |
| virtual const char * | Label () const=0 |
| virtual bool | UseTranspose () const=0 |
| virtual bool | HasNormInf () const=0 |
| virtual const Epetra_Comm & | Comm () const=0 |
| virtual const Epetra_Map & | OperatorDomainMap () const=0 |
| virtual const Epetra_Map & | OperatorRangeMap () const=0 |
| virtual int | SetUseTranspose (bool UseTranspose)=0 |
| virtual int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
| virtual int | ApplyInverse (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
| virtual double | NormInf () const=0 |
| virtual const char * | Label () const=0 |
| virtual bool | UseTranspose () const=0 |
| virtual bool | HasNormInf () const=0 |
| virtual const Epetra_Comm & | Comm () const=0 |
| virtual const Epetra_Map & | OperatorDomainMap () const=0 |
| virtual const Epetra_Map & | OperatorRangeMap () const=0 |
| virtual int | NumMyRowEntries (int MyRow, int &NumEntries) const=0 |
| virtual int | MaxNumEntries () const=0 |
| virtual int | ExtractMyRowCopy (int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const=0 |
| virtual int | ExtractDiagonalCopy (Epetra_Vector &Diagonal) const=0 |
| virtual int | Multiply (bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
| virtual int | Solve (bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
| virtual int | InvRowSums (Epetra_Vector &x) const=0 |
| virtual int | LeftScale (const Epetra_Vector &x)=0 |
| virtual int | InvColSums (Epetra_Vector &x) const=0 |
| virtual int | RightScale (const Epetra_Vector &x)=0 |
| virtual bool | Filled () const=0 |
| virtual double | NormInf () const=0 |
| virtual double | NormOne () const=0 |
| virtual int | NumGlobalNonzeros () const=0 |
| virtual int | NumGlobalRows () const=0 |
| virtual int | NumGlobalCols () const=0 |
| virtual int | NumGlobalDiagonals () const=0 |
| virtual int | NumMyNonzeros () const=0 |
| virtual int | NumMyRows () const=0 |
| virtual int | NumMyCols () const=0 |
| virtual int | NumMyDiagonals () const=0 |
| virtual bool | LowerTriangular () const=0 |
| virtual bool | UpperTriangular () const=0 |
| virtual const Epetra_Map & | RowMatrixRowMap () const=0 |
| virtual const Epetra_Map & | RowMatrixColMap () const=0 |
| virtual const Epetra_Import * | RowMatrixImporter () const=0 |
| virtual int | NumMyRowEntries (int MyRow, int &NumEntries) const=0 |
| virtual int | MaxNumEntries () const=0 |
| virtual int | ExtractMyRowCopy (int MyRow, int Length, int &NumEntries, double *Values, int *Indices) const=0 |
| virtual int | ExtractDiagonalCopy (Epetra_Vector &Diagonal) const=0 |
| virtual int | Multiply (bool TransA, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
| virtual int | Solve (bool Upper, bool Trans, bool UnitDiagonal, const Epetra_MultiVector &X, Epetra_MultiVector &Y) const=0 |
| virtual int | InvRowSums (Epetra_Vector &x) const=0 |
| virtual int | LeftScale (const Epetra_Vector &x)=0 |
| virtual int | InvColSums (Epetra_Vector &x) const=0 |
| virtual int | RightScale (const Epetra_Vector &x)=0 |
| virtual bool | Filled () const=0 |
| virtual double | NormInf () const=0 |
| virtual double | NormOne () const=0 |
| virtual int | NumGlobalNonzeros () const=0 |
| virtual int | NumGlobalRows () const=0 |
| virtual int | NumGlobalCols () const=0 |
| virtual int | NumGlobalDiagonals () const=0 |
| virtual int | NumMyNonzeros () const=0 |
| virtual int | NumMyRows () const=0 |
| virtual int | NumMyCols () const=0 |
| virtual int | NumMyDiagonals () const=0 |
| virtual bool | LowerTriangular () const=0 |
| virtual bool | UpperTriangular () const=0 |
| virtual const Epetra_Map & | RowMatrixRowMap () const=0 |
| virtual const Epetra_Map & | RowMatrixColMap () const=0 |
| virtual const Epetra_Import * | RowMatrixImporter () const=0 |
| virtual const Epetra_BlockMap & | Map () const=0 |
| virtual const Epetra_BlockMap & | Map () const=0 |
Protected Member Functions | |
| double | computeUV (int MyRow, int MyCol) const |
Compute MyRow, MyCol entry of . | |
Protected Attributes | |
| Teuchos::RCP< Epetra_RowMatrix > | J_rowMatrix |
| Stores row matrix representing J. | |
| Teuchos::RCP< Epetra_MultiVector > | nonconst_U |
| Stores pointer to non-const U. | |
| Teuchos::RCP< Epetra_MultiVector > | nonconst_V |
| Stores pointer to non-const V. | |
| bool | includeUV |
| Flag indicating whether to include U*V^T terms. | |
| int | m |
| Number of columns in U and V. | |
| const Epetra_BlockMap & | U_map |
| Map for U. | |
| const Epetra_BlockMap & | V_map |
| Map for V. | |
| const Epetra_BlockMap & | row_map |
| Row map for J. | |
Protected Attributes inherited from LOCA::Epetra::LowRankUpdateOp | |
| Teuchos::RCP< LOCA::GlobalData > | globalData |
| Global data object. | |
| std::string | label |
| Label for operator. | |
| Epetra_LocalMap | localMap |
| Local map for generating temporary matrices. | |
| Teuchos::RCP< Epetra_Operator > | J |
| Stores operator representing J. | |
| Teuchos::RCP< const Epetra_MultiVector > | U |
| Stores multivector representing U. | |
| Teuchos::RCP< const Epetra_MultiVector > | V |
| Stores multivector representing V. | |
| bool | useTranspose |
| Flag indicating whether to use the transpose. | |
| Teuchos::RCP< Epetra_MultiVector > | tmpMat |
| Temporary matrix. | |
| Teuchos::RCP< Epetra_MultiVector > | JinvU |
| Stores J^{-1}*U. | |
| Teuchos::RCP< Epetra_MultiVector > | lu |
| Stores LU factorization of I + V^T*J^{-1}*U. | |
| std::vector< int > | ipiv |
| Stores pivots for LU factorization. | |
| Teuchos::LAPACK< int, double > | lapack |
| Lapack wrappers. | |
An Epetra row matrix for implementing the operator
.
This class implements the Epetra_RowMatrix interface for
where
is an Epetra_RowMatrix and
and
are Epetra_MultiVectors. It is derived from LOCA::Epetra::LowRankUpdateOp to implement the Epetra_Operator interface. The interface here implements the Epetra_RowMatrix interface when the matrix
is itself a row matrix. This allows preconditioners to be computed and scaling in linear systems to be performed when using this operator. The implementation here merely adds the corresponding entries for
to the rows of
. Note however this is only an approximation to the true matrix
.
This class assumes
and
have the same distribution as the rows of
.
| LOCA::Epetra::LowRankUpdateRowMatrix::LowRankUpdateRowMatrix | ( | const Teuchos::RCP< LOCA::GlobalData > & | global_data, |
| const Teuchos::RCP< Epetra_RowMatrix > & | jacRowMatrix, | ||
| const Teuchos::RCP< Epetra_MultiVector > & | U_multiVec, | ||
| const Teuchos::RCP< Epetra_MultiVector > & | V_multiVec, | ||
| bool | setup_for_solve, | ||
| bool | include_UV_terms | ||
| ) |
Constructor.
| global_data | [in] The global data object |
| jacRowMatrix | [in] Jacobian operator J as a row matrix |
| U_multiVec | [in] Multivector representing U |
| V_multiVec | [in] Multivector representing V |
| setup_for_solve | [in] Setup data structures for ApplyInverse() |
| include_UV_terms | [in] Include terms in RowMatrix routines ExtractRowCopy(), ExtactDiagonalCopy(), InvRowSums(), InvColSums(), NormInf() and NormOne(). |
|
virtual |
Returns a copy of the main diagonal in a user-provided vector.
Implements Epetra_RowMatrix.
|
virtual |
Returns a copy of the specified local row in user-provided arrays.
Implements Epetra_RowMatrix.
|
virtual |
If FillComplete() has been called, this query returns true, otherwise it returns false.
Implements Epetra_RowMatrix.
|
virtual |
Computes the sum of absolute values of the columns of the Epetra_RowMatrix, results returned in x.
Implements Epetra_RowMatrix.
References Epetra_MultiVector::PutScalar(), and Epetra_MultiVector::Reciprocal().
|
virtual |
Computes the sum of absolute values of the rows of the Epetra_RowMatrix, results returned in x.
Implements Epetra_RowMatrix.
References Epetra_MultiVector::PutScalar(), and Epetra_MultiVector::Reciprocal().
|
virtual |
Scales the Epetra_RowMatrix on the left with a Epetra_Vector x.
Implements Epetra_RowMatrix.
|
virtual |
If matrix is lower triangular in local index space, this query returns true, otherwise it returns false.
Implements Epetra_RowMatrix.
|
virtual |
Returns a reference to the Epetra_BlockMap for this object.
Implements Epetra_SrcDistObject.
|
virtual |
Returns the maximum of NumMyRowEntries() over all rows.
Implements Epetra_RowMatrix.
|
virtual |
Returns the result of a Epetra_RowMatrix multiplied by a Epetra_MultiVector X in Y.
Implements Epetra_RowMatrix.
References Epetra_MultiVector::Multiply(), and Epetra_MultiVector::NumVectors().
|
virtual |
Returns the infinity norm of the global matrix.
Implements Epetra_RowMatrix.
References Epetra_MultiVector::MaxValue(), and Epetra_MultiVector::Reciprocal().
|
virtual |
Returns the one norm of the global matrix.
Implements Epetra_RowMatrix.
References Epetra_MultiVector::MaxValue(), and Epetra_MultiVector::Reciprocal().
|
virtual |
Returns the number of global matrix columns.
Implements Epetra_RowMatrix.
|
virtual |
Returns the number of global nonzero diagonal entries, based on global row/column index comparisons.
Implements Epetra_RowMatrix.
|
virtual |
Returns the number of nonzero entries in the global matrix.
Implements Epetra_RowMatrix.
|
virtual |
Returns the number of global matrix rows.
Implements Epetra_RowMatrix.
|
virtual |
Returns the number of matrix columns owned by the calling processor.
Implements Epetra_RowMatrix.
|
virtual |
Returns the number of local nonzero diagonal entries, based on global row/column index comparisons.
Implements Epetra_RowMatrix.
|
virtual |
Returns the number of nonzero entries in the calling processor's portion of the matrix.
Implements Epetra_RowMatrix.
|
virtual |
Returns the number of nonzero entries in MyRow.
Implements Epetra_RowMatrix.
|
virtual |
Returns the number of matrix rows owned by the calling processor.
Implements Epetra_RowMatrix.
|
virtual |
Scales the Epetra_RowMatrix on the right with a Epetra_Vector x.
Implements Epetra_RowMatrix.
|
virtual |
Returns the Epetra_Map object associated with the columns of this matrix.
Implements Epetra_RowMatrix.
|
virtual |
Returns the Epetra_Import object that contains the import operations for distributed operations.
Implements Epetra_RowMatrix.
|
virtual |
Returns the Epetra_Map object associated with the rows of this matrix.
Implements Epetra_RowMatrix.
|
virtual |
Returns result of a local-only solve using a triangular Epetra_RowMatrix with Epetra_MultiVectors X and Y.
Implements Epetra_RowMatrix.
|
virtual |
If matrix is upper triangular in local index space, this query returns true, otherwise it returns false.
Implements Epetra_RowMatrix.