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

mshr and dolfin

0 votes

I am using dolfin version 1.6.0 on a ubuntu 14.04. FEniCs is install from ppa-repository.

I am trying to create a spherical mesh. But somehow this does not work out

import dolfin
import mshr
center = dolfin.Point()
sphere = mshr.Sphere(center, 1.0)
mesh = dolfin.mesh(sphere, 20)

I am getting the following error: TypeError: 'module' object is not callable.

Is the mshr not supported in my current version?

asked Mar 30, 2016 by sg FEniCS Novice (260 points)

1 Answer

+1 vote
 
Best answer

Try to replace your last line with mesh = mshr.generate_mesh(sphere, 20).

answered Mar 30, 2016 by johannr FEniCS Expert (17,350 points)
selected Mar 30, 2016 by sg
...