DofMap

class dolfin.cpp.fem.DofMap(*args)

Bases: dolfin.cpp.fem.GenericDofMap

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

Friends: DofMapBuilder, MultiMeshDofMap.

Create a periodic dof map on mesh (mesh is not stored)

Parameters:
  • const ufc::dofmap > ufc_dofmap (std::shared_ptr<) – (ufc::dofmap) The ufc::dofmap. [direction=in]
  • Mesh & mesh (const) – (Mesh ) The mesh. [direction=in]
  • const SubDomain > constrained_domain (std::shared_ptr<) – (SubDomain ) The subdomain marking the constrained (tied) boundaries. [direction=in]
dofs()

Return list of dof indices on this process that belong to mesh entities of dimension dim

Parameters:
  • Mesh & mesh (const) –
  • dim (std::size_t) –
Return type:

std::vector< dolfin::la_index >

entity_closure_dofs()

Return the dof indices associated with the closure of entities of given dimension and entity indices Arguments entity_dim (std::size_t) Entity dimension. entity_indices (std::vector<dolfin::la_index>&) Entity indices to get dofs for. Returns std::vector<dolfin::la_index> Dof indices associated with selected entities and their closure.

Parameters:
  • Mesh & mesh (const) –
  • entity_dim (std::size_t) –
  • std::vector< std::size_t > & entity_indices (const) –
Return type:

std::vector< dolfin::la_index >

entity_dofs()

Return the dof indices associated with entities of given dimension and entity indices Arguments entity_dim (std::size_t) Entity dimension. entity_indices (std::vector<dolfin::la_index>&) Entity indices to get dofs for. Returns std::vector<dolfin::la_index> Dof indices associated with selected entities.

Parameters:
  • Mesh & mesh (const) –
  • entity_dim (std::size_t) –
  • std::vector< std::size_t > & entity_indices (const) –
Return type:

std::vector< dolfin::la_index >

thisown

The membership flag