The purpose of this library is to solve any linear partial differential equation using an implicit finite difference scheme on a one dimensional domain. The library covers a wide range of boundary/initial conditions since both can be specified as equations in function of inner/previous nodes (more details in demo.ipynb file). The problem to be solved is as follows:
pip install FDpy
The library first includes the finite difference solver which automatically chooses the finite difference scheme based on the specified order of the equation and accuracy needed (following [1]). Second, the library also includes a post-processing module where solutions can be animated and compared to the theoritcal solution if available. Third, a symbolic tree is used to display and evaulate the finite difference scheme for any order. This provides more flexibility, especially in providing initial conditions for isntance.
[1] Fornberg, Bengt. (1988). Generation of finite difference formulas on arbitrarily spaced grids. Mathematics of computation 51.184, p:699-706.