Issue with function 'errornorm': object has no attribute 'ufl_element'
Hello,
I was trying to run a simple tutorial script:
"""
from dolfin import *
mesh = UnitSquareMesh(32, 32)
(x, y) = SpatialCoordina
element = FiniteElement(
V = FunctionSpace(mesh, element)
u = Function(V)
v = TestFunction(V)
f = Constant(-6.0)
g = 1 + x**2 + 2*y**2
bc = DirichletBC(V, g, DomainBoundary())
F = inner(grad(u), grad(v))*dx - f*v*dx
solve(F == 0, u, bc)
print(errornorm
"""
using Python 3 and Docker. However, I get the following error message:
"""
Traceback (most recent call last):
File "01.py", line 15, in <module>
print(
File "/usr/local/
degree_u = u.ufl_element(
AttributeError: 'Sum' object has no attribute 'ufl_element'
"""
Since I could not find anything similar online I decided to make this post. Could someone help me out?
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: