Dear Firedrakers,


(i) Will & I tried to build a theta-time-step solver including Crank-Nicolson for theta=1/2 but only get it to work for theta=0 (Forward Euler); see the attached code at "HERE2" which matches (32) in the attached pdf.


[This is really a test set-up atm for a larger question on dynamic boundary conditions for an elliptic problem, but the system may be amusing by itself as a tentative FD-example.)


(ii) The working explicit Forward Euler code for theta=0 is very slow, at least 10x slower than the same algorithm in a FEM matlab code (-). See "HERE1" in the attached code; why is the code so slow?

[I have also attached the basic matlab code.]


This example may be amusing because of the space-time Robin condition (14) applied to (11), leading to the Firedrake weak form (32) --when time is discretised as well. The question can also be solved, slightly differently wrt the implementation of the Robin boundary condition, using finite differences, which makes for an amusing comparison.


I am not even sure whether this space-time bc and nonlinear diffusion eqn is well-posed but the finite difference and FEM numerics seems to be consistent.


Thank you and best wishes,


Onno