agd

Adaptive Grid Discretizations (agd) package.

This package is intented as a toolbox for discretizing and solving partial differential equations (PDEs), especially in the following contexts :

  • A Cartesian grid is used for the domain discretization.
  • The PDE embeds geometric information, possibly strongly anisotropic.
  • One puts a strong emphasis on preserving the structure of the PDE (monotony, causality, degenerate ellipticity, ...) at the discrete level.
  • Generic CPU/GPU programming.

This package comes with an extensive suite of notebooks, which serve simultaneously the purposes of documentation, mathematical description, and testing. Please see https://github.com/Mirebeau/AdaptiveGridDiscretizations

The AGD package is architectured around the following main components:

  • AutomaticDifferentiation : automatically compute gradients, hessians, jacobians, in dense or sparse format, using operator and function overloading.
  • Eikonal : a ready to use solver of (generalized, anisotropic) eikonal equations. Those are partial differential equations which characterize minimal distances w.r.t. Riemannian or other classes of metrics.

  • Metrics : helper classes for classical and less classical objects (Riemannian metrics, Hooke elasticity tensors, etc) used to encode geometric information.

  • FiniteDifferences, Domain, Interpolation : helper classes for handling function values stored in arrays and designing numerical schemes.

  • LinearParallel : basic linear algebra operations, following an axes ordering convention somewhat opposite to numpy's (geometry first).

  • Selling : a decomposition method for symmetric positive definite matrices, which is a central tool in our designs of anisotropic PDE discretizations.

Adaptive Grid Discretizations using Lattice Basis Reduction (AGD-LBR)

A set of tools for discretizing anisotropic PDEs on cartesian grids

This repository contains

  • the agd library (Adaptive Grid Discretizations), written in Python® and cuda®
  • a series of jupyter notebooks in the Python® language (online static and interactive view), reproducing my research in Anisotropic PDE discretizations and their applications.
  • a basic documentation, generated with pdoc.

The AGD library

The recommended ways to install are

pip install agd

or alternatively (but this option does not include the GPU eikonal solver)

conda install agd -c agd-lbr

Reboot of the git history (february 8th 2024)

The whole notebooks, including images and videos, were previously saved in the git history, which as a result had grown to approx 750MB. After some unsuccessful attempts with BFG, I eventually had to delete and recreate the repository.

The notebooks

You may :

The notebooks are intended as documentation and testing for the adg library. They encompass:

  • Anisotropic fast marching methods, for shortest path computation.
  • Non-divergence form PDEs, including non-linear PDEs such as Monge-Ampere.
  • Divergence form anisotropic PDEs, often encountered in image processing.
  • Algorithmic tools, related with lattice basis reduction methods, and automatic differentiation.

For offline consultation, please download and install anaconda or miniconda.
Optionally, you may create a dedicated conda environnement by typing the following in a terminal:

conda env create --file agd-hfm.yaml
conda activate agd-hfm

In order to open the book summary, type in a terminal:

jupyter notebook Summary.ipynb

Then use the hyperlinks to navigate within the notebooks.

Matlab users

Recent versions of Matlab are able to call the Python interpreter, and thus to use the agd library. See Notebooks_FMM/Matlab for examples featuring the CPU and GPU eikonal solvers.

 1# Copyright 2020 Jean-Marie Mirebeau, University Paris-Sud, CNRS, University Paris-Saclay
 2# Distributed WITHOUT ANY WARRANTY. Licensed under the Apache License, Version 2.0, see http://www.apache.org/licenses/LICENSE-2.0
 3
 4
 5"""
 6Adaptive Grid Discretizations (agd) package.
 7
 8This package is intented as a toolbox for discretizing and solving partial differential
 9equations (PDEs), especially in the following contexts : 
10- A Cartesian grid is used for the domain discretization.
11- The PDE embeds geometric information, possibly strongly anisotropic.
12- One puts a strong emphasis on preserving the structure of the PDE 
13 (monotony, causality, degenerate ellipticity, ...) at the discrete level.
14- Generic CPU/GPU programming.
15
16This package comes with an extensive suite of notebooks, which serve simultaneously the
17purposes of documentation, mathematical description, and testing. Please see 
18https://github.com/Mirebeau/AdaptiveGridDiscretizations
19
20The AGD package is architectured around the following main components:
21- AutomaticDifferentiation : automatically compute gradients, hessians, jacobians, in 
22 dense or sparse format, using operator and function overloading.
23
24- Eikonal : a ready to use solver of (generalized, anisotropic) eikonal equations. Those
25 are partial differential equations which characterize minimal distances w.r.t. Riemannian
26 or other classes of metrics.
27
28- Metrics : helper classes for classical and less classical objects 
29 (Riemannian metrics, Hooke elasticity tensors, etc) used to encode geometric information.
30
31- FiniteDifferences, Domain, Interpolation : helper classes for handling function values
32 stored in arrays and designing numerical schemes.
33
34- LinearParallel : basic linear algebra operations, following an axes ordering convention
35somewhat opposite to numpy's (geometry first).
36
37- Selling : a decomposition method for symmetric positive definite matrices, which is a 
38 central tool in our designs of anisotropic PDE discretizations.
39
40.. include:: ../README.md
41"""
42__docformat__ = "restructuredtext"