Skip to content

GIDEONGenerated Interpolations and Derivatives, Exact to Order N

The FD and FV stencil operators of ADAM, one pure kernel each, exact to order N, on every CPU and GPU. Finite-difference and finite-volume operators for HPC, in modern Fortran.

GIDEON, an ensō touched once by its tangent, the G seal in goldGIDEON, an ensō touched once by its tangent, the G seal in gold

Quick start ​

Build the library and run the verification programs, or pull GIDEON into your own project.

bash
git clone https://github.com/szaghi/GIDEON && cd GIDEON
fobis fetch                                                # PENF
fobis build --mode static-gnu                              # libgideon.a
fobis build --mode tests-gnu && bash scripts/run_tests.sh  # 16 programs
ini
# fobos of your project; then: fobis fetch && fobis build
[dependencies]
deps_dir = src/third_party
# GIDEON's own dependency: fobis fetch is not transitive
PENF     = https://github.com/szaghi/PENF :: branch=master
GIDEON   = https://github.com/szaghi/GIDEON :: branch=main
toml
# fpm.toml of your project
[dependencies]
GIDEON = { git = "https://github.com/szaghi/GIDEON", branch = "main" }

Each kernel takes the window of data around one point as an array section, by offset, and returns one number:

fortran
use gideon
real(R_P) :: u(-4:104), du, uf

call gideon_fd_d1_c6(u(i-3:i+3), ds, du)                   ! d1 at node i, order 6
call gideon_fv_face_ul5(u(i-4:i), uf)                      ! face i+1/2, 5 cells left
call gideon_fd_d1_c(order, u(i-order/2:i+order/2), ds, du) ! order at run time

The quick start builds and runs a first program; conventions explains the names, the windows and the kinds.

Authors ​

Stefano Zaghi

Stefano Zaghi

Chief Yak Shaver & Keeper of the Stencils

Tests everything twice, the second time upside down.

Claude

Claude

Tireless Rubber Duck & Professional Fleece Wetter @ Anthropic

AI pair programmer; derives the coefficients in exact rationals so humans don't have to, and trusts no fraction written in floating point.

License ​

GIDEON is available under your choice of license.

LicenseSPDXFile
GNU General Public License v3GPL-3.0-or-laterLICENSE.gpl3.md
BSD 2-ClauseBSD-2-ClauseLICENSE.bsd-2.md
BSD 3-ClauseBSD-3-ClauseLICENSE.bsd-3.md
MITMITLICENSE.mit.md

© Stefano Zaghi

Released under your choice of GPL-3.0-or-later, BSD-2-Clause, BSD-3-Clause or MIT.