I have developed a code in dolfin 2017.2.0, and now want to run it on a cluster that has dolfin 2019.1.0 installed on it. In my scripts I read the mesh, and its volume and boundary indicators with the following lines of code:
from dolfin import Mesh, XDMFFile, FacetFunction, CellFunction mesh_file = "mesh/2D_mesh_short.h5" mesh = Mesh() hdf = HDF5File(mesh.mpi_comm(), mesh_file, "r") hdf.read(mesh, "/mesh", False) cd = CellFunction("size_t", mesh) hdf.read(cd, "/cd") boundaries = MeshFunction("size_t", mesh) hdf.read(boundaries, "/fd")
However, on the cluster with dolfin 2019.1.0 installed I get the error:
ImportError: cannot import name ‘FacetFunction’ from ‘dolfin’.
I read somewhere that this function may not be present in the updated dolfin package… Does someone know how to work around this with other functions?