trapezoidal, a FreeFem++ code which uses the (implicit) trapezoidal method to approximate the solution of a time dependent boundary value problem (BVP).
Our problem is posed on the unit square, with zero boundary conditions, and having the exact solution
u = sin(pi x) sin(pi y) e^(-t)The boundary value problem is posed as
du d^2 u d^2 u -- - ----- - ----- = (2 pi^2 - 1 ) sin(pi x) sin(pi y) e^(-t) dt dx^2 dy^2with initial condition at t=0:
u(x,y,0) = sin(pi x) sin(pi y)and boundary condition
u(x,y,t) = 0
The computer code and data files described and made available on this web page are distributed under the MIT license