# GenericDofMap¶

class dolfin.cpp.fem.GenericDofMap(*args, **kwargs)

This class provides a generic interface for dof maps

block_size
cell_dimension()

Return the dimension of the local finite element function space on a cell

cell_dofs()

Local-to-global mapping of dofs on a cell

collapse()

Create a “collapsed” a dofmap (collapses from a sub-dofmap view)

constrained_domain
copy()

Create a copy of the dof map

create()

Create a new dof map on new mesh

dofs()

Return list of global dof indices on this process

extract_sub_dofmap()

Extract sub dofmap component

geometric_dimension()
global_dimension()

Return the dimension of the global finite element function space

is_view()

True if dof map is a view into another map (is a sub-dofmap)

max_cell_dimension()

Return the maximum dimension of the local finite element function space

neighbours()

Return set of processes that share dofs with the this process

num_entity_dofs()

Return the number of dofs for a given entity dimension

num_facet_dofs()

Return number of facet dofs

off_process_owner()

Return map from nonlocal-dofs (that appear in local dof map) to owning process

ownership_range()

Return the ownership range (dofs in this range are owned by this process)

restriction()

Restriction if any. If the dofmap is not restricted, a null pointer is returned.

set()

Set dof entries in vector to a specified value. Parallel layout of vector must be consistent with dof map range. This function is typically used to construct the null space of a matrix operator

set_x()

Set dof entries in vector to the value*x[i], where x[i] is the spatial coordinate of the dof. Parallel layout of vector must be consistent with dof map range. This function is typically used to construct the null space of a matrix operator, e.g. rigid body rotations.

shared_dofs()

Return map from shared dofs to the processes (not including the current process) that share it.

tabulate_all_coordinates()

Tabulate the coordinates of all dofs owned by this process. This function is typically used by preconditioners that require the spatial coordinates of dofs, for example for re-partitioning or nullspace computations. The format for the return vector is [x0, y0, z0, x1, y1, z1, . . .].

tabulate_coordinates(cell, coordinates=None)

Tabulate the coordinates of all dofs on a cell

Arguments
cell (_Cell_)
The cell.
coordinates (NumPy array)
Optional argument: The coordinates of all dofs on a cell.
Returns
coordinates
The coordinates of all dofs on a cell.
tabulate_entity_dofs()

Tabulate the local-to-local mapping of dofs on entity (dim, local_entity)

tabulate_facet_dofs()

Tabulate local-local facet dofs

thisown

The membership flag