← Back to team overview

dolfin team mailing list archive

Re: [Bug 586533] Re: tabulate_dofs gives incorrect results for mixed-mixed function spaces

 

On 31. mai 2010 16:43, Garth Wells wrote:
> 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)?
>
>   


Looks much better in serial. Thanks :)

--
Marie

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