Note: this is documentation for an old release. View the latest documentation at docs.fenicsproject.org/dolfinx/v0.9.0/cpp/doxygen/db/df8/sparsitybuild_8h_source.html
DOLFINx  0.5.1
DOLFINx C++ interface
sparsitybuild.h
1 // Copyright (C) 2007-2019 Garth N. Wells
2 //
3 // This file is part of DOLFINx (https://www.fenicsproject.org)
4 //
5 // SPDX-License-Identifier: LGPL-3.0-or-later
6 
7 #pragma once
8 
9 #include <array>
10 #include <cstdint>
11 #include <functional>
12 #include <span>
13 
14 namespace dolfinx::la
15 {
16 class SparsityPattern;
17 }
18 
19 namespace dolfinx::mesh
20 {
21 class Topology;
22 }
23 
24 namespace dolfinx::fem
25 {
26 class DofMap;
27 
29 namespace sparsitybuild
30 {
31 
40 void cells(
41  la::SparsityPattern& pattern, const mesh::Topology& topology,
42  const std::array<const std::reference_wrapper<const DofMap>, 2>& dofmaps);
43 
51 void cells(
52  la::SparsityPattern& pattern, const std::span<const std::int32_t>& cells,
53  const std::array<const std::reference_wrapper<const DofMap>, 2>& dofmaps);
54 
64 void interior_facets(
65  la::SparsityPattern& pattern, const mesh::Topology& topology,
66  const std::array<const std::reference_wrapper<const DofMap>, 2>& dofmaps);
67 
77 void interior_facets(
78  la::SparsityPattern& pattern, const std::span<const std::int32_t>& facets,
79  const std::array<const std::reference_wrapper<const DofMap>, 2>& dofmaps);
80 
90 void exterior_facets(
91  la::SparsityPattern& pattern, const mesh::Topology& topology,
92  const std::array<const std::reference_wrapper<const DofMap>, 2>& dofmaps);
93 
102 void exterior_facets(
103  la::SparsityPattern& pattern, const std::span<const std::int32_t>& facets,
104  const std::array<const std::reference_wrapper<const DofMap>, 2>& dofmaps);
105 
106 } // namespace sparsitybuild
107 } // namespace dolfinx::fem
This class provides a sparsity pattern data structure that can be used to initialize sparse matrices....
Definition: SparsityPattern.h:34
Topology stores the topology of a mesh, consisting of mesh entities and connectivity (incidence relat...
Definition: Topology.h:44
void interior_facets(la::SparsityPattern &pattern, const mesh::Topology &topology, const std::array< const std::reference_wrapper< const DofMap >, 2 > &dofmaps)
Iterate over interior facets and insert entries into sparsity pattern.
Definition: sparsitybuild.cpp:43
void cells(la::SparsityPattern &pattern, const mesh::Topology &topology, const std::array< const std::reference_wrapper< const DofMap >, 2 > &dofmaps)
Iterate over cells and insert entries into sparsity pattern.
Definition: sparsitybuild.cpp:18
void exterior_facets(la::SparsityPattern &pattern, const mesh::Topology &topology, const std::array< const std::reference_wrapper< const DofMap >, 2 > &dofmaps)
Iterate over exterior facets and insert entries into sparsity pattern.
Definition: sparsitybuild.cpp:112
Finite element method functionality.
Definition: assemble_matrix_impl.h:25
Linear algebra interface.
Definition: sparsitybuild.h:15
Mesh data structures and algorithms on meshes.
Definition: DofMap.h:30