Python interface of tabulate_facet_dofs in dolfin 1.1.0

Asked by Weiwei Wang

Hi,

tabulate_facet_dofs gives the following error message for dolfin 1.1.0,

 TypeError: in method 'GenericDofMap_tabulate_facet_dofs', argument 2 of type 'unsigned int *'

and a piece of code to repeat the error is:

from dolfin import *
import numpy as np

mesh = UnitCube(2,2,2)
V = VectorFunctionSpace(mesh, "CG", 1)
dm = V.dofmap()

d = np.zeros(dm.num_facet_dofs(),dtype='I')
dm.tabulate_facet_dofs(d,0)

which works fine with dolfin 1.0.0, does anyone know how to fix it please?

Best wishes,
Weiwei

Question information

Language:
English Edit question
Status:
Solved
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Solved by:
Johan Hake
Solved:
Last query:
Last reply:
Revision history for this message
Best Johan Hake (johan-hake) said :
#1

The typemap for this disappeared in the big uint -> size_t change. I
have added it back for the 1.1.x repo. You need to pull the code from
the repo.

  bzr branch lp:dolfin/1.1.x dolfin-1.1.x

We have also discussed to release a point release of the 1.1.x branch
with some bug fixes soon.

Johan

On 02/06/2013 09:20 PM, Weiwei Wang wrote:
> New question #221223 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/221223
>
> Hi,
>
> tabulate_facet_dofs gives the following error message for dolfin 1.1.0,
>
> TypeError: in method 'GenericDofMap_tabulate_facet_dofs', argument 2 of type 'unsigned int *'
>
> and a piece of code to repeat the error is:
>
> from dolfin import *
> import numpy as np
>
> mesh = UnitCube(2,2,2)
> V = VectorFunctionSpace(mesh, "CG", 1)
> dm = V.dofmap()
>
> d = np.zeros(dm.num_facet_dofs(),dtype='I')
> dm.tabulate_facet_dofs(d,0)
>
> which works fine with dolfin 1.0.0, does anyone know how to fix it please?
>
> Best wishes,
> Weiwei
>

Revision history for this message
Weiwei Wang (wangww2011) said :
#2

Hi Johan,

Thanks a lot for your fast reply, yeah, it would be great to have a version with bug fixed.

Cheers,
Weiwei