NeoFOAM
WIP Prototype of a modern OpenFOAM core
|
#include <CSRMatrix.hpp>
Public Member Functions | |
CSRMatrix (const Field< ValueType > &values, const Field< IndexType > &colIdxs, const Field< IndexType > &rowPtrs) | |
Constructor for CSRMatrix. | |
~CSRMatrix ()=default | |
Default destructor. | |
const Executor & | exec () const |
Get the executor associated with this matrix. | |
IndexType | nRows () const |
Get the number of rows in the matrix. | |
IndexType | nNonZeros () const |
Get the number of non-zero values in the matrix. | |
std::span< ValueType > | values () |
Get a span to the values array. | |
std::span< IndexType > | colIdxs () |
Get a span to the column indices array. | |
std::span< IndexType > | rowPtrs () |
Get a span to the row pointers array. | |
const std::span< const ValueType > | values () const |
Get a const span to the values array. | |
const std::span< const IndexType > | colIdxs () const |
Get a const span to the column indices array. | |
const std::span< const IndexType > | rowPtrs () const |
Get a const span to the row pointers array. | |
CSRMatrix< ValueType, IndexType > | copyToExecutor (Executor dstExec) const |
Copy the matrix to another executor. | |
CSRMatrix< ValueType, IndexType > | copyToHost () const |
Copy the matrix to the host. | |
CSRMatrixSpan< ValueType, IndexType > | span () |
Get a span representation of the matrix. | |
const CSRMatrixSpan< const ValueType, const IndexType > | span () const |
Get a const span representation of the matrix. | |
Definition at line 90 of file CSRMatrix.hpp.
|
inline |
Constructor for CSRMatrix.
values | The non-zero values of the matrix. |
colIdxs | The column indices for each non-zero value. |
rowPtrs | The starting index in values/colIdxs for each row. |
Definition at line 101 of file CSRMatrix.hpp.
|
default |
Default destructor.
|
inline |
Get a span to the column indices array.
Definition at line 145 of file CSRMatrix.hpp.
|
inline |
Get a const span to the column indices array.
Definition at line 163 of file CSRMatrix.hpp.
|
inline |
Copy the matrix to another executor.
dstExec | The destination executor. |
Definition at line 176 of file CSRMatrix.hpp.
|
inline |
Copy the matrix to the host.
Definition at line 192 of file CSRMatrix.hpp.
|
inline |
Get the executor associated with this matrix.
Definition at line 121 of file CSRMatrix.hpp.
|
inline |
Get the number of non-zero values in the matrix.
Definition at line 133 of file CSRMatrix.hpp.
|
inline |
Get the number of rows in the matrix.
Definition at line 127 of file CSRMatrix.hpp.
|
inline |
Get a span to the row pointers array.
Definition at line 151 of file CSRMatrix.hpp.
|
inline |
Get a const span to the row pointers array.
Definition at line 169 of file CSRMatrix.hpp.
|
inline |
Get a span representation of the matrix.
Definition at line 201 of file CSRMatrix.hpp.
|
inline |
Get a const span representation of the matrix.
Definition at line 210 of file CSRMatrix.hpp.
|
inline |
Get a span to the values array.
Definition at line 139 of file CSRMatrix.hpp.
|
inline |
Get a const span to the values array.
Definition at line 157 of file CSRMatrix.hpp.