![CI](https://img.shields.io/github/actions/workflow/status/UQatKIT/Eikonax/main.yaml?label=CI)
![Docs](https://img.shields.io/github/actions/workflow/status/UQatKIT/Eikonax/main.yaml?label=Docs)
![Coverage](https://img.shields.io/codecov/c/github/UQatKIT/Eikonax)
![Version](https://img.shields.io/pypi/v/Eikonax)
![Python Version](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FUQatKIT%2FEikonax%2Fmain%2Fpyproject.toml)
![License](https://img.shields.io/github/license/UQatKIT/Eikonax) <br>
![JAX](https://img.shields.io/badge/JAX-Accelerated-9cf.svg)
![Beartype](https://github.com/beartype/beartype-assets/raw/main/badge/bear-ified.svg)
![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)
# Eikonax: A Fully Differentiable Solver for the Anisotropic Eikonal Equation
Eikonax is a pure Python implementation of a solver for the anisotropic eikonal equation on triangulated meshes. In particular, it focuses on domains $\Omega$ either in 2D Euclidean space, or 2D manifolds in 3D Euclidean space. For a given, space-dependent parameter tensor field $\mathbf{M}$, and a set $\Gamma$ of initially active points, Eikonax computes the arrival times $u$ according to
$$
\begin{gather*}
\sqrt{\big(\nabla u(\mathbf{x}),\mathbf{M}(\mathbf{x})\nabla u(\mathbf{x})\big)} = 1,\quad \mathbf{x}\in\Omega, \\
\nabla u(\mathbf{x}) \cdot \mathbf{n}(\mathbf{x}) \geq 0,\quad \mathbf{x}\in\partial\Omega, \\
u(\mathbf{x}_0) = u_0,\quad \mathbf{x}_0 \in \Gamma.
\end{gather*}
$$
The iterative solver is based on *Godunov-type upwinding* and employs global *Jacobi updates*, which can be efficiently ported to SIMD architectures.
In addition, Eikonax implements an efficient algorithm for the evaluation of *parametric derivatives*, meaning the derivative of the solution vector with respect to the parameter tensor field, $\frac{du}{d\mathbf{M}}$. More precisely, we assume that the tensor field is parameterized through some vector $\mathbf{m}$, s.th. we compute $\frac{du}{d\mathbf{m}} = \frac{du}{d\mathbf{M}}\frac{d\mathbf{M}}{d\mathbf{m}}$. This make Eikonax particularly suitable for the inverse problem setting, where derivative information is typically indispensable for efficient solution procedures.
Through exploitation of causality in the forward solution, Eikonax can compute these derivatives through discrete adjoints on timescales much smaller than those for the forward solve.
### Key Features
- **Supports anisotropic conductivity tensors**
- **Works on irregular meshes**
- **GPU offloading of performance-relevant computations**
- **Super fast derivatives through causality-informed adjoints**
>Eikonax is mainly based on the [JAX](https://jax.readthedocs.io/en/latest/) software library. This allows for GPU offloading of relevant computations. In addition, Eikonax makes extensive use of JAX`s just-in-time compilation and automatic differentiation capabilities.
## Getting Started
Eikonax is deployed as a python package, simply install via
```bash
pip install eikonax
```
For development, we recommend using the great [uv](https://docs.astral.sh/uv/) project management tool, for which Eikonax provides a universal lock file. To set up a reproducible environment, run
```bash
uv sync --all-groups
```
in the project root directory.
## Documentation
The [documentation](https://uqatkit.github.io/Eikonax/) provides further information regarding usage, theoretical background, technical setup and API. Alternatively, you can check out the notebooks under [`examples`](https://github.com/UQatKIT/Eikonax/tree/main/examples)
## Acknowledgement and License
Eikonax is being developed in the research group [Uncertainty Quantification](https://www.scc.kit.edu/forschung/uq.php) at KIT.
It is partially based on the excellent [FIM-Python](https://fim-python.readthedocs.io/en/latest/) tool. Eikonax is distributed as free software under the [GNU General Public License v3.0](https://choosealicense.com/licenses/gpl-3.0/).
Raw data
{
"_id": null,
"home_page": null,
"name": "eikonax",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": "Maximilian Kruse <maximilian.kruse@kit.edu>",
"keywords": "GPU acceleration, automatic differentiation, eikonal equation",
"author": null,
"author_email": "Maximilian Kruse <maximilian.kruse@kit.edu>",
"download_url": "https://files.pythonhosted.org/packages/24/82/3e9fe5c4d6c97c54035034722d224c673d50fdded313580a898a5e832e9a/eikonax-0.1.8.tar.gz",
"platform": null,
"description": "\n![CI](https://img.shields.io/github/actions/workflow/status/UQatKIT/Eikonax/main.yaml?label=CI)\n![Docs](https://img.shields.io/github/actions/workflow/status/UQatKIT/Eikonax/main.yaml?label=Docs)\n![Coverage](https://img.shields.io/codecov/c/github/UQatKIT/Eikonax)\n![Version](https://img.shields.io/pypi/v/Eikonax)\n![Python Version](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FUQatKIT%2FEikonax%2Fmain%2Fpyproject.toml)\n![License](https://img.shields.io/github/license/UQatKIT/Eikonax) <br>\n![JAX](https://img.shields.io/badge/JAX-Accelerated-9cf.svg)\n![Beartype](https://github.com/beartype/beartype-assets/raw/main/badge/bear-ified.svg)\n![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)\n\n# Eikonax: A Fully Differentiable Solver for the Anisotropic Eikonal Equation\n\nEikonax is a pure Python implementation of a solver for the anisotropic eikonal equation on triangulated meshes. In particular, it focuses on domains $\\Omega$ either in 2D Euclidean space, or 2D manifolds in 3D Euclidean space. For a given, space-dependent parameter tensor field $\\mathbf{M}$, and a set $\\Gamma$ of initially active points, Eikonax computes the arrival times $u$ according to\n\n$$\n\\begin{gather*}\n\\sqrt{\\big(\\nabla u(\\mathbf{x}),\\mathbf{M}(\\mathbf{x})\\nabla u(\\mathbf{x})\\big)} = 1,\\quad \\mathbf{x}\\in\\Omega, \\\\\n\\nabla u(\\mathbf{x}) \\cdot \\mathbf{n}(\\mathbf{x}) \\geq 0,\\quad \\mathbf{x}\\in\\partial\\Omega, \\\\\nu(\\mathbf{x}_0) = u_0,\\quad \\mathbf{x}_0 \\in \\Gamma.\n\\end{gather*}\n$$\n\nThe iterative solver is based on *Godunov-type upwinding* and employs global *Jacobi updates*, which can be efficiently ported to SIMD architectures.\nIn addition, Eikonax implements an efficient algorithm for the evaluation of *parametric derivatives*, meaning the derivative of the solution vector with respect to the parameter tensor field, $\\frac{du}{d\\mathbf{M}}$. More precisely, we assume that the tensor field is parameterized through some vector $\\mathbf{m}$, s.th. we compute $\\frac{du}{d\\mathbf{m}} = \\frac{du}{d\\mathbf{M}}\\frac{d\\mathbf{M}}{d\\mathbf{m}}$. This make Eikonax particularly suitable for the inverse problem setting, where derivative information is typically indispensable for efficient solution procedures.\nThrough exploitation of causality in the forward solution, Eikonax can compute these derivatives through discrete adjoints on timescales much smaller than those for the forward solve.\n\n### Key Features\n- **Supports anisotropic conductivity tensors**\n- **Works on irregular meshes**\n- **GPU offloading of performance-relevant computations**\n- **Super fast derivatives through causality-informed adjoints**\n\n\n>Eikonax is mainly based on the [JAX](https://jax.readthedocs.io/en/latest/) software library. This allows for GPU offloading of relevant computations. In addition, Eikonax makes extensive use of JAX`s just-in-time compilation and automatic differentiation capabilities.\n\n\n\n## Getting Started\n\nEikonax is deployed as a python package, simply install via\n```bash\npip install eikonax\n```\n\nFor development, we recommend using the great [uv](https://docs.astral.sh/uv/) project management tool, for which Eikonax provides a universal lock file. To set up a reproducible environment, run\n```bash\nuv sync --all-groups\n```\nin the project root directory.\n\n## Documentation\n\nThe [documentation](https://uqatkit.github.io/Eikonax/) provides further information regarding usage, theoretical background, technical setup and API. Alternatively, you can check out the notebooks under [`examples`](https://github.com/UQatKIT/Eikonax/tree/main/examples)\n\n\n## Acknowledgement and License\n\nEikonax is being developed in the research group [Uncertainty Quantification](https://www.scc.kit.edu/forschung/uq.php) at KIT.\nIt is partially based on the excellent [FIM-Python](https://fim-python.readthedocs.io/en/latest/) tool. Eikonax is distributed as free software under the [GNU General Public License v3.0](https://choosealicense.com/licenses/gpl-3.0/).",
"bugtrack_url": null,
"license": "GPL-3.0-only",
"summary": "Differentiable Solver for the Anisotropic Eikonal Equation on Triangulated Meshes",
"version": "0.1.8",
"project_urls": {
"documentation": "https://uqatkit.github.io/Eikonax/",
"repository": "https://github.com/UQatKIT/Eikonax"
},
"split_keywords": [
"gpu acceleration",
" automatic differentiation",
" eikonal equation"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "03c6a3bd27f64939e903d18364730886d7628d37fd2abf115a2a3fd30143806c",
"md5": "d22796a577abd1eaff08b7506be67fdc",
"sha256": "830eeb403a68386f3a1402744662ab2f70bd060d2d9d458a991d780c8f3a0454"
},
"downloads": -1,
"filename": "eikonax-0.1.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d22796a577abd1eaff08b7506be67fdc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 43549,
"upload_time": "2025-01-21T13:12:53",
"upload_time_iso_8601": "2025-01-21T13:12:53.027269Z",
"url": "https://files.pythonhosted.org/packages/03/c6/a3bd27f64939e903d18364730886d7628d37fd2abf115a2a3fd30143806c/eikonax-0.1.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "24823e9fe5c4d6c97c54035034722d224c673d50fdded313580a898a5e832e9a",
"md5": "778fbbac2114e69b06b3db7c12a324dd",
"sha256": "7e5ad341af4149ad0ef898dd091af88d5e541e478fc04b0ef5c21581500c5ca3"
},
"downloads": -1,
"filename": "eikonax-0.1.8.tar.gz",
"has_sig": false,
"md5_digest": "778fbbac2114e69b06b3db7c12a324dd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 1386770,
"upload_time": "2025-01-21T13:12:54",
"upload_time_iso_8601": "2025-01-21T13:12:54.430540Z",
"url": "https://files.pythonhosted.org/packages/24/82/3e9fe5c4d6c97c54035034722d224c673d50fdded313580a898a5e832e9a/eikonax-0.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-21 13:12:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "UQatKIT",
"github_project": "Eikonax",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "eikonax"
}