Hi, I am completely new to FEniCS, before we solved problems in MATLAB, now I am coming up with the problem, that I don't really know, how FEniCS wants the linear and bilinear form assembled, I will include my written code, which is almost 1 to 1 taken from my MATLAB program.
The error I get is about that a(u,v) and L(v). That far okay, I can follow, but how would I rewrite this in my case?
init = Expression(...) #initial data --> works to be plotted as u0
u_old = u0
[...]
u = Function(Q)
v = TestFunction(Q)
f = constant(0.0)
g = Constant(0.0)
a = -u*v*dx + dt*alpha*inner(grad(u),grad(v))*0.5*dx
L = (u*v*dx - dt*alpha*inner(grad(u),grad(v))*0.5*dx)*u_old
[...]
WHILE ...
solve(a == L, u, bc)
u0.assign
END
Would appreciate if anyone could help a complete beginner with this! Thanks!