Matrix with CSR storage. More...
#include <arcane/core/matvec/Matrix.h>
Public Member Functions | |
| Matrix (Integer nb_row, Integer nb_column) | |
| Matrix (const Matrix &rhs) | |
| void | operator= (const Matrix &rhs) |
| Matrix | clone () const |
| Clone the matrix. | |
| Integer | nbRow () const |
| Integer | nbColumn () const |
| void | setRowsSize (IntegerConstArrayView rows_size) |
| Sets the number of non-zero elements for each row. | |
| void | setValues (IntegerConstArrayView columns, RealConstArrayView values) |
| Sets the values of the matrix elements. | |
| void | dump (std::ostream &o) const |
| Prints the matrix. | |
| RealConstArrayView | values () const |
| Matrix values. | |
| RealArrayView | values () |
| Matrix values. | |
| IntegerConstArrayView | rowsIndex () const |
| Indices of the first elements of each row. | |
| IntegerConstArrayView | columns () const |
| Column indices of the values. | |
| IntegerArrayView | rowsIndex () |
| Indices of the first elements of each row. | |
| IntegerArrayView | columns () |
| Column indices of the values. | |
| void | setValue (Integer row, Integer column, Real value) |
| Sets the value of a matrix element. | |
| Real | value (Integer row, Integer column) const |
| Returns the value of a matrix element. | |
| void | sortDiagonale () |
| Arranges the storage so that the diagonal is the first element. | |
Static Public Member Functions | |
| static Matrix | read (const String &filename) |
| Reads the matrix in X Y format. | |
| static Matrix | readHypre (const String &filename) |
| Reads the matrix in Hypre format. | |
Private Member Functions | |
| Matrix (MatrixImpl *impl) | |
Private Attributes | |
| MatrixImpl * | m_impl = nullptr |
| Implementation. | |
Matrix with CSR storage.
Matrices operate by reference
Definition at line 44 of file core/matvec/Matrix.h.
|
explicitprivate |
| Matrix Arcane::MatVec::Matrix::clone | ( | ) | const |
| IntegerArrayView Arcane::MatVec::Matrix::columns | ( | ) |
| IntegerConstArrayView Arcane::MatVec::Matrix::columns | ( | ) | const |
Column indices of the values.
Definition at line 314 of file Matrix.cc.
References m_impl.
Referenced by read(), readHypre(), and setValues().
| void Arcane::MatVec::Matrix::dump | ( | std::ostream & | o | ) | const |
| void Arcane::MatVec::Matrix::operator= | ( | const Matrix & | rhs | ) |
|
static |
Reads the matrix in X Y format.
Definition at line 1117 of file Matrix.cc.
References ARCANE_FATAL, columns(), Arcane::math::isZero(), Arcane::String::localstr(), setRowsSize(), setValues(), and values().
|
static |
Reads the matrix in Hypre format.
Definition at line 1152 of file Matrix.cc.
References ARCANE_FATAL, columns(), Arcane::String::localstr(), setRowsSize(), setValues(), and values().
| IntegerArrayView Arcane::MatVec::Matrix::rowsIndex | ( | ) |
| IntegerConstArrayView Arcane::MatVec::Matrix::rowsIndex | ( | ) | const |
| void Arcane::MatVec::Matrix::setRowsSize | ( | IntegerConstArrayView | rows_size | ) |
Sets the number of non-zero elements for each row.
Definition at line 269 of file Matrix.cc.
References m_impl.
Referenced by read(), and readHypre().
| void Arcane::MatVec::Matrix::setValues | ( | IntegerConstArrayView | columns, |
| RealConstArrayView | values ) |
| void Arcane::MatVec::Matrix::sortDiagonale | ( | ) |
Returns the value of a matrix element.
Definition at line 251 of file Matrix.cc.
References m_impl.
Referenced by setValue().
| RealArrayView Arcane::MatVec::Matrix::values | ( | ) |
| RealConstArrayView Arcane::MatVec::Matrix::values | ( | ) | const |
Matrix values.
Definition at line 278 of file Matrix.cc.
References m_impl.
Referenced by read(), readHypre(), and setValues().
|
private |
Implementation.
Definition at line 101 of file core/matvec/Matrix.h.
Referenced by clone(), columns(), columns(), dump(), rowsIndex(), rowsIndex(), setRowsSize(), setValue(), setValues(), sortDiagonale(), value(), values(), and values().