GenericDofMap

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

Bases: dolfin.cpp.common.Variable

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 (deprecated API)

cell_dofs(i)

Return the dofmap for a cell

clear_sub_map_data()

Clear any data required to build sub-dofmaps (this is to reduce memory use)

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()

Overloaded versions

  • dofs(mesh, dim)

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

  • dofs()

    Return list of global dof indices on this process

extract_sub_dofmap()

Extract sub dofmap component

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)

local_dimension()

Return number of owned (type=”owned”), unowned (type=”unowned”), or all (type=”all”) dofs in the map on this process

local_to_global_index()

Return global dof index corresponding to a given local index

local_to_global_unowned()

Return the map from unowned local dofmap nodes to global dofmap nodes. Dofmap node is dof index modulo block size.

max_cell_dimension()

Return the maximum dimension of the local finite element function space (deprecated API)

max_element_dofs()

Return the maximum dimension of the local finite element function space

neighbours()

Return set of processes that share dofs with the this process

num_element_dofs()

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

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)

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_nodes()

Return map from shared nodes 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

tabulate_local_to_global_dofs()

Tabulate map between local (process) and global dof indices

thisown

The membership flag