[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-115135":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":15,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":16,"rankGlobal":10,"rankLanguage":10,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":20,"topics":21,"createdAt":10,"pushedAt":32,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":15,"starSnapshotCount":15,"syncStatus":36,"lastSyncTime":37,"discoverSource":38},115135,"diff-soup","stmorgenstern\u002Fdiff-soup","stmorgenstern","Multiphysics modeling, differentiable simulation, and physically-constrained machine learning in JAX using GPU-accelerated stiff solvers with sparse numerical methods ","https:\u002F\u002Fstmorgenstern.github.io\u002Fdiff-soup\u002F",null,"Python",55,4,1,0,42.1,"BSD 3-Clause \"New\" or \"Revised\" License",false,"main",true,[22,23,24,25,26,27,28,29,30,31],"deep-learning","differentiable","differential-equations","dynamics","fem","jax","multiphysics","partial-differential-equations","simulation","stiff-ode","2026-11-21 22:27:42","2026-11-15 22:06:36","# diff-soup: differentiable, sparse-oriented unified PDE suite\n\n\u003Cp align=\"left\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fstmorgenstern\u002Fdiff-soup\u002Fblob\u002Fmain\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-BSD--3--Clause-blue.svg\" alt=\"License: BSD 3-Clause\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fstmorgenstern.github.io\u002Fdiff-soup\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDocumentation-online-blue.svg\" alt=\"Docs\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2610.37333v1\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2610.37333-b31b1b.svg?style=flat\" alt=\"arXiv\">\u003C\u002Fa>\n\u003C\u002Fp>\n\ndiff-soup is a software package written in JAX for modeling, simulation, and inference of (stiff) dynamical systems governed by ODEs, DAEs, and PDEs.\n\nFor modeling:\n\n- a Recipe API that states equations in math-like notation on structured and unstructured domains;\n- finite difference, finite volume and finite element discretizations;\n- sparse Jacobians assembled by automatic differentiation with graph coloring.\n\nFor simulation:\n\n- three variable-step, variable-order stiff integrators written in JAX, `JNDF`, `JBDF` and `JIDA`, for ODEs and DAEs up to index one;\n- sparse direct solves with NVIDIA cuDSS on the GPU, and KLU or dense solves on the CPU;\n- forward and reverse mode differentiation of every solve, to second order;\n- batched solves, with data and model parallelism across GPUs and cluster nodes.\n\nFor inference:\n\n- parameter estimation using least squares estimation, maximum likelihood estimation (MLE), and maximum a posteriori (MAP) estimation;\n- physically-constrained deep learning using differentiable simulation, with neural networks embedded inside the physical model.\n\n![The three modules of diff-soup](https:\u002F\u002Fraw.githubusercontent.com\u002Fstmorgenstern\u002Fdiff-soup\u002Fmain\u002F.github\u002Fassets\u002Fsoftware_overview.png)\n\nThe modeling, simulation and inference modules of diff-soup, and the JAX and GPU features they are built on.\n\n## Installation\n\n```bash\npip install \"diff-soup[cu13]\"   # CUDA 13, driver 580 or newer\npip install \"diff-soup[cu12]\"   # CUDA 12, driver 525 or newer\npip install diff-soup           # CPU only\n```\n\nRequires Linux on x86_64 or ARM (aarch64) and Python 3.12 or 3.13. The GPU backend needs an NVIDIA GPU of compute capability 8.0 or newer.\n\nTurn on JAX's 64-bit mode with `jax.config.update(\"jax_enable_x64\", True)` before building a problem.\n\nBuilding from source is covered on the [installation page](https:\u002F\u002Fstmorgenstern.github.io\u002Fdiff-soup\u002Finstallation\u002F).\n\n## Documentation\n\nAvailable at [https:\u002F\u002Fstmorgenstern.github.io\u002Fdiff-soup\u002F](https:\u002F\u002Fstmorgenstern.github.io\u002Fdiff-soup\u002F).\n\n## Quick example\n\nThe two-dimensional Brusselator, a stiff reaction-diffusion system, on a 32 by 32 finite-volume grid with its walls held at the reaction steady state:\n\n```python\nimport diff_soup as ds\nimport jax\nimport jax.numpy as jnp\n\njax.config.update(\"jax_enable_x64\", True)\n\nn = 32\nA, B, alpha = 1.0, 3.0, 1.0 \u002F 50.0\n\nspec = ds.problem(\"brusselator\")\nspec.domain(\"square\", ds.domains.cartesian_grid_2d(n, n, 1.0, 1.0, method=\"fvm\"))\nspec.field(\"u\", mass=\"differential\",\n           init=lambda x, y: A + jnp.sin(2 * jnp.pi * x) * jnp.sin(2 * jnp.pi * y))\nspec.field(\"v\", mass=\"differential\", init=lambda x, y: jnp.full_like(x, B \u002F A))\n\n@spec.equations(writes=(\"u\", \"v\"), reads=(\"u\", \"v\"))\ndef brusselator(q):\n    uuv = q.u**2 * q.v\n    du = A + uuv - (B + 1.0) * q.u + alpha * q.ops.laplacian(q.u)\n    dv = B * q.u - uuv + alpha * q.ops.laplacian(q.v)\n    return {\"u\": du, \"v\": dv}\n\ni, j = jnp.indices((n, n))\nwall = ((i == 0) | (i == n - 1) | (j == 0) | (j == n - 1)).ravel()\nspec.bc.dirichlet(\"u\", on=wall, value=A)\nspec.bc.dirichlet(\"v\", on=wall, value=B \u002F A)\n\nproblem = spec.build()\ny0 = spec.assemble_state({})\n\nsol = ds.pdesolve(problem, ds.JIDA(), (0.0, 10.0), y0)\nu_end = sol.ys[-1][: n * n]\nprint(float(u_end.mean()))   # the average of u over the square at t = 10\n```\n\n![The Brusselator solution](https:\u002F\u002Fraw.githubusercontent.com\u002Fstmorgenstern\u002Fdiff-soup\u002Fmain\u002F.github\u002Fassets\u002Fbrusselator_2d.gif)\n\nu and v of the same model on a 128 by 128 grid, from t = 0 to t = 10.\n\n## Acknowledgments\n\ndiff-soup builds on the following projects.\n\n**Time stepping**  \n[SUNDIALS](https:\u002F\u002Fcomputing.llnl.gov\u002Fprojects\u002Fsundials): IDA and CVODE, whose step-size, error-weight and solver-reuse rules the integrators follow (Hindmarsh et al. 2005).  \n[OrdinaryDiffEq.jl](https:\u002F\u002Fgithub.com\u002FSciML\u002FOrdinaryDiffEq.jl): the QNDF method the NDF integrator follows (Rackauckas and Nie 2017).  \n[SciPy](https:\u002F\u002Fscipy.org): BDF dense output and the bounded least-squares trust region.  \n\n**Sparse direct solvers**  \n[SuiteSparse KLU](https:\u002F\u002Fgithub.com\u002FDrTimothyAldenDavis\u002FSuiteSparse): the CPU sparse LU (Davis and Palamadai Natarajan 2010).  \n[SuperLU_MT](https:\u002F\u002Fgithub.com\u002Fxiaoyeli\u002Fsuperlu_mt): the threaded CPU sparse LU (Li 2005).  \n[NVIDIA cuDSS](https:\u002F\u002Fdocs.nvidia.com\u002Fcuda\u002Fcudss\u002F): the GPU sparse direct solver.  \n\n**JAX ecosystem**  \n[JAX](https:\u002F\u002Fgithub.com\u002Fjax-ml\u002Fjax): the array library and compiler diff-soup is written in.  \n[Equinox](https:\u002F\u002Fgithub.com\u002Fpatrick-kidger\u002Fequinox): modules and PyTree tools.  \n[Diffrax](https:\u002F\u002Fgithub.com\u002Fpatrick-kidger\u002Fdiffrax): the interfaces for saving output and events, which diff-soup mirrors.  \n[jaxtyping](https:\u002F\u002Fgithub.com\u002Fpatrick-kidger\u002Fjaxtyping): shape and dtype annotations.  \n[Optax](https:\u002F\u002Fgithub.com\u002Fgoogle-deepmind\u002Foptax): first-order optimisers for the embedded neural networks.  \n[BlackJAX](https:\u002F\u002Fgithub.com\u002Fblackjax-devs\u002Fblackjax): posterior sampling.  \n\ndiff-soup is released under the BSD 3-Clause License, see [LICENSE](https:\u002F\u002Fgithub.com\u002Fstmorgenstern\u002Fdiff-soup\u002Fblob\u002Fmain\u002FLICENSE). Third-party licences and notices are listed in [THIRD_PARTY_NOTICES.md](https:\u002F\u002Fgithub.com\u002Fstmorgenstern\u002Fdiff-soup\u002Fblob\u002Fmain\u002FTHIRD_PARTY_NOTICES.md).\n\n## Citation\n\nIf you use diff-soup, please cite the paper, [arXiv:2610.37333](https:\u002F\u002Farxiv.org\u002Fabs\u002F2610.37333v1).\n\n```bibtex\n@article{degnanmorgenstern2026diffsoup,\n    title={diff-soup: {GPU}-native Differentiable Simulation and Inference for Large-scale Stiff Dynamical Systems},\n    author={Samuel Degnan-Morgenstern and Martin Z. Bazant},\n    journal={arXiv preprint arXiv:2610.37333},\n    year={2026},\n}\n```\n","diff-soup 是一个基于 JAX 的可微分多物理场建模与仿真库，专注于刚性常微分方程（ODE）、微分代数方程（DAE）和偏微分方程（PDE）的高精度、稀疏化数值求解。其核心功能包括：支持数学符号式建模的 Recipe API；融合自动微分与图着色的稀疏雅可比矩阵构建；GPU 加速的三类刚性积分器（JNDF\u002FJBDF\u002FJIDA）及稀疏直接求解器（cuDSS\u002FKLU）；全链路前向\u002F反向二阶可微仿真；以及面向物理约束的参数估计与嵌入式神经网络联合学习。适用于计算物理、工程仿真、科学机器学习等需高保真、可导、大规模数值建模的科研与工业场景。",2,"2026-11-24 04:50:28","CREATED_QUERY"]