DOLFINx 0.11.0.0
DOLFINx C++
Loading...
Searching...
No Matches
Sparsity Struct Reference

Lightweight sparsity descriptor satisfying the SparsityImplementation concept required by the MatrixCSR constructor. More...

#include <matmul.h>

Public Member Functions

std::shared_ptr< const common::IndexMapindex_map (int dim) const
 Return the row (dim == 0) or column (dim == 1) IndexMap.
int block_size (int i) const
 Return the block size.
std::pair< std::span< const std::int32_t >, std::span< const std::int64_t > > graph () const
 Return the CSR graph as (column_indices, row_pointers).
std::span< const std::int32_t > off_diagonal_offsets () const
 Return the per-row diagonal block sizes (see _off_diag).

Detailed Description

Lightweight sparsity descriptor satisfying the SparsityImplementation concept required by the MatrixCSR constructor.

Holds non-owning views into externally managed CSR arrays together with the row and column IndexMaps that describe the parallel distribution. It is intended as a short-lived helper: to be constructed it from the output of impl::matmul and passed to the MatrixCSR constructor.

Note
All spans must remain valid for the lifetime of this object.

The documentation for this struct was generated from the following file: