Linear problems with zero right hand side
Dear Firedrake team, I just began to use firedrake and tried to implement a simple heat equation to get started. I encountered some strange (strange for me that is) behaviour when using zero as a right hand side in a linear problem. Following the nonlinear Burgers' equation example on the website, I tried to write the diffusion equation u_t = nu*Delta(u) with backward Euler as a = (inner((u - u_)/timestep, v) + nu*inner(grad(u), grad(v))) * dx (removing the nonlinear terms essentially) but when solving solve(a == 0, temp) this generates a ValueError: Provided residual is not a linear form. If instead I put the u_ term on the right hand side a = (inner(u, v) + timestep * nu * inner(grad(u), grad(v))) * dx L = inner(u_, v) * dx solve(a == L, temp) everything works fine. Is this working as intended? I could not find a comment about this on the website, I was confused because the nonlinear example seemed to suggest the first variant should be the way to do it. I attached the script I used to provide a minimum example. This is with firedrake/2016-03, i.e. the version from March this year and Python 2.7.9. Cheers, Daniel -- Dr. Daniel Ruprecht University Academic Fellow School of Mechanical Engineering, Room 4.50 University of Leeds Leeds LS2 9JT, UK Email: d.ruprecht@leeds.ac.uk Phone: +44 (0)113 343 22 01
participants (1)
- 
                
                Daniel Ruprecht