File size: 10,215 Bytes
3da5b01 8a9d128 3da5b01 8a9d128 d15ef0e 8a9d128 d15ef0e 8a9d128 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | ---
tags:
- physics
- simulation
- FEM
- PDE
- neural-operator
- scientific-computing
- domain-decomposition
size_categories:
- 100K<n<1M
pretty_name: SNI-Dataset
dataset_creators:
- Bosch Center for Artificial Intelligence (BCAI)
viewer: false
---
# SNI-Data
<p align="center">
<img src=".huggingface/Bosch_logo.png" alt="Bosch Logo" width="200">
</p>
<p align="center">
<em>Created by <a href="https://www.bosch-ai.com/">Bosch Center for Artificial Intelligence (BCAI)</a></em>
<br>
<strong>Paper:</strong> <a href="https://arxiv.org/abs/2504.00510">Operator Learning with Domain Decomposition for Geometry Generalization in PDE Solving</a> (ICLR 2026)
</p>
A benchmark of 2D finite-element PDE solutions for training and evaluating neural operators with geometry generalization. Each sample is a complete FEM problem defined on an unstructured triangular mesh—random polygon geometry, boundary conditions (Dirichlet and/or Neumann), and optionally coefficient fields or time-stepping parameters—paired with the solved solution field $u$.
The dataset accompanies the **Schwarz Neural Inference (SNI)** framework, which combines local operator learning with domain decomposition methods to generalize to unseen complex geometries at inference time.
## Dataset Summary
| Property | Value |
|---|---|
| Domain | 2D Partial Differential Equations (FEM) |
| Number of PDE types | 5 |
| Training samples | 200,000 |
| Test samples (simple domains) | 26,500 |
| Test samples (evaluation domains) | 1,330 |
| Total samples | ~227,830 |
| File format | Pickle (`.pkl`) |
| Mesh type | Unstructured triangular (gmsh) |
| Solver | FEniCSx (dolfinx) |
## PDE Types
| PDE | Equation | Boundary Conditions | Type |
|---|---|---|---|
| `laplace2d` | $-\nabla^2 u = 0$ | Dirichlet | Stationary |
| `laplace2d_mixed` | $-\nabla^2 u = 0$ | Mixed Dirichlet / Neumann | Stationary |
| `darcy2d` | $-\nabla \cdot (a(x)\nabla u) = f(x)$ | Dirichlet | Stationary |
| `heat2d` | $\partial u / \partial t - \alpha \nabla^2 u = 0$ | Time-dependent Dirichlet | Transient |
| `nonlinear_poisson2d` | $-\nabla \cdot (q(u)\nabla u) = 0$, $q(u) = 1 + u^2$ | Dirichlet | Stationary (nonlinear) |
### PDE Details
**Laplace (Dirichlet):** The classical Laplace equation on random polygonal domains with randomized Dirichlet boundary values at each boundary node.
**Laplace (Mixed):** Same equation, but the boundary is split into contiguous Dirichlet and Neumann segments. With probability 0.2 the entire boundary is Dirichlet; otherwise a random contiguous portion is assigned Neumann conditions.
**Darcy Flow:** A variable-coefficient elliptic PDE. The coefficient field $a(x)$ and source term $f(x)$ are independently randomized per node ($a \in [0, 1]$, $f \in [-5, 0]$). Boundary values are scaled by a random factor in $[0.3, 1.0]$.
**Heat Equation:** Time-dependent diffusion solved with implicit Euler. Training uses 10 time steps ($T = 0.1$, $\Delta t = 0.01$) with random thermal diffusivity $\alpha \in [0.1, 1.0]$. Evaluation uses 50 time steps ($T = 0.5$) with fixed $\alpha = 1.0$.
**Nonlinear Poisson:** A nonlinear PDE with solution-dependent diffusivity $q(u) = 1 + u^2$, solved via Newton's method with GMRES and BoomerAMG preconditioning.
## Training Data
Training data is generated on **random simple polygons** with varying numbers of vertices, triangulated using gmsh.
| Subset | Samples | Polygons × Batch | Vertices | Mesh Size |
|---|---|---|---|---|
| `laplace2d_simple` | 20,000 | 2000 × 10 | 3–12 | 0.1 |
| `laplace2d_mixed_simple` | 40,000 | 2000 × 20 | 3–12 | 0.1 |
| `darcy2d_simple` | 40,000 | 2500 × 10 | 3–16 | 0.1 |
| `heat2d_simple` | 80,000 | 1600 × 50 | 3–12 | 0.1 |
| `nonlinear_poisson2d_simple` | 20,000 | 2000 × 10 | 3–12 | 0.1 |
> **Note:** Each random polygon is reused for multiple samples (the "Batch" count) with different boundary conditions and/or coefficient fields. Coordinates are shifted by $[0.5, 0.5]$ to center domains around the origin.
## Test Data
### Simple Domain Test Sets
Test data on random polygons (same generation process as training, different samples):
| Subset | Samples |
|---|---|
| `laplace2d_simple` | 2,500 |
| `laplace2d_mixed_simple` | 4,000 |
| `darcy2d_simple` | 2,500 |
| `heat2d_simple` | 12,500 |
| `nonlinear_poisson2d_simple` | 2,500 |
### Evaluation Domain Test Sets
Test data on **pre-defined complex geometries** (fixed meshes), used to evaluate geometry generalization:
| Domain | Mesh File | Description |
|---|---|---|
| **A** (Schwarz) | `A-schwarz.msh` | Overlapping disk and rectangle |
| **B** (Holes) | `B-holes.msh` | Square with two interior holes |
| **C** (Bosch) | `C-bosch.msh` | Disk with complex shape removed |
Each PDE is evaluated on each domain with 100 samples (10 for `heat2d`):
| Subset | Domain A | Domain B | Domain C |
|---|---|---|---|
| `laplace2d` | 100 | 100 | 100 |
| `laplace2d_mixed` | 100 | 100 | 100 |
| `darcy2d` | 100 | 100 | 100 |
| `heat2d` | 10 | 10 | 10 |
| `nonlinear_poisson2d` | 100 | 100 | 100 |
Additional evaluation meshes (`D-dolphin.msh`, `E-disk.msh`, `F-triangle.msh`) are available for extended evaluation.
## Data Format
All data is stored in Python pickle files (`.pkl`). Each file contains a **list of samples**. The format varies by PDE type:
### Laplace2d / Laplace2d Mixed / Nonlinear Poisson2d
Each sample is a tuple: `(sol, [bc])`
| Array | Shape | Description |
|---|---|---|
| `sol` | `(N, 3)` | Solution field: `[x, y, u]` at each mesh node |
| `bc` | `(M, 4)` | Boundary conditions: `[x, y, value, type]` at each boundary node |
- `type = 0` → Dirichlet boundary condition ($u = \text{value}$)
- `type = 1` → Neumann boundary condition ($\partial u / \partial n = \text{value}$)
- For `laplace2d` and `nonlinear_poisson2d`, all boundaries are Dirichlet (`type = 0`)
### Darcy2d
Each sample is a tuple: `(sol, [qf, bc])`
| Array | Shape | Description |
|---|---|---|
| `sol` | `(N, 3)` | Solution field: `[x, y, u]` |
| `qf` | `(N, 4)` | Coefficient and source: `[x, y, a, f]` at each mesh node |
| `bc` | `(M, 4)` | Boundary conditions: `[x, y, u_D, 0]` |
### Heat2d
Each sample is a tuple: `(sol, alpha, [bc])`
| Array | Shape | Description |
|---|---|---|
| `sol` | `(N, 2 + T)` | Solution trajectory: `[x, y, u_0, u_1, ..., u_{T-1}]` |
| `alpha` | scalar | Thermal diffusivity |
| `bc` | `(M, 2 + T + 1)` | Boundary trajectory: `[x, y, bc_0, ..., bc_{T-1}, 0]` |
- Training: $T = 10$ time steps ($\Delta t = 0.01$)
- Evaluation: $T = 50$ time steps ($\Delta t = 0.01$)
## Directory Structure
```
data/
├── 2d/
│ ├── laplace2d_simple_20000_train.pkl
│ ├── laplace2d_simple_2500_test.pkl
│ ├── laplace2d_schwarz_100_test.pkl
│ ├── laplace2d_holes_100_test.pkl
│ ├── laplace2d_bosch_100_test.pkl
│ ├── laplace2d_mixed_simple_40000_train.pkl
│ ├── laplace2d_mixed_schwarz_100_test.pkl
│ ├── laplace2d_mixed_holes_100_test.pkl
│ ├── laplace2d_mixed_bosch_100_test.pkl
│ ├── darcy2d_simple_40000_train.pkl
│ ├── darcy2d_simple_2500_test.pkl
│ ├── darcy2d_schwarz_100_test.pkl
│ ├── darcy2d_holes_100_test.pkl
│ ├── darcy2d_bosch_100_test.pkl
│ ├── heat2d_simple_100000_train.pkl
│ ├── heat2d_simple_12500_test.pkl
│ ├── heat2d_schwarz_10_test.pkl
│ ├── heat2d_holes_10_test.pkl
│ ├── heat2d_bosch_10_test.pkl
│ ├── nonlinear_poisson2d_simple_20000_train.pkl
│ ├── nonlinear_poisson2d_simple_2500_test.pkl
│ ├── nonlinear_poisson2d_schwarz_100_test.pkl
│ ├── nonlinear_poisson2d_holes_100_test.pkl
└── └── nonlinear_poisson2d_bosch_100_test.pkl
```
## Quick Start
```python
import pickle
# Load training data
with open("data/2d/laplace2d_simple_20000_train.pkl", "rb") as f:
datalist = pickle.load(f)
# Each sample is a tuple
sol, (bc,) = datalist[0]
# Solution field
x, y, u = sol[:, 0], sol[:, 1], sol[:, 2] # (N,) each
# Boundary conditions
bx, by, bc_val, bc_type = bc[:, 0], bc[:, 1], bc[:, 2], bc[:, 3]
print(f"Number of samples: {len(datalist)}")
print(f"Mesh nodes: {sol.shape[0]}, Boundary nodes: {bc.shape[0]}")
```
```python
# Load Darcy flow data (includes coefficient field)
with open("data/2d/darcy2d_simple_40000_train.pkl", "rb") as f:
datalist = pickle.load(f)
sol, (qf, bc) = datalist[0]
# Coefficient field a(x) and source f(x)
a_coeff = qf[:, 2] # (N,)
f_source = qf[:, 3] # (N,)
```
```python
# Load Heat equation data (time-dependent)
with open("data/2d/heat2d_simple_80000_train.pkl", "rb") as f:
datalist = pickle.load(f)
sol, alpha, (bc,) = datalist[0]
# Solution at each time step
x, y = sol[:, 0], sol[:, 1]
u_timesteps = sol[:, 2:] # (N, 10) — solution at 10 time steps
print(f"Thermal diffusivity: {alpha}")
```
## Data Generation
Data is generated using [FEniCSx](https://fenicsproject.org/) (dolfinx) for the FEM solver and [gmsh](https://gmsh.info/) for mesh generation:
```bash
# Generate training data (parallelized across processes)
bash scripts/generate_data.sh laplace2d train 8
# Generate evaluation data on pre-defined domains
python data_generation/generate_eval.py --pde all --domain all
```
See the [project repository](https://arxiv.org/abs/2504.00510) for the full training and inference pipeline.
## Intended Use
SNI-Dataset is designed to:
- Train and benchmark **neural operators** for PDE solving on irregular geometries.
- Evaluate **geometry generalization** — training on simple random polygons, testing on complex unseen domains.
- Support research on **domain decomposition methods** combined with learned operators.
- Provide a diverse set of PDE types (elliptic, parabolic, nonlinear) with varying boundary condition types.
## Citation
If you use SNI-Dataset in your work, please cite:
```bibtex
@inproceedings{
title={Operator Learning with Domain Decomposition for Geometry Generalization in PDE Solving},
booktitle={International Conference on Learning Representations (ICLR)},
year={2026},
url={https://arxiv.org/abs/2504.00510}
}
``` |