Expression doesn't work properly within assembly
Bug #995452 reported by
Simone Pezzuto
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Confirmed
|
Medium
|
Johan Hake |
Bug Description
Small testcase:
from dolfin import *
mesh = UnitSquare(16, 16)
x = Expression(("x[0]", "x[1]"))
n = FacetNormal(mesh)
area = assemble( Constant(
Result:
[...]
ufl.log.
Expected result: area = 1.0
This is a regression, because on FEniCS 1.0 works well.
Related branches
lp:~registry/dolfin/hake-trunk
(Merged)
To post a comment you must log in.
I can't reproduce this. Which versions are you using? I suggest you update and try again.
I had to pass the mesh to assemble, but otherwise your code works fine here:
from dolfin import *
mesh = UnitSquare(16, 16)
x = Expression(("x[0]", "x[1]"))
n = FacetNormal(mesh)
a = Constant( 0.5)*dot( x,n)*ds
area = assemble(a, mesh=mesh)
print area # shows 1.0