dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #07622
Re: SubDomain::mark in python
Found it. It should've been "uint" instead of "int":
boundary_domains = MeshFunction("uint", mesh)
SWIG gives horrible error messages in cases like this...
--
Martin
2008/4/25, Martin Sandve Alnæs <martinal@xxxxxxxxx>:
> I have this code:
>
> boundary_domains = MeshFunction("int", mesh)
> traction_domain.mark(boundary_domains, 0)
>
>
> The signature for mark is:
>
> mark(self, dolfin::MeshFunction<(dolfin::uint)> sub_domains, uint
> sub_domain)
>
>
> And I get this error:
>
> Traceback (most recent call last):
> File "demo.py", line 160, in <module>
> traction_domain.mark(boundary_domains, 0)
> File "/opt/dolfin-local/lib/python2.5/site-packages/dolfin/dolfin.py",
> line 6706, in mark
> return _dolfin.SubDomain_mark(*args)
> TypeError: in method 'SubDomain_mark', argument 2 of type
> 'dolfin::MeshFunction<dolfin::uint > &'
>
>
> Am I blind, or is there something wrong in pydolfin?
>
> --
>
> Martin
>
References