midpoint, a FreeFem++ code which uses the (implicit) midpoint 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^2
      
      with initial condition at t=0:
      
        u(x,y,0) = sin(pi x) sin(pi y)
      
      and boundary condition
      
        u(x,y,t) = 0
      
    
    The information on this web page is distributed under the MIT license.
midpoint is available in a C version and a C++ version and a Fortran77 version and a Fortran90 version and a FreeFem++ version and a MATLAB version and an Octave version and a Python version and an R version.