CEPS
24.01
Cardiac ElectroPhysiology Simulator
|
Sparse matrix distributed between process.
A note about matrix assembly if the implementation is PETSc: PETSc requires to "assemble" a matrix before most of the operations it used for. You can use the finalize() method of this class to do so in a single step.
Due to how PETSc handles assembly, all zero values are compressed out when assembling a matrix: the non-zero structure of the matrix is altered. This is pretty bad as the user has no direct control over this. PETSc documentation says that explicit zeros must be inserted before the final assembly if the extra space is needed.
More details: The non-zero structure is altered at the first "final assembly". If the values where not explicitly set using MatSetValues(...), then the memory is freed, and any attempt to set or add values after that assembly will cause a petsc error saying that a new non-zero caused a malloc. While this can be good for performance in "normal" situations, it is troublesome when we want to simply duplicate a matrix that has just been created, as PETSc refuses to duplicate a non-assembled matrix. Therefore, if we assemble the newly created matrix without setting any value, we lose the non-zero structure... leading to PETSc flooding us with "New nonzero at ..." messages.
Definition at line 75 of file DistributedMatrix.hpp.
#include <DistributedMatrix.hpp>
Public Member Functions | |
DistributedMatrix () | |
Empty constructor. More... | |
DistributedMatrix (CepsInt M, CepsInt N, CepsInt m, CepsInt n) | |
Constructor with numbers of rows and columns. More... | |
DistributedMatrix (const DistributedMatrix &templateMatrix, CepsBool copyValues=false) | |
Constructor with structure template, or copy constructor. More... | |
DistributedMatrix (const CepsString &file) | |
Constructor from a binary file. More... | |
~DistributedMatrix () | |
Destructor. The underlying object is cleaned. More... | |
void | ignoreOffProcEntries (CepsBool flag) |
Choose to ignore entries destined to other processes when setting or adding values in the matrix. More... | |
void | setSymmetric (CepsBool flag=true) |
Set whether this matrix is symmetric or not. More... | |
void | setSize (CepsInt M, CepsInt N, CepsInt m, CepsInt n) |
Set distributed matrix global and local size. More... | |
void | setNonZeroStructure (const CepsInt d_nnz[], const CepsInt o_nnz[]) |
Set the matrix non-zero structure. More... | |
void | setNonZeroStructure (CepsInt d_nz, CepsInt o_nz) |
Set the matrix non-zero structure. More... | |
void | setValue (CepsMathScalar value, CepsGlobalIndex i, CepsGlobalIndex j) |
Sets A(i,j) (replace if existing) More... | |
void | addValue (CepsMathScalar value, CepsGlobalIndex i, CepsGlobalIndex j) |
Adds value to A(i,j) (sets if not existing already) More... | |
void | getValues (CepsMathScalar *values, CepsInt nbRows, CepsInt nbColumns, const CepsGlobalIndex *rowIndices, const CepsGlobalIndex *columnIndices) |
Get multiple values in the matrix. More... | |
void | setValues (const CepsMathScalar *values, CepsInt nbRows, CepsInt nbColumns, const CepsGlobalIndex *rowIndices, const CepsGlobalIndex *columnIndices) |
Set multiple values in the matrix at once. More... | |
void | addValues (const CepsMathScalar *values, CepsInt nbRows, CepsInt nbColumns, const CepsGlobalIndex *rowIndices, const CepsGlobalIndex *columnIndices) |
Add multiple values in the matrix at once. More... | |
void | addSubMatrix (const CepsMathDynamic2D &subMat, const CepsVector< CepsGlobalIndex > &indicesI, const CepsVector< CepsGlobalIndex > &indicesJ) |
Add each element of a small square matrix in a distributed matrix. More... | |
void | getSubMatrix (const CepsVector< CepsGlobalIndex > &indicesI, const CepsVector< CepsGlobalIndex > &indicesJ, CepsMathDynamic2D &subMat) |
Insert each element of a distributed matrix in a small Eigen submatrix. More... | |
void | zeroRowsAndColumns (CepsInt nbRows, CepsGlobalIndex *rows, CepsMathScalar diagonalValue=1.0) |
Sets the indicated rows and columns values to zero for symmetric matrices. More... | |
void | zeroRows (CepsInt nbRows, CepsGlobalIndex *rows, CepsMathScalar diagonalValue=1.0) |
Sets the indicated rows to zero. More... | |
void | zero () |
Zeroes all entries. More... | |
void | identity () |
Sets to identity matrix. Fails if matrix is not square. More... | |
void | add (DistributedMatrix &X, CepsMathScalar a, CepsBool sameNonZeroStructure=true) |
Adds a*X to this . More... | |
CepsMathScalar | lInfNorm () const |
-norm of matrix More... | |
CepsMathScalar | l1Norm () const |
-norm of matrix More... | |
CepsMathScalar | l2Norm () const |
-norm of matrix More... | |
void | copy (DistributedMatrix &A) const |
Copy values from this matrix to matrix A of same non-zero structure. More... | |
void | duplicate (DistributedMatrix &dest, CepsBool copyValues) const |
Copy non-zero structure to dest matrix. Optionally values. More... | |
void | getSize (CepsInt *M, CepsInt *N) const |
Get the global size of the matrix. More... | |
void | getLocalSize (CepsInt *m, CepsInt *n) const |
Get the local size of the matrix. More... | |
void | getLocalRange (CepsGlobalIndex *lo, CepsGlobalIndex *hi) const |
Get the range of rows owned by current process. More... | |
void | getLocalRow (const CepsMathScalar **values, CepsGlobalIndex row, CepsInt *nbNonZero, const CepsGlobalIndex **nonZeroCols) const |
Read-only access to the values of matrix row. More... | |
void | releaseLocalRow (const CepsMathScalar **values, CepsGlobalIndex row, CepsInt *nbNonZero, const CepsGlobalIndex **nonZeroCols) |
Release access to the values of matrix row after reading. More... | |
void | getLocalRow (CepsVector< CepsMathScalar > &rowValues, CepsGlobalIndex row) |
Get a copy of the non-zero values stored in a local row. More... | |
void | getEntireLocalRow (CepsVector< CepsMathScalar > &rowValues, CepsGlobalIndex row) const |
Get a copy of all values stored in a local row, including zeros. More... | |
void | getColumnAsDistributedVector (DistributedVector &v, CepsGlobalIndex column) const |
Fills a DistributedVector with values of column. More... | |
void | setColumnAsDistributedVector (DistributedVector &v, CepsGlobalIndex column) |
Sets the values of a distributed vector in matrix column. More... | |
void | getDiagonalAsDistributedVector (DistributedVector &v) const |
Fills a DistributedVector with values of diagonal. More... | |
void | setDiagonalAsDistributedVector (DistributedVector &v) |
Sets the values of a distributed vector in matrix diagonal. More... | |
void | getDiagonalFootPrintAsDistributedVector (DistributedVector &v, CepsReal epsilon=1E-12) const |
Fills a DistributedVector with the footprint (zero or non-zero) of diagonal. More... | |
const PetscMatrix & | getMatrix () const |
The underlying matrix. More... | |
void | save (const CepsString &filename) |
Matrix is saved in binary format. More... | |
void | load (const CepsString &filename) |
Matrix is loaded from specified file in binary format. More... | |
void | beginAssembly () |
Begin matrix assembly. More... | |
void | endAssembly () |
Wait for the end of matrix assembly. More... | |
void | finalize () |
Performs assembly. More... | |
void | flush () |
Use when switching between calls to adding and setting values. More... | |
CepsBool | isAssembled () const |
Safety check. More... | |
void | assertAssembled (CepsString info="") const |
Safetier check. More... | |
CepsBool | isSymmetric () const |
True if matrix is symmetric. More... | |
void | checkProperlySet () const |
Will fail if matrix is not properly set (correct sizes and memory preallocation). More... | |
void | view () const |
Displays the matrix on standard output. More... | |
DistributedMatrix & | operator*= (const CepsMathScalar &scalar) |
Short mult by scalar. More... | |
Private Attributes | |
PetscMatrix | m_A |
The main object. More... | |
CepsGlobalIndex | m_lo |
Index of first local row. More... | |
CepsGlobalIndex | m_hi |
Index of last local row +1. More... | |
CepsBool | m_properlySet |
Safety flag to check for sizes and memory preallocation. More... | |
Friends | |
class | TestDistributedMatrix |
DistributedMatrix::DistributedMatrix | ( | ) |
Empty constructor.
Users must call DistributedMatrix::setSize(...) and DistributedMatrix::setNonZeroStructure(...) after calling this constructor.
Definition at line 33 of file PETScMatrix.cpp.
Constructor with numbers of rows and columns.
Users must call DistributedMatrix::setNonZeroStructure(...) after calling this constructor.
[in] | M | global number of rows |
[in] | N | global number of columns |
[in] | m | local number of rows (on current process) |
[in] | n | local number of columns (on current process) |
Definition at line 47 of file PETScMatrix.cpp.
|
explicit |
Constructor with structure template, or copy constructor.
[in] | templateMatrix | distributed matrix to use as reference |
[in] | copyValues | whether the values should be copied or not. Default to false |
Definition at line 61 of file PETScMatrix.cpp.
|
explicit |
Constructor from a binary file.
Definition at line 72 of file PETScMatrix.cpp.
DistributedMatrix::~DistributedMatrix | ( | ) |
Destructor. The underlying object is cleaned.
Definition at line 83 of file PETScMatrix.cpp.
void DistributedMatrix::add | ( | DistributedMatrix & | X, |
CepsMathScalar | a, | ||
CepsBool | sameNonZeroStructure = true |
||
) |
Adds a*X to this
.
X | matrix |
a | scale factor |
sameNonZeroStructure | whether the two matrices have the same non-zero pattern. Default to true |
Definition at line 246 of file PETScMatrix.cpp.
void DistributedMatrix::addSubMatrix | ( | const CepsMathDynamic2D & | subMat, |
const CepsVector< CepsGlobalIndex > & | indicesI, | ||
const CepsVector< CepsGlobalIndex > & | indicesJ | ||
) |
Add each element of a small square matrix in a distributed matrix.
This method is useful when trying to add the contribution of an finite element inside a symmetric distributed matrix.
[in] | subMat | the matrix of size (N*N) to add |
[in] | indicesI | an array of size N that holds the global matrix row indices where the values must be added |
[in] | indicesJ | an array of size N that holds the global matrix column indices where the values must be added |
Definition at line 38 of file DistributedMatrix.cpp.
void DistributedMatrix::addValue | ( | CepsMathScalar | value, |
CepsGlobalIndex | i, | ||
CepsGlobalIndex | j | ||
) |
Adds value to A(i,j) (sets if not existing already)
Do not forget to call the matrix assembly methods after setting values
Definition at line 153 of file PETScMatrix.cpp.
void DistributedMatrix::addValues | ( | const CepsMathScalar * | values, |
CepsInt | nbRows, | ||
CepsInt | nbColumns, | ||
const CepsGlobalIndex * | rowIndices, | ||
const CepsGlobalIndex * | columnIndices | ||
) |
Add multiple values in the matrix at once.
Essentially the same as DistributedMatrix::setMultipleValues(...), but adding to instead of overwriting the previous value.
Definition at line 186 of file PETScMatrix.cpp.
void DistributedMatrix::assertAssembled | ( | CepsString | info = "" | ) | const |
Safetier check.
info | Displayed as in "call finalize before <info>" |
Definition at line 584 of file PETScMatrix.cpp.
void DistributedMatrix::beginAssembly | ( | ) |
Begin matrix assembly.
Code not related to this matrix can be called between this method and the call to endMatrixAssembly().
Definition at line 535 of file PETScMatrix.cpp.
void DistributedMatrix::checkProperlySet | ( | ) | const |
Will fail if matrix is not properly set (correct sizes and memory preallocation).
Definition at line 602 of file PETScMatrix.cpp.
void DistributedMatrix::copy | ( | DistributedMatrix & | A | ) | const |
Copy values from this matrix to matrix A of same non-zero structure.
Not to be used on a non-finalized matrix. Call DistributedMatrix::finalize() before copying.
Definition at line 283 of file PETScMatrix.cpp.
void DistributedMatrix::duplicate | ( | DistributedMatrix & | dest, |
CepsBool | copyValues | ||
) | const |
Copy non-zero structure to dest matrix. Optionally values.
Not to be used on a non-finalized matrix. Call DistributedMatrix::finalize() before copying.
[in] | dest | a pointer to the destination matrix |
[in] | copyValues | true if the duplicated matrix should have same numerical values as the original |
Definition at line 293 of file PETScMatrix.cpp.
void DistributedMatrix::endAssembly | ( | ) |
Wait for the end of matrix assembly.
No operation using this matrix should be done before assembly. Use this method only when the matrix has been completely assembled, as the unused memory space is freed.
Definition at line 542 of file PETScMatrix.cpp.
void DistributedMatrix::finalize | ( | ) |
Performs assembly.
Definition at line 549 of file PETScMatrix.cpp.
void DistributedMatrix::flush | ( | ) |
Use when switching between calls to adding and setting values.
Definition at line 557 of file PETScMatrix.cpp.
void DistributedMatrix::getColumnAsDistributedVector | ( | DistributedVector & | v, |
CepsGlobalIndex | column | ||
) | const |
Fills a DistributedVector with values of column.
The decompositions of matrix and vector must be the same.
[out] | v | a DistributedVector to receive all values from the col |
[in] | column | global matrix index of the column to get |
Definition at line 428 of file PETScMatrix.cpp.
void DistributedMatrix::getDiagonalAsDistributedVector | ( | DistributedVector & | v | ) | const |
Fills a DistributedVector with values of diagonal.
The decompositions of matrix and vector must be the same.
[out] | v | a DistributedVector to receive all values from the diagonal |
Definition at line 483 of file PETScMatrix.cpp.
void DistributedMatrix::getDiagonalFootPrintAsDistributedVector | ( | DistributedVector & | v, |
CepsReal | epsilon = 1E-12 |
||
) | const |
Fills a DistributedVector with the footprint (zero or non-zero) of diagonal.
The decompositions of matrix and vector must be the same.
[out] | v | a DistributedVector to receive all values from the diagonal |
Definition at line 501 of file PETScMatrix.cpp.
void DistributedMatrix::getEntireLocalRow | ( | CepsVector< CepsMathScalar > & | rowValues, |
CepsGlobalIndex | row | ||
) | const |
Get a copy of all values stored in a local row, including zeros.
Get a copy of the non-zero values stored in a local row. N.B this method cannot get rows not owned by current process. Using this method does not require the use of DistributedMatrix::releaseLocalRow(...) but is much slower. Use DistributedMatrix::getLocalRow(...) if only reading values is required.
[out] | rowValues | a vector that will contain the copied values. The vector's size is equal to the number of non zero values of this matrix row. |
[in] | row | global matrix index of the row to get |
Definition at line 396 of file PETScMatrix.cpp.
void DistributedMatrix::getLocalRange | ( | CepsGlobalIndex * | lo, |
CepsGlobalIndex * | hi | ||
) | const |
Get the range of rows owned by current process.
[out] | lo | will hold the first local row |
[out] | hi | will hold last + 1 local row |
Definition at line 324 of file PETScMatrix.cpp.
void DistributedMatrix::getLocalRow | ( | CepsVector< CepsMathScalar > & | rowValues, |
CepsGlobalIndex | row | ||
) |
Get a copy of the non-zero values stored in a local row.
N.B this method cannot get rows not owned by current process. Using this method does not require the use of DistributedMatrix::releaseLocalRow(...) but is much slower. Use DistributedMatrix::getLocalRow(...) if only reading values is required.
[out] | rowValues | a vector that will contain the copied values. The vector's size is equal to the number of non zero values of this matrix row. |
[in] | row | global matrix index of the row to get |
Definition at line 359 of file PETScMatrix.cpp.
void DistributedMatrix::getLocalRow | ( | const CepsMathScalar ** | values, |
CepsGlobalIndex | row, | ||
CepsInt * | nbNonZero, | ||
const CepsGlobalIndex ** | nonZeroCols | ||
) | const |
Read-only access to the values of matrix row.
Users must call DistributedMatrix::releaseLocalRow() after reading operations are done to avoid bleeding memory. Similar in essence to DistributedVector::data()
[out] | values | pointer on row values |
[in] | row | global matrix row index in the matrix |
[out] | nbNonZero | will be set to the number of non-zero values. Can be nullptr if the information is not needed. |
[out] | nonZeroCols | pointer on the array of non zero cols. Can be nullptr if not needed |
Definition at line 332 of file PETScMatrix.cpp.
Get the local size of the matrix.
[out] | m | will hold the number of local rows |
[out] | n | will hold the number of local columns |
Definition at line 316 of file PETScMatrix.cpp.
const PetscMatrix & DistributedMatrix::getMatrix | ( | ) | const |
The underlying matrix.
Definition at line 80 of file DistributedMatrix.cpp.
Get the global size of the matrix.
[out] | M | will hold the number of rows |
[out] | N | will hold the number of columns |
Definition at line 308 of file PETScMatrix.cpp.
void DistributedMatrix::getSubMatrix | ( | const CepsVector< CepsGlobalIndex > & | indicesI, |
const CepsVector< CepsGlobalIndex > & | indicesJ, | ||
CepsMathDynamic2D & | subMat | ||
) |
Insert each element of a distributed matrix in a small Eigen submatrix.
[in] | indicesI | an array of size N that holds the global matrix row indices where the values must be added |
[in] | indicesJ | an array of size N that holds the global matrix column indices where the values must be added |
[out] | subMat | the matrix of size N*N to get |
Definition at line 63 of file DistributedMatrix.cpp.
void DistributedMatrix::getValues | ( | CepsMathScalar * | values, |
CepsInt | nbRows, | ||
CepsInt | nbColumns, | ||
const CepsGlobalIndex * | rowIndices, | ||
const CepsGlobalIndex * | columnIndices | ||
) |
Get multiple values in the matrix.
[out] | values | 1 dimensional array containing the values to be obtained Must be preallocated (nbRows*nbColumns) |
[in] | nbRows | size of the rowIndices parameter, the number of rows that will be get by this call |
[in] | nbColumns | identical to nbRows, but for columns instead |
[in] | rowIndices | the global matrix indices of the rows where the values must be obtained from |
[in] | columnIndices | identical to rowIndices but for columns instead |
Definition at line 160 of file PETScMatrix.cpp.
void DistributedMatrix::identity | ( | ) |
Sets to identity matrix. Fails if matrix is not square.
Definition at line 227 of file PETScMatrix.cpp.
void DistributedMatrix::ignoreOffProcEntries | ( | CepsBool | flag | ) |
Choose to ignore entries destined to other processes when setting or adding values in the matrix.
Increases matrix assembly performance but the user must make sure that the local values are correctly generated.
[in] | flag | true if off-proc entries are to be ignored. |
Definition at line 90 of file PETScMatrix.cpp.
CepsBool DistributedMatrix::isAssembled | ( | ) | const |
Safety check.
Definition at line 574 of file PETScMatrix.cpp.
CepsBool DistributedMatrix::isSymmetric | ( | ) | const |
True if matrix is symmetric.
If the implementation is PETSc: Warning! This method does not compute anything! It just checks if the symmetric flag has been turned on for this matrix. Apparently, PETSc does not support symmetry checking for MPIAIJ matrices... Note: if the user did not set the flag explicitly with DistributedMatrix::setSymmetric(...), then you should not use this method! Returns false by default.
Definition at line 565 of file PETScMatrix.cpp.
CepsMathScalar DistributedMatrix::l1Norm | ( | ) | const |
-norm of matrix
Definition at line 265 of file PETScMatrix.cpp.
CepsMathScalar DistributedMatrix::l2Norm | ( | ) | const |
-norm of matrix
Definition at line 274 of file PETScMatrix.cpp.
CepsMathScalar DistributedMatrix::lInfNorm | ( | ) | const |
-norm of matrix
Definition at line 256 of file PETScMatrix.cpp.
void DistributedMatrix::load | ( | const CepsString & | filename | ) |
Matrix is loaded from specified file in binary format.
[in] | filename | file name |
Definition at line 523 of file PETScMatrix.cpp.
DistributedMatrix & DistributedMatrix::operator*= | ( | const CepsMathScalar & | scalar | ) |
Short mult by scalar.
Definition at line 612 of file PETScMatrix.cpp.
void DistributedMatrix::releaseLocalRow | ( | const CepsMathScalar ** | values, |
CepsGlobalIndex | row, | ||
CepsInt * | nbNonZero, | ||
const CepsGlobalIndex ** | nonZeroCols | ||
) |
Release access to the values of matrix row after reading.
Definition at line 347 of file PETScMatrix.cpp.
void DistributedMatrix::save | ( | const CepsString & | filename | ) |
Matrix is saved in binary format.
Can then be read using DistributedMatrix::load(...)
[in] | filename | file name |
Definition at line 513 of file PETScMatrix.cpp.
void DistributedMatrix::setColumnAsDistributedVector | ( | DistributedVector & | v, |
CepsGlobalIndex | column | ||
) |
Sets the values of a distributed vector in matrix column.
N.B. the distriuted vector cannot insert new values. Adding terms off the non-zero structure of the matrix will fail.
[in] | v | DistributedVector containing all values to set into the column |
[in] | column | global matrix index of the column to set |
Definition at line 455 of file PETScMatrix.cpp.
void DistributedMatrix::setDiagonalAsDistributedVector | ( | DistributedVector & | v | ) |
Sets the values of a distributed vector in matrix diagonal.
N.B. the distriuted vector cannot insert new values. Adding terms off the non-zero structure of the matrix will fail.
[in] | v | DistributedVector containing all values to set into the diagonal |
Set the matrix non-zero structure.
Similar to DistributedMatrix::setNonZeroStructure(const CepsInt d_nnz[], const CepsInt o_nnz[]) but with same number of non-zero terms on each line of the local submatrix.
[in] | d_nz | number of non-zero elements in each row on the diagonal portion of the matrix. |
[in] | o_nz | similary to d_nz, but for off-diagonal portion of the matrix |
Definition at line 133 of file PETScMatrix.cpp.
Set the matrix non-zero structure.
[in] | d_nnz | an array of size m where m is the local of rows. It holds, for each row, the number of non-zero elements, in the diagonal portion of the matrix. (i.e. the local block matrix) |
[in] | o_nnz | similar to d_nnz, but for off-diagonal portion of the matrix. |
Definition at line 118 of file PETScMatrix.cpp.
Set distributed matrix global and local size.
As implementation does not use PETSC_DECIDE for the local sizes, these must be correct when calling this method.
[in] | M | global number of rows |
[in] | N | global number of columns |
[in] | m | local number or rows |
[in] | n | local number of columns |
Definition at line 108 of file PETScMatrix.cpp.
void DistributedMatrix::setSymmetric | ( | CepsBool | flag = true | ) |
Set whether this matrix is symmetric or not.
Definition at line 98 of file PETScMatrix.cpp.
void DistributedMatrix::setValue | ( | CepsMathScalar | value, |
CepsGlobalIndex | i, | ||
CepsGlobalIndex | j | ||
) |
Sets A(i,j) (replace if existing)
Do not forget to call the matrix assembly methods after setting values
Definition at line 146 of file PETScMatrix.cpp.
void DistributedMatrix::setValues | ( | const CepsMathScalar * | values, |
CepsInt | nbRows, | ||
CepsInt | nbColumns, | ||
const CepsGlobalIndex * | rowIndices, | ||
const CepsGlobalIndex * | columnIndices | ||
) |
Set multiple values in the matrix at once.
Do not forget to call the matrix assembly methods after setting values
[in] | values | 1 dimensional array of size nRows*nCols containing the values to be added |
[in] | nbRows | size of the rowIndices parameter, the number of rows that will be modified by this call |
[in] | nbColumns | identical to nbRows, but for columns instead |
[in] | rowIndices | the global matrix indices of the rows where the values must be set |
[in] | columnIndices | identical to rowIndices but for columns instead |
Definition at line 173 of file PETScMatrix.cpp.
void DistributedMatrix::view | ( | ) | const |
Displays the matrix on standard output.
Definition at line 594 of file PETScMatrix.cpp.
void DistributedMatrix::zero | ( | ) |
Zeroes all entries.
Definition at line 220 of file PETScMatrix.cpp.
void DistributedMatrix::zeroRows | ( | CepsInt | nbRows, |
CepsGlobalIndex * | rows, | ||
CepsMathScalar | diagonalValue = 1.0 |
||
) |
Sets the indicated rows to zero.
[in] | nbRows | number of rows to zero |
[in] | rows | global indices of the rows |
[in] | diagonalValue | the value to assign to diagonal |
Definition at line 211 of file PETScMatrix.cpp.
void DistributedMatrix::zeroRowsAndColumns | ( | CepsInt | nbRows, |
CepsGlobalIndex * | rows, | ||
CepsMathScalar | diagonalValue = 1.0 |
||
) |
Sets the indicated rows and columns values to zero for symmetric matrices.
[in] | nbRows | number of rows to zero |
[in] | rows | global indices of the rows |
[in] | diagonalValue | the value to assign to diagonal |
Definition at line 199 of file PETScMatrix.cpp.
|
friend |
Definition at line 542 of file DistributedMatrix.hpp.
|
private |
The main object.
Definition at line 545 of file DistributedMatrix.hpp.
|
private |
Index of last local row +1.
Definition at line 547 of file DistributedMatrix.hpp.
|
private |
Index of first local row.
Definition at line 546 of file DistributedMatrix.hpp.
|
private |
Safety flag to check for sizes and memory preallocation.
Definition at line 548 of file DistributedMatrix.hpp.