This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Dolfin-convert script not working

0 votes

I am trying to use the script dolfin-convert within the Fenics package to convert meshes created with Gmsh from .msh to .xml format. Every time I try to use the script the terminal gives me this error message:

*** DOLFIN must be installed to handle Gmsh boundary regions

I am using Fenics 1.5.0 and I use the script directly from its original path ./Fenics1.5.0/dolfin-1.5.0/scripts/dolfin-convert/

To be more precise, most of my .msh files contains subdomains and I will also need the ..._facet_region.xml and ...._physical_region.xml files.

Anyone can help me?

asked Sep 11, 2015 by ededonati FEniCS Novice (200 points)

I have been using gmsh and dolfin-convert fine without problems, including physical facets and regions. This seems to be the code that causes your error:

try:
    from dolfin import MeshEditor, Mesh
except ImportError:
    _error("DOLFIN must be installed to handle Gmsh boundary regions")

So I suspect that if you open python from the terminal and try import dolfin it won't work either?

If I open python from the terminal this is what I get if I type import dolfin:

Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/dist-packages/dolfin/init.py", line 16, in
from . import cpp
ImportError: cannot import name cpp

Hope it helps to understand my problem

A correction to my previous comment. That was what I got the second time I typed import dolfin in the terminal. The first time I got this:

Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/dist-packages/dolfin/init.py", line 40, in
from dolfin.functions import *
File "/usr/lib/python2.7/dist-packages/dolfin/functions/init.py", line 4, in
from dolfin.functions import function
File "/usr/lib/python2.7/dist-packages/dolfin/functions/function.py", line 29, in
from ufl.utils.indexflattening import flatten_multiindex, shape_to_strides
ImportError: No module named utils.indexflattening

Sorry for my inaccuracy on the previous comment

I am afraid I can't help you there. Which method did you use to install FEniCS? If possible, you can try anew or use a different installation method.

For installation related issues you will probably have more succes on the FEniCS support mailing list (see http://fenicsproject.org/support/ ).

Thanks anyway

1 Answer

0 votes

I am experiencing the same issue, with a newly installed Denis from binaries. Which OS are you working with ededonati? I'm with OS X El Capitan.

answered Dec 7, 2015 by jacopo.lanzoni FEniCS Novice (160 points)
...