# \[ANN\] SkeelBerzins.jl v1.0.0 - A universal solver for 1D elliptic and parabolic PDEs

**URL:** <https://discourse.julialang.org/t/ann-skeelberzins-jl-v1-0-0-a-universal-solver-for-1d-elliptic-and-parabolic-pdes/106804>\
**Category:** Package Announcements\
**Tags:** package, announcement, diffeq, pde, fem\
**Created:** [November 27, 2023, 3:16pm UTC](https://discourse.julialang.org/t/ann-skeelberzins-jl-v1-0-0-a-universal-solver-for-1d-elliptic-and-parabolic-pdes/106804 "2023-11-27T15:16:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![g\_pourtier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/g_pourtier/32/52133_2.png) [@g\_pourtier](https://discourse.julialang.org/u/g_pourtier)\
**Post date:** [November 27, 2023, 3:16pm UTC](https://discourse.julialang.org/t/ann-skeelberzins-jl-v1-0-0-a-universal-solver-for-1d-elliptic-and-parabolic-pdes/106804/1 "2023-11-27T15:16:17Z")

</div>

I am pleased to announce the official release of [SkeelBerzins.jl](https://github.com/gregoirepourtier/SkeelBerzins.jl) v1.0.0.

SkeelBerzins.jl is a universal solver for systems of one-dimensional elliptic and parabolic nonlinear partial differential equations. The package provides an API similar to MATLAB’s [pdepe](https://www.mathworks.com/help/matlab/ref/pdepe.html) and is based on the spatial discretization from the paper by Skeel and Berzins [1], which follows the method of lines together with a finite-element discretization. The time discretization is done either by the [DifferentialEquations.jl](https://github.com/SciML/DifferentialEquations.jl) package or using the implicit Euler method (internal method).

The solver requires the PDE problem to be formulated as follows:

\begin{equation\*} c\left(x,t,u,u\_x\right) u\_t = x^{-m}\left(x^m f\left(x,t,u,u\_x\right)\right)\_x + s(x,t,u,u\_x) \end{equation\*}

with associated boundary conditions expressed as:

\begin{equation\*} p^i\left(x,t,u\right) + q^i\left(x,t\right)f^i\left(x,t,u,u\_x\right) = 0 \end{equation\*}

for i=1, \; \cdots, \; npde (number of PDEs). Initial conditions must also be provided. For more information on the problem definition and assumptions, please consult the [doc](https://gregoirepourtier.github.io/SkeelBerzins.jl/stable/). For a list of various examples, check [here](https://gregoirepourtier.github.io/SkeelBerzins.jl/stable/module_examples/Example101_LinearDiffusion/).

## Features of SkeelBerzins.jl:

- the specific finite-element discretization used ensures second-order accuracy in space for various systems of coordinates (cartesian and polar). Convergence tests are available [here](https://github.com/gregoirepourtier/Master-Thesis/tree/main/scripts/chapter2).

- well-integrated into the SciML ecosystem with access to time integration methods through DifferentialEquations.jl and linear solvers via LinearSolve.jl.

- designed with a focus on performance, using an allocation-free method for assembling the system of ODEs/DAEs.

- interpolation available in time and space on the solution object (or by using the `pdeval` method).

- takes advantage of the operator’s sparsity to compute Jacobians in the Newton method and in the DifferentialEquations.jl solvers by using SparseDiffTools.jl.

## Extended Capabilities:

- possibility to solve pure elliptic problems by running one iteration of the implicit Euler method with a time step set to infinity.

- variability of time discretizations through DifferentialEquations.jl.

- Performance improvement, see figure below comparing SkeelBerzins.jl and MATLAB’s pdepe. [Reproducible code](https://github.com/gregoirepourtier/Master-Thesis/tree/main/scripts/chapter4) is also available.

- code designed to be compatible with general numeric datatypes.

- possibility to use [StaticArrays](https://github.com/JuliaArrays/StaticArrays.jl) to define system of PDEs avoiding “heap allocations”.

 ![plot_benchmark](https://global.discourse-cdn.com/julialang/original/3X/f/d/fd9b81739b7cefada410836bc28a0d72dee8531d.png)

## Future extensions:

- possiblity to define species only on a subregion of the general domain.

- extension to solve two-scale problems.

## Acknowledgments:

Many thanks to @j-fu, for his valuable mentorship and numerous discussions.

Any suggestions for improving the package are more than welcome.  
Best,  
Grégoire Pourtier

## Reference:

[1] Skeel, Robert D. and Berzins, Martin, “A Method for the Spatial Discretization of Parabolic Equations in One Space Variable”, SIAM Journal on Scientific and Statistical Computing, Vol. 11, 1990, pp.1–32.
