|
DOLFINx 0.12.0.0
DOLFINx C++
|
Support for building sparsity patterns from degree-of-freedom maps. More...
Functions | |
| template<std::ranges::input_range R0, std::ranges::input_range R1> | |
| void | cells (la::SparsityPattern &pattern, const std::pair< R0, R1 > &cells, std::array< std::reference_wrapper< const DofMap >, 2 > dofmaps) |
| Iterate over cells and insert entries into sparsity pattern. | |
| std::vector< std::pair< std::span< const int >, std::span< const int > > > | entity_closure_blocks (const ElementDofLayout &layout_rows, const ElementDofLayout &layout_cols) |
| Element-matrix blocks of an entity-closure stencil. | |
| void | entity_closure (la::SparsityPattern &pattern, std::span< const std::int32_t > cells, std::array< std::reference_wrapper< const DofMap >, 2 > dofmaps) |
| Iterate over cells and insert the entity-closure blocks into a 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. | |
Support for building sparsity patterns from degree-of-freedom maps.
| void cells | ( | la::SparsityPattern & | pattern, |
| const std::pair< R0, R1 > & | 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.
| pattern | Sparsity pattern to insert into. |
| cells | Lists of cells to iterate over. cells[0] and cells[1] must have the same size. |
| dofmaps | Dofmaps to used in building the sparsity pattern. |
| void entity_closure | ( | la::SparsityPattern & | pattern, |
| std::span< const std::int32_t > | cells, | ||
| std::array< std::reference_wrapper< const DofMap >, 2 > | dofmaps ) |
Iterate over cells and insert the entity-closure blocks into a sparsity pattern.
Inserts, for each mesh entity of each cell, the dofmaps[0] degrees-of-freedom on the entity against the dofmaps[1] degrees-of-freedom on the closure of that entity. This is narrower than sparsitybuild::cells, and is the sparsity of an operator whose dofmaps[0] degrees-of-freedom are moments over the entity they are attached to, since such a moment sees only dofmaps[1] restricted to that entity. fem::discrete_gradient and fem::discrete_curl insert into exactly these blocks.
Entries that the operator evaluates to zero are part of the structure and are included; a consumer that reads the sparsity rather than the values, such as PETSc's PCBDDC Nedelec support, requires them.
| pattern | Sparsity pattern to insert into. |
| cells | Cells to iterate over. |
| dofmaps | Dofmaps used in building the sparsity pattern, dofmaps[0] for the rows and dofmaps[1] for the columns. |
| std::vector< std::pair< std::span< const int >, std::span< const int > > > entity_closure_blocks | ( | const ElementDofLayout & | layout_rows, |
| const ElementDofLayout & | layout_cols ) |
Element-matrix blocks of an entity-closure stencil.
| [in] | layout_rows | Dof layout of the space of the rows. |
| [in] | layout_cols | Dof layout of the space of the columns. |
| 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 block 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.
| [in,out] | pattern | Sparsity pattern to insert into. |
| [in] | cells | Cells 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. A negative cell index means no cell exists on that side (e.g. an interface between two domains); no entries are inserted for it. |
| [in] | dofmaps | Dofmaps to use in building the sparsity pattern. |