GEOS
|
Wrapper class for Epetra's CrsMatrix. More...
#include <EpetraMatrix.hpp>
Public Types | |
using | Vector = EpetraVector |
Compatible vector type. | |
using | Export = EpetraExport |
Associated exporter type. | |
Public Types inherited from geos::LinearOperator< EpetraVector > | |
using | Vector = EpetraVector |
Alias for template parameter. | |
Public Member Functions | |
Epetra_FECrsMatrix const & | unwrapped () const |
Returns a const pointer to the underlying matrix. More... | |
Epetra_FECrsMatrix & | unwrapped () |
Returns a non-const pointer to the underlying matrix. More... | |
Constructor/Destructor methods | |
EpetraMatrix () | |
Empty matrix constructor. More... | |
EpetraMatrix (EpetraMatrix const &src) | |
Copy constructor. More... | |
EpetraMatrix (EpetraMatrix &&src) noexcept | |
Move constructor. More... | |
EpetraMatrix & | operator= (EpetraMatrix const &src) |
Copy assignment. More... | |
EpetraMatrix & | operator= (EpetraMatrix &&src) noexcept |
Move assignment. More... | |
virtual | ~EpetraMatrix () override |
Virtual destructor. | |
MatrixBase interface | |
virtual void | createWithLocalSize (localIndex const localRows, localIndex const localCols, localIndex const maxEntriesPerRow, MPI_Comm const &comm) override |
Create a rectangular matrix from number of rows/columns. More... | |
virtual void | createWithGlobalSize (globalIndex const globalRows, globalIndex const globalCols, localIndex const maxEntriesPerRow, MPI_Comm const &comm) override |
Create a rectangular matrix from number of rows/columns. More... | |
virtual void | open () override |
Open matrix for adding new entries. More... | |
virtual void | close () override |
Assemble and compress the matrix. More... | |
virtual bool | created () const override |
Query matrix creation status. More... | |
virtual void | reset () override |
Reset the matrix to default state. | |
virtual void | set (real64 const value) override |
Set all non-zero elements to a value. More... | |
virtual void | zero () override |
Set all elements to zero. | |
virtual void | add (globalIndex const rowIndex, globalIndex const colIndex, real64 const value) override |
Add to one element. More... | |
virtual void | set (globalIndex const rowIndex, globalIndex const colIndex, real64 const value) override |
Set one element. More... | |
virtual void | insert (globalIndex const rowIndex, globalIndex const colIndex, real64 const value) override |
Insert one element. More... | |
virtual void | add (globalIndex const rowIndex, globalIndex const *colIndices, real64 const *values, localIndex const size) override |
Add elements to one row using c-style arrays. More... | |
virtual void | set (globalIndex const rowIndex, globalIndex const *colIndices, real64 const *values, localIndex const size) override |
Set elements to one row using c-style arrays. More... | |
virtual void | insert (globalIndex const rowIndex, globalIndex const *colIndices, real64 const *values, localIndex const size) override |
Insert elements to one row using c-style arrays. More... | |
virtual void | add (globalIndex const rowIndex, arraySlice1d< globalIndex const > const &colIndices, arraySlice1d< real64 const > const &values) override |
Add elements to one row using array1d. More... | |
virtual void | set (globalIndex const rowIndex, arraySlice1d< globalIndex const > const &colIndices, arraySlice1d< real64 const > const &values) override |
Set elements of one row using array1d. More... | |
virtual void | insert (globalIndex const rowIndex, arraySlice1d< globalIndex const > const &colIndices, arraySlice1d< real64 const > const &values) override |
Insert elements of one row using array1d. More... | |
virtual void | add (arraySlice1d< globalIndex const > const &rowIndices, arraySlice1d< globalIndex const > const &colIndices, arraySlice2d< real64 const > const &values) override |
Add a dense block of values. More... | |
virtual void | set (arraySlice1d< globalIndex const > const &rowIndices, arraySlice1d< globalIndex const > const &colIndices, arraySlice2d< real64 const > const &values) override |
Set a dense block of values. More... | |
virtual void | insert (arraySlice1d< globalIndex const > const &rowIndices, arraySlice1d< globalIndex const > const &colIndices, arraySlice2d< real64 const > const &values) override |
Insert a dense block of values. More... | |
virtual void | add (globalIndex const *rowIndices, globalIndex const *colIndices, real64 const *values, localIndex const numRows, localIndex const numCols) override |
Add a dense block of values. More... | |
virtual void | set (globalIndex const *rowIndices, globalIndex const *colIndices, real64 const *values, localIndex const numRows, localIndex const numCols) override |
Set a dense block of values. More... | |
virtual void | insert (globalIndex const *rowIndices, globalIndex const *colIndices, real64 const *values, localIndex const numRows, localIndex const numCols) override |
Insert dense matrix. More... | |
virtual void | insert (arrayView1d< globalIndex const > const &rowIndices, arrayView1d< globalIndex const > const &colIndices, arrayView1d< real64 const > const &values) override |
Insert values stored in 3 linear vectors. More... | |
virtual void | apply (EpetraVector const &src, EpetraVector &dst) const override |
Apply operator to a vector, dst = this(src) . More... | |
virtual void | applyTranspose (EpetraVector const &src, EpetraVector &dst) const override |
Apply transpose of the matrix to a vector. More... | |
virtual void | multiply (EpetraMatrix const &src, EpetraMatrix &dst) const override |
Matrix/Matrix multiplication. More... | |
virtual void | leftMultiplyTranspose (EpetraMatrix const &src, EpetraMatrix &dst) const override |
Matrix/Matrix transpose multiplication. More... | |
virtual void | rightMultiplyTranspose (EpetraMatrix const &src, EpetraMatrix &dst) const override |
Matrix/Matrix transpose multiplication. More... | |
virtual void | multiplyRAP (EpetraMatrix const &R, EpetraMatrix const &P, EpetraMatrix &dst) const override |
Compute the triple product dst = R * this * P More... | |
virtual void | multiplyPtAP (EpetraMatrix const &P, EpetraMatrix &dst) const override |
Compute the triple product dst = P^T * this * P More... | |
virtual void | gemv (real64 const alpha, EpetraVector const &x, real64 const beta, EpetraVector &y, bool useTranspose=false) const override |
Compute gemv y = alpha*A*x + beta*y . More... | |
virtual void | scale (real64 const scalingFactor) override |
Multiply all elements by scalingFactor. More... | |
virtual void | leftScale (EpetraVector const &vec) override |
Pre-multiplies (left) with diagonal matrix consisting of the values in vec. More... | |
virtual void | rightScale (EpetraVector const &vec) override |
Post-multiplies (right) with diagonal matrix consisting of the values in vec. More... | |
virtual void | leftRightScale (EpetraVector const &vecLeft, EpetraVector const &vecRight) override |
Post-multiplies (right) with diagonal matrix consisting of the values in vecRight and pre-multiplies (left) with diagonal matrix consisting of the values in vec. More... | |
virtual void | rescaleRows (arrayView1d< globalIndex const > const &rowIndices, RowSumType const rowSumType) override |
Rescales selected rows of matrix using row sum reciprocal as a factor. More... | |
virtual void | transpose (EpetraMatrix &dst) const override |
Matrix transposition. More... | |
virtual void | separateComponentFilter (EpetraMatrix &dst, integer const dofsPerNode) const override |
Apply a separate component approximation (filter) to this matrix. More... | |
virtual real64 | clearRow (globalIndex const row, bool const keepDiag=false, real64 const diagValue=0.0) override |
Clear a row, and optionally set diagonal element to diagValue . More... | |
virtual void | addEntries (EpetraMatrix const &src, MatrixPatternOp const op, real64 const scale) override |
Add entries of another matrix to this. More... | |
virtual void | addDiagonal (EpetraVector const &src, real64 const scale) override |
Add (scaled) entries of a vector to the diagonal of this matrix. More... | |
virtual void | clampEntries (real64 const lo, real64 const hi, bool const excludeDiag) override |
Clamp each matrix value between values of lo and hi . More... | |
virtual localIndex | maxRowLength () const override |
Returns the number of nonzero entries in the longest row of the matrix. More... | |
virtual localIndex | rowLength (globalIndex const globalRowIndex) const override |
Get row length via global row index. More... | |
virtual void | getRowLengths (arrayView1d< localIndex > const &lengths) const override |
Get the row lengths of every local row. More... | |
virtual void | getRowCopy (globalIndex globalRow, arraySlice1d< globalIndex > const &colIndices, arraySlice1d< real64 > const &values) const override |
Returns a copy of the data in row globalRow . More... | |
virtual void | extractDiagonal (EpetraVector &dst) const override |
Extract diagonal values into a vector. More... | |
virtual void | getRowSums (EpetraVector &dst, RowSumType const rowSumType) const override |
Populate a vector with row sums of this . More... | |
virtual globalIndex | numGlobalRows () const override |
Get the number of global rows. More... | |
virtual globalIndex | numGlobalCols () const override |
Get the number of global columns. More... | |
virtual localIndex | numLocalRows () const override |
Get the number of local rows. More... | |
virtual localIndex | numLocalCols () const override |
Get the number of local columns. More... | |
virtual globalIndex | ilower () const override |
Returns the index of the first global row owned by that processor. More... | |
virtual globalIndex | iupper () const override |
Returns index one past the last global row owned by that processor. More... | |
virtual globalIndex | jlower () const override |
Returns the index of the first global col owned by that processor. More... | |
virtual globalIndex | jupper () const override |
Returns index one past the last global col owned by that processor. More... | |
virtual localIndex | numLocalNonzeros () const override |
Returns the number of nonzeros in the local portion of the matrix. More... | |
virtual globalIndex | numGlobalNonzeros () const override |
Returns the total number of nonzeros in the matrix. More... | |
virtual real64 | normInf () const override |
Returns the infinity norm of the matrix. More... | |
virtual real64 | norm1 () const override |
Returns the one norm of the matrix. More... | |
virtual real64 | normFrobenius () const override |
Returns the Frobenius norm of the matrix. More... | |
virtual real64 | normMax () const override |
Returns the max norm of the matrix (the largest absolute element value). More... | |
virtual real64 | normMax (arrayView1d< globalIndex const > const &rowIndices) const override |
Returns the max norm of the matrix on a subset of rows. More... | |
virtual localIndex | getLocalRowID (globalIndex const index) const override |
Map a global row index to local row index. More... | |
virtual globalIndex | getGlobalRowID (localIndex const index) const override |
Map a local row index to global row index. More... | |
virtual MPI_Comm | comm () const override |
Get the MPI communicator the matrix was created with. More... | |
virtual void | print (std::ostream &os=std::cout) const override |
Print the matrix in Trilinos format to a stream. More... | |
virtual void | write (string const &filename, LAIOutputFormat const format=LAIOutputFormat::MATRIX_MARKET) const override |
Write the matrix to filename in a matlab-compatible format. More... | |
virtual void | createWithLocalSize (localIndex const localSize, localIndex const maxEntriesPerRow, MPI_Comm const &comm) |
Create a square matrix from local number of rows. More... | |
virtual void | createWithLocalSize (localIndex const localRows, localIndex const localCols, localIndex const maxEntriesPerRow, MPI_Comm const &comm)=0 |
Create a rectangular matrix from number of rows/columns. More... | |
virtual void | createWithGlobalSize (globalIndex const globalSize, localIndex const maxEntriesPerRow, MPI_Comm const &comm) |
Create a square matrix from global number of rows. More... | |
virtual void | createWithGlobalSize (globalIndex const globalRows, globalIndex const globalCols, localIndex const maxEntriesPerRow, MPI_Comm const &comm)=0 |
Create a rectangular matrix from number of rows/columns. More... | |
virtual void | create (CRSMatrixView< real64 const, globalIndex const > const &localMatrix, localIndex const numLocalColumns, MPI_Comm const &comm) |
Create parallel matrix from a local CRS matrix. More... | |
bool | closed () const |
Query matrix closed status. More... | |
bool | assembled () const |
Query matrix assembled status. More... | |
bool | insertable () const |
Query matrix status. More... | |
bool | modifiable () const |
Query matrix status. More... | |
bool | ready () const |
Query matrix ready status. More... | |
virtual void | residual (Vector const &x, Vector const &b, Vector &r) const override |
Compute residual r = b - A * x . More... | |
void | setDofManager (DofManager const *const dofManager) |
Associate a DofManager with this matrix. More... | |
DofManager const * | dofManager () const |
Public Member Functions inherited from geos::LinearOperator< EpetraVector > | |
LinearOperator ()=default | |
Constructor. | |
virtual | ~LinearOperator ()=default |
Destructor. | |
Wrapper class for Epetra's CrsMatrix.
Definition at line 39 of file EpetraMatrix.hpp.
geos::EpetraMatrix::EpetraMatrix | ( | ) |
Empty matrix constructor.
Create an empty (distributed) matrix.
geos::EpetraMatrix::EpetraMatrix | ( | EpetraMatrix const & | src | ) |
Copy constructor.
[in] | src | the matrix to be copied |
|
noexcept |
Move constructor.
[in] | src | the matrix to be copied |
|
overridevirtual |
Add a dense block of values.
rowIndices | Global row indices |
colIndices | Global col indices |
values | Dense local matrix of values |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Add a dense block of values.
rowIndices | Global row indices |
colIndices | Global col indices |
values | Dense local matrix of values |
numRows | Number of row indices |
numCols | Number of column indices |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Add elements to one row using array1d.
rowIndex | Global row index |
colIndices | Global column indices |
values | Values to add to prescribed locations |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Add elements to one row using c-style arrays.
rowIndex | Global row index |
colIndices | Global column indices |
values | Values to add to prescribed locations |
size | Number of elements |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Add to one element.
rowIndex | Global row index |
colIndex | Global column index |
value | Value to add to prescribed location |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Add (scaled) entries of a vector to the diagonal of this matrix.
src | the source vector |
scale | optional scaling factor |
this
must be square and have a (possibly zero) diagonal entry in every row. this
and src
must have the same parallel row distribution. Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Add entries of another matrix to this.
src | the source matrix |
op | handling of nonzero patterns, see MatrixPatternOp |
scale | factor to scale entries of src by |
this
must be a superset of sparsity of src
. this
and src
must have the same parallel row distribution. Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Apply operator to a vector, dst = this(src)
.
src | input vector |
dst | output vector |
src
and dst
cannot alias the same vector (some implementations may allow this). Implements geos::LinearOperator< EpetraVector >.
|
overridevirtual |
Apply transpose of the matrix to a vector.
src | Input vector (x). |
dst | Output vector (b). |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
inline |
Query matrix assembled status.
true
if matrix has been opened and closed since creation; false
otherwise Definition at line 108 of file MatrixBase.hpp.
|
overridevirtual |
Clamp each matrix value between values of lo
and hi
.
lo | min value |
hi | max value |
excludeDiag | iff true , diagonal values are unchanged |
Effectively sets each matrix value v to min(max(v, lo), hi).
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Clear a row, and optionally set diagonal element to diagValue
.
row | globalIndex of the row to be cleared. |
diagValue | (Optional) set diagonal element to desired value. |
keepDiag | if true , diagValue is ignored and original diagonal is preserved |
diagValue
and keepDiag
are ignored if the matrix is not square Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Assemble and compress the matrix.
Compresses the matrix to CSR format with contiguous memory on each processor. Prevents from adding new entries in the sparsity pattern but allows for modification of existing entries.
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
inline |
Query matrix closed status.
true
if matrix has been opened and has not been closed since; false
otherwise Definition at line 102 of file MatrixBase.hpp.
|
overridevirtual |
Get the MPI communicator the matrix was created with.
create
...()Implements geos::LinearOperator< EpetraVector >.
|
inline |
Create parallel matrix from a local CRS matrix.
localMatrix | The input local matrix. |
numLocalColumns | number of local columns (not available from localMatrix in general) |
comm | The MPI communicator to use. |
localMatrix
does not need to retain its values after the call. Definition at line 248 of file MatrixBase.hpp.
|
overridevirtual |
Query matrix creation status.
true
if matrix has been created Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Create a rectangular matrix from number of rows/columns.
comm | MPI communicator. |
globalRows | Global number of rows. |
globalCols | Global number of columns. |
maxEntriesPerRow | Maximum number of entries per row (hint). |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
virtual void geos::MatrixBase< MATRIX, VECTOR >::createWithGlobalSize |
Create a rectangular matrix from number of rows/columns.
comm | MPI communicator. |
globalRows | Global number of rows. |
globalCols | Global number of columns. |
maxEntriesPerRow | Maximum number of entries per row (hint). |
|
inline |
Create a square matrix from global number of rows.
Create a square matrix with an (approximately) even partitioning of rows.
globalSize | Global dimensions for a square matrix. |
maxEntriesPerRow | Maximum number of non-zero entries per row. |
comm | MPI communicator. |
Definition at line 204 of file MatrixBase.hpp.
|
overridevirtual |
Create a rectangular matrix from number of rows/columns.
comm | MPI communicator. |
localRows | Local number of rows. |
localCols | Local number of columns. |
maxEntriesPerRow | Maximum number of entries per row (hint). |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
virtual void geos::MatrixBase< MATRIX, VECTOR >::createWithLocalSize |
Create a rectangular matrix from number of rows/columns.
comm | MPI communicator. |
localRows | Local number of rows. |
localCols | Local number of columns. |
maxEntriesPerRow | Maximum number of entries per row (hint). |
|
inline |
Create a square matrix from local number of rows.
localSize | local number of rows for square matrix. |
maxEntriesPerRow | Maximum number of non-zero entries per row. |
comm | MPI communicator. |
Definition at line 186 of file MatrixBase.hpp.
|
inline |
Definition at line 165 of file MatrixBase.hpp.
|
overridevirtual |
Extract diagonal values into a vector.
dst | the target vector, must have the same row partitioning as this |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Compute gemv y = alpha*A*x + beta*y
.
alpha | Scalar factor for added matvec product. |
x | Input vector. |
beta | Scalar factor for right hand side. |
y | Output vector. |
useTranspose | Boolean, set to true to use A^T . |
x
and y
cannot alias the same vector. Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Map a local row index to global row index.
index | the local row index (between 0 and number of local rows) |
index
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Map a global row index to local row index.
index | the global row index |
index
, or -1 if not a local row Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Returns a copy of the data in row globalRow
.
[in] | globalRow | the index of global row to extract |
[out] | colIndices | the output array of global column indices (must have a large enough size) |
[out] | values | the output array of values (must have a large enough size) |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Get the row lengths of every local row.
lengths | an array view to be populated with row lengths |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Populate a vector with row sums of this
.
dst | the target vector, must have the same row partitioning as this |
rowSumType | type of row sum operation to perform |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Returns the index of the first global row owned by that processor.
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Insert a dense block of values.
rowIndices | Global row indices |
colIndices | Global col indices |
values | Dense local matrix of values |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Insert values stored in 3 linear vectors.
rowIndices | Array of global row indices |
colIndices | Array of global column indices |
values | Array of values |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Insert dense matrix.
rowIndices | Global row indices |
colIndices | Global col indices |
values | Dense local matrix of values |
numRows | Number of row indices |
numCols | Number of column indices |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Insert elements of one row using array1d.
rowIndex | Global row index |
colIndices | Global column indices |
values | Values to add to prescribed locations |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Insert elements to one row using c-style arrays.
rowIndex | Global row index |
colIndices | Global column indices |
values | Values to add to prescribed locations |
size | Number of elements |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Insert one element.
rowIndex | Global row index |
colIndex | Global column index |
value | Value to insert at prescribed location |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
inline |
Query matrix status.
true
if matrix has NOT been assembled yet (not closed since last create() call) and is currently open for insertion of new entries Definition at line 130 of file MatrixBase.hpp.
|
overridevirtual |
Returns index one past the last global row owned by that processor.
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Returns the index of the first global col owned by that processor.
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Returns index one past the last global col owned by that processor.
jlower()
about the meaning of "owned" columns. Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Matrix/Matrix transpose multiplication.
Compute this^T * B = C
.
src | Input matrix (B). |
dst | Output matrix (C). |
dst
doesn't need to be created beforehand. Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Post-multiplies (right) with diagonal matrix consisting of the values in vecRight and pre-multiplies (left) with diagonal matrix consisting of the values in vec.
vecLeft | vec to pre-multiply with. |
vecRight | vec to post-multiply with. |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Pre-multiplies (left) with diagonal matrix consisting of the values in vec.
vec | Vector to pre-multiply with. |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Returns the number of nonzero entries in the longest row of the matrix.
Collective.
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
inline |
Query matrix status.
true
if matrix has been assembled and is currently open; this implies individual entries within existing sparsity pattern can be altered via set()/add() methods. Definition at line 123 of file MatrixBase.hpp.
|
overridevirtual |
Matrix/Matrix multiplication.
Compute this * B = C
.
src | Input matrix (B). |
dst | Output matrix (C). |
dst
doesn't need to be created beforehand. Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Compute the triple product dst = P^T * this * P
P | the "prolongation" matrix |
dst | the resulting product matrix (will be re-created as needed) |
Reimplemented from geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Compute the triple product dst = R * this * P
R | the "restriction" matrix |
P | the "prolongation" matrix |
dst | the resulting product matrix (will be re-created as needed) |
Reimplemented from geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Returns the one norm of the matrix.
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Returns the Frobenius norm of the matrix.
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Returns the infinity norm of the matrix.
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Returns the max norm of the matrix (the largest absolute element value).
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Returns the max norm of the matrix on a subset of rows.
rowIndices | global indices of rows to compute norm over |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Get the number of global columns.
Implements geos::LinearOperator< EpetraVector >.
|
overridevirtual |
Returns the total number of nonzeros in the matrix.
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Get the number of global rows.
Implements geos::LinearOperator< EpetraVector >.
|
overridevirtual |
Get the number of local columns.
Implements geos::LinearOperator< EpetraVector >.
|
overridevirtual |
Returns the number of nonzeros in the local portion of the matrix.
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Get the number of local rows.
Implements geos::LinearOperator< EpetraVector >.
|
overridevirtual |
Open matrix for adding new entries.
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
noexcept |
Move assignment.
src | matrix to be moved from. |
EpetraMatrix& geos::EpetraMatrix::operator= | ( | EpetraMatrix const & | src | ) |
Copy assignment.
src | matrix to be copied. |
|
overridevirtual |
Print the matrix in Trilinos format to a stream.
os | the output stream |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
inline |
Query matrix ready status.
true
if matrix has been assembled and is currently closed; this implies it's ready to be used or re-opened for adding/setting values Definition at line 115 of file MatrixBase.hpp.
|
overridevirtual |
Rescales selected rows of matrix using row sum reciprocal as a factor.
rowIndices | global indicies of rows to scale (all must be locally owned) |
rowSumType | type of row sums to use as scaling factors |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
inlineoverride |
Compute residual r = b - A * x
.
Overrides LinearOperator::residual().
x | Input solution. |
b | Input right hand side. |
r | Output residual. |
x
and r
cannot alias the same vector, but b
and r
can. Definition at line 551 of file MatrixBase.hpp.
|
overridevirtual |
Matrix/Matrix transpose multiplication.
Compute B * this^T = C
.
src | Input matrix (B). |
dst | Output matrix (C). |
dst
doesn't need to be created beforehand. Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Post-multiplies (right) with diagonal matrix consisting of the values in vec.
vec | Vector to post-multiply with. |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Get row length via global row index.
[in] | globalRowIndex | the global row index |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Multiply all elements by scalingFactor.
scalingFactor | Scaling factor. |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Apply a separate component approximation (filter) to this matrix.
dst | the target (filtered) matrix |
dofPerPoint | number of degrees-of-freedom per node |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Set a dense block of values.
rowIndices | Global row indices |
colIndices | Global col indices |
values | Dense local matrix of values |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Set a dense block of values.
rowIndices | Global row indices |
colIndices | Global col indices |
values | Dense local matrix of values |
numRows | Number of row indices |
numCols | Number of column indices |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Set elements of one row using array1d.
rowIndex | Global row index |
colIndices | Global column indices |
values | Values to add to prescribed locations |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Set elements to one row using c-style arrays.
rowIndex | Global row index |
colIndices | Global column indices |
values | Values to add to prescribed locations |
size | Number of elements |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Set one element.
rowIndex | Global row index |
colIndex | Global column index |
value | Value to set at prescribed location |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
overridevirtual |
Set all non-zero elements to a value.
value | the value to set all elements to |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
|
inline |
Associate a DofManager with this matrix.
dofManager | the DofManager containing the relevant degrees of freedom |
Definition at line 157 of file MatrixBase.hpp.
|
overridevirtual |
Matrix transposition.
Compute B = this^T
.
dst | Output matrix (B). |
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.
Epetra_FECrsMatrix& geos::EpetraMatrix::unwrapped | ( | ) |
Returns a non-const pointer to the underlying matrix.
Epetra_FECrsMatrix const& geos::EpetraMatrix::unwrapped | ( | ) | const |
Returns a const pointer to the underlying matrix.
|
overridevirtual |
Write the matrix to filename in a matlab-compatible format.
filename | name of the output file |
format | output format |
Within octave / matlab:
load filename M = spconvert(filename_root)
Implements geos::MatrixBase< EpetraMatrix, EpetraVector >.