10 #include <dolfinx/common/MPI.h>
11 #include <dolfinx/graph/AdjacencyList.h>
28 class ElementDofLayout;
53 graph::AdjacencyList<std::int32_t>
55 std::int32_t num_cells);
80 typename = std::enable_if_t<std::is_same<
82 DofMap(std::shared_ptr<const ElementDofLayout> element,
86 _index_map_bs(
index_map_bs), _dofmap(std::forward<U>(dofmap)), _bs(
bs)
112 return _dofmap.links(cell);
116 int bs() const noexcept;
128 std::pair<std::unique_ptr<
DofMap>, std::vector<std::int32_t>>
129 collapse(MPI_Comm comm, const mesh::Topology& topology) const;
133 const graph::AdjacencyList<std::int32_t>&
list() const;
146 int _index_map_bs = -1;
149 graph::AdjacencyList<std::int32_t> _dofmap;
Degree-of-freedom map.
Definition: DofMap.h:65
std::shared_ptr< const ElementDofLayout > element_dof_layout
Layout of dofs on an element.
Definition: DofMap.h:136
int index_map_bs() const
Index map that described the parallel distribution of the dofmap.
Definition: DofMap.cpp:295
std::shared_ptr< const common::IndexMap > index_map
Index map that described the parallel distribution of the dofmap.
Definition: DofMap.h:139
DofMap(std::shared_ptr< const ElementDofLayout > element, std::shared_ptr< const common::IndexMap > index_map, int index_map_bs, U &&dofmap, int bs)
Create a DofMap from the layout of dofs on a reference element, an IndexMap defining the distribution...
Definition: DofMap.h:82
std::pair< std::unique_ptr< DofMap >, std::vector< std::int32_t > > collapse(MPI_Comm comm, const mesh::Topology &topology) const
Create a "collapsed" dofmap (collapses a sub-dofmap)
Definition: DofMap.cpp:229
DofMap & operator=(DofMap &&dofmap)=default
Move assignment.
const graph::AdjacencyList< std::int32_t > & list() const
Get dofmap data.
Definition: DofMap.cpp:290
virtual ~DofMap()=default
Destructor.
DofMap(DofMap &&dofmap)=default
Move constructor.
tcb::span< const std::int32_t > cell_dofs(int cell) const
Local-to-global mapping of dofs on a cell.
Definition: DofMap.h:110
int bs() const noexcept
Return the block size for the dofmap.
Definition: DofMap.cpp:189
DofMap extract_sub_dofmap(const std::vector< int > &component) const
Extract subdofmap component.
Definition: DofMap.cpp:191
The class represents the degree-of-freedom (dofs) for an element. Dofs are associated with a mesh ent...
Definition: ElementDofLayout.h:37
This class provides a static adjacency list data structure. It is commonly used to store directed gra...
Definition: AdjacencyList.h:46
Miscellaneous classes, functions and types.
Finite element method functionality.
Definition: assemble_matrix_impl.h:24
graph::AdjacencyList< std::int32_t > transpose_dofmap(const graph::AdjacencyList< std::int32_t > &dofmap, std::int32_t num_cells)
Create an adjacency list that maps a global index (process-wise) to the 'unassembled' cell-wise contr...
Definition: DofMap.cpp:147
Mesh data structures and algorithms on meshes.
Definition: DirichletBC.h:23