#include <sparse_assembler.hpp>
Collects (row, col, value) triplets from the element loop and compresses them into the row-major CSR hpfem::SparseMatrix; duplicate entries are summed. Finalisation costs O(nnz log nnz).
◆ SparseAssembler()
| hpfem::assembly::SparseAssembler::SparseAssembler |
( |
Index |
rows, |
|
|
Index |
cols |
|
) |
| |
◆ add() [1/2]
◆ add() [2/2]
| void hpfem::assembly::SparseAssembler::add |
( |
std::span< const Index > |
rows, |
|
|
std::span< const Index > |
cols, |
|
|
const Matrix & |
local |
|
) |
| |
Adds local(i, j) to the global entry (rows[i], cols[j]); sizes must match.
◆ append()
| void hpfem::assembly::SparseAssembler::append |
( |
const SparseAssembler & |
other | ) |
|
Appends the triplets of another assembler of the same size (per-thread buffers).
◆ cols()
| Index hpfem::assembly::SparseAssembler::cols |
( |
| ) |
const |
|
inlinenoexcept |
◆ finalize()
| SparseMatrix hpfem::assembly::SparseAssembler::finalize |
( |
| ) |
const |
Compressed matrix with all contributions summed.
◆ num_triplets()
| std::size_t hpfem::assembly::SparseAssembler::num_triplets |
( |
| ) |
const |
|
inlinenoexcept |
◆ reserve()
| void hpfem::assembly::SparseAssembler::reserve |
( |
std::size_t |
triplets | ) |
|
|
inline |
◆ rows()
| Index hpfem::assembly::SparseAssembler::rows |
( |
| ) |
const |
|
inlinenoexcept |
The documentation for this class was generated from the following file: