dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #18459
[Bug 586533] Re: tabulate_dofs gives incorrect results for mixed-mixed function spaces
I've added something like this as a DOLFIN unit test,
http://bazaar.launchpad.net/~dolfin-core/dolfin/main/revision/4777
** Changed in: dolfin
Status: Confirmed => Fix Committed
--
tabulate_dofs gives incorrect results for mixed-mixed function spaces
https://bugs.launchpad.net/bugs/586533
You received this bug notification because you are a member of DOLFIN
Team, which is subscribed to DOLFIN.
Status in DOLFIN: Fix Committed
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 = VectorFunctionSpace(mesh, "CG", 1)
W = V * Q
dofs = numpy.array((0,)*3, dtype="I")
for cell in cells(mesh):
W.sub(0).dofmap().tabulate_dofs(dofs, cell)
print "dofs for W.sub(0) = ", dofs
L = W.sub(1)
L.sub(0).dofmap().tabulate_dofs(dofs, cell)
print "dofs for W.sub(1).sub(0) = ", dofs
L.sub(1).dofmap().tabulate_dofs(dofs, cell)
print "dofs for W.sub(1).sub(1) = ", dofs
dofs = numpy.array((0,)*6, dtype="I")
L.dofmap().tabulate_dofs(dofs, cell)
print "dofs for W.sub(1) = ", dofs
exit()
References