assemble_local¶
-
dolfin.fem.assembling_local.
assemble_local
(form, cell)¶ Assemble the given form on the given cell and return the corresponding local tensor.
- Arguments
- Depending on the input form, which may be a functional, linear form or bilinear form, a scalar value, a vector or a matrix is returned.
The
form
can be either a UFL Form or a DOLFIN Form. The return value will be a Python float, or an appropriately sized numpy ndarray.To understand the connection between the returned local cell tensor and the global tensor the mapping can be found as normal from a function space as V.dofmap().cell_dofs(cell.index()).
If you pass a UFL form it will be compiled with
dolfin.Form(form)
. This operation is collective. If you do not run assemble_local on all MPI processes simultaneously you should pre-compile the form first on all ranks.