Closed Wajiha11 closed 2 years ago
I think you meant to do:
Ekk = fd.assemble(( 0.5*(phi_new.dx(0)**2 + phi_new.dx(1)**2) )* fd.dx)
instead of:
Ekk = fd.assemble(( 0.5*(phi_new.dx(0)**2 + phi_new.dx(1)**2) )* dx)
as you defined dx = 1 / n
earlier.
The minimal failing example (MFE) we could have made in this case is:
import firedrake as fd
n = 10
mesh = fd.UnitSquareMesh(n, n)
dx= 1 / n
V = fd.FunctionSpace(mesh, "CG", 1)
u = fd.Function(V)
fd.assemble(u.dx(0) * dx)
(though in this case we would have noticed that something was wrong with dx
in the process of making the MFE).
Hi Ksagiyam, Indeed it was the problem. thank you!
Hi, The following code fails:
The output error message is