← Back to team overview

dolfin team mailing list archive

Re: SubDomain::mark in python

 

On Fri, Apr 25, 2008 at 06:07:54PM +0200, Martin Sandve Alnæs wrote:
> I have this code:
> 
> boundary_domains = MeshFunction("int", mesh)
                                  ~~~~
Should be "uint".

And probably also

  boundary_domains = MeshFunction("uint", mesh, mesh.topology().dim() - 1)

-- 
Anders

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


Follow ups

References