I’ve installed fenics on a new laptop. GalliumOS on a chromebook. Anyone know what’s causing this error?
RuntimeError: Expecting a string or list of strings, not {‘/usr/lib/petscdir/3.7.3/x86_64-linux-gnu-real/lib’, ‘/usr/lib/openmpi/lib’, ‘/usr/lib/x86_64-linux-gnu/hdf5/openmpi/lib’, ‘/usr/lib/slepcdir/3.7.2/x86_64-linux-gnu-real/lib’}.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “fenicstest.py”, line 39, in
b_D = Expression((b_D_x_str, b_D_y_str, b_D_z_str), degree=3, l=loop_side, K=C)
File “/usr/lib/python3/dist-packages/dolfin/function/expression.py”, line 376, in init
self._cpp_object = jit.compile_expression(cpp_code, params)
File “/usr/lib/python3/dist-packages/dolfin/function/jit.py”, line 158, in compile_expression
expression = compile_class(cpp_data, mpi_comm=mpi_comm)
File “/usr/lib/python3/dist-packages/dolfin/jit/jit.py”, line 170, in compile_class
raise RuntimeError(“Unable to compile C++ code with dijitso”)
RuntimeError: Unable to compile C++ code with dijitso
from fenics import *
"""
Simulating Magnetic field from a square loop of wire.
Box is 5x5x1. The wire with lower right hand corner on the origin and at
height z = 0.5.
Equation:
curl (curl A/mu) = 0
curl A = B (what we're looking for)
At the boundary (on the wire), B is defined.
"""
#create mesh and define function space
# box is 5x5x1
length=width= 5.0
height = 0.1
mesh = BoxMesh(Point(0., 0., 0.), Point(length, width, height), 10, 10, 2)
V = VectorFunctionSpace(mesh, 'P', 1)
loop_side = 5.0 #length of square loop
C = 0.1 #constant (~Remanance/4pi) for boundary eqn component
tol = 1E-2 #tolerance for boundary definition
loop_height_z = height/2.0 #the sq loop will be at this height
mu = 1.32E-6; #material mu for neodymium magnet
#-----define boundary components-----#
# x component at boundary
b_D_x_str = "2*K*x[2]*(1/pow(pow(l-x[0], 2) + pow(x[2], 2), 2) - 1/pow(pow(x[0], 2) + pow(x[2], 2), 2))"
# y component at boundary
b_D_y_str = "2*K*x[2]*(1/pow(pow(l-x[1], 2) + pow(x[2], 2), 2) - 1/pow(pow(x[1], 2) + pow(x[2], 2), 2))"
# z component at boundary
b_D_z_str = """-2*K*((x[0]-l)/pow(pow(l-x[0],2) + pow(x[2], 2), 2) + x[1]/(pow(pow(x[1], 2) + pow(x[2], 2), 2)) +
x[0]/(pow(pow(x[0], 2) + pow(x[2], 2), 2)) -
(x[1]-l)/pow(pow(l-x[1],2) + pow(x[2], 2), 2))"""
#-----END define boundary components-----#
b_D = Expression((b_D_x_str, b_D_y_str, b_D_z_str), degree=3, l=loop_side, K=C)