questionstorer commited on
Commit
8a9d128
·
verified ·
1 Parent(s): cb89d66

add readme

Browse files
Files changed (2) hide show
  1. .huggingface/Bosch_logo.png +3 -0
  2. README.md +269 -1
.huggingface/Bosch_logo.png ADDED

Git LFS Details

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