TriangleMesh


47
views
0
9 days ago by
Hello,

I'd like to use triangular meshes. How can I do that?

I've seen this function in the documentation https://fenicsproject.org/olddocs/dolfin/1.3.0/python/programmers-reference/cpp/mesh/UnitTriangleMesh.html but I get the following error:

TypeError: dolfin.cpp.generation.UnitTriangleMesh: No constructor defined!
Community: FEniCS Project

1 Answer


0
9 days ago by
This works for me: (dolfin 2017.2)

import dolfin as df

mesh = df.UnitTriangleMesh().create()
It doesn't for me :(

Do you know how I can see which version I am using? I've tried to do print(dolfin.dolfin_version()) as in here https://fenicsproject.org/qa/4034/test-fenics-version/?show=4034#q4034 but I get an error
AttributeError: module 'dolfin' has no attribute 'dolfin_version'
and by doing print(dolfin_version()) I get an other error:
NameError: name 'dolfin_version' is not defined
written 9 days ago by caterinabig  

from your terminal:

dolfin-version 
written 9 days ago by lhdamiani  
Thanks, then it's a more recent version... 2018.1.0.dev0
written 9 days ago by caterinabig  
Please login to add an answer/comment or follow this question.

Similar posts:
Search »