DOLFIN-X
DOLFIN-X C++ interface
Public Member Functions | Public Attributes | List of all members
dolfinx::fem::DofMap Class Reference

Degree-of-freedom map. More...

#include <DofMap.h>

Public Member Functions

 DofMap (std::shared_ptr< const ElementDofLayout > element_dof_layout, std::shared_ptr< const common::IndexMap > index_map, const graph::AdjacencyList< std::int32_t > &dofmap)
 Create a DofMap from the layout of dofs on a reference element, an IndexMap defining the distribution of dofs across processes and a vector of indices.
 
 DofMap (const DofMap &dofmap)=delete
 
 DofMap (DofMap &&dofmap)=default
 Move constructor.
 
virtual ~DofMap ()=default
 Destructor.
 
DofMapoperator= (const DofMap &dofmap)=delete
 
DofMapoperator= (DofMap &&dofmap)=default
 Move assignment.
 
Eigen::Array< std::int32_t, Eigen::Dynamic, 1 >::ConstSegmentReturnType cell_dofs (int cell) const
 Local-to-global mapping of dofs on a cell. More...
 
DofMap extract_sub_dofmap (const std::vector< int > &component) const
 Extract subdofmap component. More...
 
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) More...
 
const graph::AdjacencyList< std::int32_t > & list () const
 Get dofmap data. More...
 

Public Attributes

std::shared_ptr< const ElementDofLayoutelement_dof_layout
 Layout of dofs on an element.
 
std::shared_ptr< const common::IndexMapindex_map
 Index map that described the parallel distribution of the dofmap.
 

Detailed Description

Degree-of-freedom map.

This class handles the mapping of degrees of freedom. It builds a dof map based on an ElementDofLayout on a specific mesh topology. It will reorder the dofs when running in parallel. Sub-dofmaps, both views and copies, are supported.

Member Function Documentation

◆ cell_dofs()

Eigen::Array<std::int32_t, Eigen::Dynamic, 1>::ConstSegmentReturnType dolfinx::fem::DofMap::cell_dofs ( int  cell) const
inline

Local-to-global mapping of dofs on a cell.

Parameters
[in]cellThe cell index
Returns
Local-global dof map for the cell (using process-local indices)

◆ collapse()

std::pair< std::unique_ptr< DofMap >, std::vector< std::int32_t > > DofMap::collapse ( MPI_Comm  comm,
const mesh::Topology topology 
) const

Create a "collapsed" dofmap (collapses a sub-dofmap)

Parameters
[in]commMPI Communicator
[in]topologyThe mesh topology that the dofmap is defined on
Returns
The collapsed dofmap

◆ extract_sub_dofmap()

DofMap DofMap::extract_sub_dofmap ( const std::vector< int > &  component) const

Extract subdofmap component.

Parameters
[in]componentThe component indices
Returns
The dofmap for the component

◆ list()

const graph::AdjacencyList<std::int32_t>& dolfinx::fem::DofMap::list ( ) const
inline

Get dofmap data.

Returns
The adjacency list with dof indices for each cell

The documentation for this class was generated from the following files: