tabulate_dofs gives incorrect results for mixed-mixed function spaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Fix Released
|
High
|
Unassigned |
Bug Description
There seems to be a bug in tabulate_dofs for mixed-mixed function spaces. (It might
have to do with the applied offset.)
This only shows up for mixed spaces where the non-first element is also a mixed element.
* Example:
** Output:
dofs for W.sub(0) = [0 1 3]
dofs for W.sub(1).sub(0) = [0 1 3]
dofs for W.sub(1).sub(1) = [4 5 7]
dofs for W.sub(1) = [ 4 5 7 8 9 11]
** Input:
from dolfin import *
import numpy
mesh = UnitSquare(1, 1)
V = FunctionSpace(mesh, "CG", 1)
Q = VectorFunctionS
W = V * Q
dofs = numpy.array((0,)*3, dtype="I")
for cell in cells(mesh):
W.sub(
print "dofs for W.sub(0) = ", dofs
L = W.sub(1)
L.sub(
print "dofs for W.sub(1).sub(0) = ", dofs
L.sub(
print "dofs for W.sub(1).sub(1) = ", dofs
dofs = numpy.array((0,)*6, dtype="I")
L.dofmap(
print "dofs for W.sub(1) = ", dofs
exit()
Changed in dolfin: | |
status: | New → Confirmed |
Changed in dolfin: | |
status: | Fix Committed → Fix Released |
I've made some changes to the DofMap class today, including a change to the offset. Can you test again (in serial and in parallel)?