← Back to team overview

dolfin team mailing list archive

Re: [Question #150226]: Using mesher regioninformation /?tags

 

Question #150226 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/150226

Johan Hake proposed the following answer:
On Thursday March 24 2011 08:11:35 Neilen Marais wrote:
> Question #150226 on DOLFIN changed:
> https://answers.launchpad.net/dolfin/+question/150226
> 
> Neilen Marais posted a new comment:
> Anders,
> 
> MeshFunction('foo.xml') doesnt seem to work for me. 

That is because it is wrong. I guess Anders, has stopped using meshfunctions 
stored to file, and only uses mesh functions stored in the mesh ;)

> What does seem to work is
> 
> mf = dol.MeshFunction('uint', mesh, 'foo.xml')

Which should be the correct way to do it.

> where 'uint' is the mesh function type.  The docstring for MeshFunction
> also seems to be a little confusing, since it seems to imply that you
> need a four parameter call. If I want to update a doc string is the best
> to check out the full fenics, or can I just send a patch to the ML?

I agree that is is comfusing, but it says that all the arguments but the first 
string argument are optional. The rest of the arguments are just passed to the 
corresponding C++ constructor. The dim argument is not used when instantiating 
a MeshFunction from file, as that information is stored in the file. But it is 
used when constructing an empty MeshFunction.

The docstring can made cleared with examples of the different ways you can 
construct a MeshFunction. Patches to:

  dolfin/swig/mesh_post.i

are welcomed!

Johan

-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.