Hi,
I am attempting to solve a simple 3D poisson equation, but I am encountering a runtime error I am unsure how to resolve.
from dolfin import *
mesh = Mesh("./test.xml")
V = FunctionSpace(mesh, 'Lagrange', 1)
# Subdomains are defined in the mesh file with labels 1028,1031,1030, and 1032
bc1 = DirichletBC(V,Constant(0.0),1028)
bc2 = DirichletBC(V,Constant(0.0),1031)
bc3 = DirichletBC(V,Constant(0.0),1030)
bc4 = DirichletBC(V,Constant(-0.65),1032)
bcs = [bc1,bc2,bc3,bc4]
u = TrialFunction(V)
v = TestFunction(V)
a = inner(grad(u),grad(v))*dx
L = v*dx
solve(a == L,u,bcs)
When I run this, I get the following error
File "testFen.py", line 24, in
solve(a == L,u,bcs)
File "/usr/lib/python2.7/dist-packages/dolfin/fem/solving.py", line 268, in solve
_solve_varproblem(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/dolfin/fem/solving.py", line 285, in _solve_varproblem
= _extract_args(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/dolfin/fem/solving.py", line 392, in _extract_args
u = _extract_u(args[1])
File "/usr/lib/python2.7/dist-packages/dolfin/fem/solving.py", line 442, in _extract_u
"Expecting second argument to be a Function")
File "/usr/lib/python2.7/dist-packages/dolfin/cpp/common.py", line 2294, in dolfin_error
return _common.dolfin_error(*args)
RuntimeError: