DOLFINx 0.8.0
DOLFINx C++ interface
Loading...
Searching...
No Matches
Functions
dolfinx::fem::sparsitybuild Namespace Reference

Support for building sparsity patterns from degree-of-freedom maps. More...

Functions

void cells (la::SparsityPattern &pattern, std::array< std::span< const std::int32_t >, 2 > cells, std::array< std::reference_wrapper< const DofMap >, 2 > dofmaps)
 Iterate over cells and insert entries into sparsity pattern.
 
void interior_facets (la::SparsityPattern &pattern, std::array< std::span< const std::int32_t >, 2 > cells, std::array< std::reference_wrapper< const DofMap >, 2 > dofmaps)
 Iterate over interior facets and insert entries into sparsity pattern.
 

Detailed Description

Support for building sparsity patterns from degree-of-freedom maps.

Function Documentation

◆ cells()

void cells ( la::SparsityPattern & pattern,
std::array< std::span< const std::int32_t >, 2 > cells,
std::array< std::reference_wrapper< const DofMap >, 2 > dofmaps )

Iterate over cells and insert entries into sparsity pattern.

Inserts the rectangular blocks of indices dofmap[0][cells[0][i]] x dofmap[1][cells[1][i]] into the sparsity pattern, i.e. entries (dofmap[0][cells[0][i]][k0], dofmap[0][cells[0][i]][k1])` will appear in the sparsity pattern.

Parameters
patternSparsity pattern to insert into.
cellsLists of cells to iterate over. cells[0] and cells[1] must have the same size.
dofmapsDofmaps to used in building the sparsity pattern.
Note
The sparsity pattern is not finalised.

◆ interior_facets()

void interior_facets ( la::SparsityPattern & pattern,
std::array< std::span< const std::int32_t >, 2 > cells,
std::array< std::reference_wrapper< const DofMap >, 2 > dofmaps )

Iterate over interior facets and insert entries into sparsity pattern.

Inserts the rectangular blocks of indices [dofmap[0][cell0], dofmap[0][cell1]] x [dofmap[1][cell0] + dofmap[1][cell1]] where cell0 and cell1 are the two cells attached to a facet.

Parameters
[in,out]patternSparsity pattern to insert into.
[in]cellsCells to index into each dofmap. cells[i] is a list of (cell0, cell1) pairs for each interior facet to index into dofmap[i]. cells[0] and cells[1] must have the same size.
[in]dofmapsDofmaps to use in building the sparsity pattern.
Note
The sparsity pattern is not finalised.