from fenics import *
# import numpy as np
# import matplotlib.pyplot as plt
from mshr import *
4 # Copyright (C) 2017 Benjamin Kehlet
6 # This file is part of mshr.
19 # along with mshr. If not, see <http:#www.gnu.org/licenses/>.
22 import dolfin
---> 24 from .cpp import Circle
25 from .cpp import Ellipse
26 from .cpp import Rectangle
ImportError: generic_type: type "CSGGeometry" referenced unknown base type "dolfin::Variable"
I have installed mshr and fenics, the result of “conda list mshr” is
For me mshr does not work locally either. However, it works in Google Colab. One workaround would thus be to create the mesh in Google Colab, save it to file and load the mesh file locally on your own device. Nevertheless, as explained in this forum post mshr is no longer maintained and it is better to use some other software. Besides my quick and dirty workaround, I also use pygmsh and in my opinion this yields much more optimized meshes than mshr for complex geometries.