The ipynb contains the project report and most of the original codes are in the notebook. The finite element method is implemented using FEM.py code which is also uploaded, see reference for details. The two images are generated by FEM on test problems and they are used in the report for comparison.
#Possible Extensions: One application of the finite difference methods described here for heat equations is on the Black-Scholes PDE for European call option pricing. By changing variables we can correct the original PDE into a heat equations with u = Ve^(r(T-t)),x = ln(S/K)+(r-sigma^2/2)(T-t), and u_t = sigma^2/2 u_xx. Now by describing an 'initial' condition for T-t = 0, we can numerically calculated the option price for all time to maturity and spot price. The interesting thing happens with the type of initial conditions. For the traditional European call option, the payoff function is max(S-K,0), which is essentially an Relu function with nice behaviors. For that case, we already know the true solution to the PDE and can use it as a check on the numerical scheme. We can, however, consider a function that represents a stepping condition, which will pose challenges to finite difference methods since it will need to deal with the discontinuity at strike price K. A Riemann problem type solution may help in that case.