SciML / DiffEqOperators.jl

Linear operators for discretizations of differential equations and scientific machine learning (SciML)
https://docs.sciml.ai/DiffEqOperators/stable/
Other
285 stars 74 forks source link

Support for compact finite difference operators #278

Open stillyslalom opened 3 years ago

stillyslalom commented 3 years ago

Compact finite difference schemes are families of high-order implicit operators for derivatives on structured rectilinear or curvilinear grids, most commonly used for hyperbolic PDEs for their favorable dispersion and dissipation properties. They require the solution of a tridiagonal or pentadiagonal linear system α F' = A F for the derivative vector F', with the coefficients of the a and α matrices constrained by the following set of relations (from https://www.sciencedirect.com/science/article/pii/002199919290324R)

image

stillyslalom commented 3 years ago

While DiffEq.jl principally focuses on efficient & flexible time integration routines, the (mis-)behavior of hyperbolic PDEs is often dominated by spatial errors, which readily explode when given the slightest chance. See section 2.4 of [1] for a brief overview of spatial error terms arising from common finite schemes when solving the advection equation.

[1] Numerical Methods for Wave Equations in Geophysical Fluid Dynamics, D.R. Durran https://books.google.com/books?id=JioBCAAAQBAJ&lpg=PR7&ots=twNJjSoGNv&lr&pg=PA72#v=onepage&q&f=false

ChrisRackauckas commented 3 years ago

Yup, DifferentialEquations.jl is very time-focused, but the greater SciML ecosystem is made to cover things like spatial discretization and stuff like this, and yes it's definitely important as well.

jagot commented 3 years ago

Just FYI, CompactBases.jl has the lowest-order (tridiagonal multiply, tridiagonal solve) compact finite-differences scheme already implemented: https://juliaapproximation.github.io/CompactBases.jl/stable/fd_overview/. Not very good support for other boundary conditions than Dirichlet0 yet.