adjoint-poiseuille2d¶
英語 | 日本語
Discrete-adjoint LBM sensitivity on body-force-driven plane Poiseuille flow, validated cell-for-cell against central finite differences. A clean-room demonstrator of "differentiate the converged LBM fixed point" -- the building block of LBM-based gradient optimisation / topology / parameter design.
概要: 収束した LBM 不動点に対する離散随伴。目的関数の勾配を随伴法と中心差分でセルごとに突き合わせ、随伴の実装が正しいことを厳密に示す。
Plots¶
この計算が書き出した QoI の時系列・分布。参照値がある場合は水平線で重ねている。



Build & run¶
cmake -S native -B native/build && cmake --build native/build -j
./native/build/orheo-adjoint-poiseuille2d
adjoint_poiseuille2d [N] [Re] [outdir]
このページの図を作った計算のコスト(Miyabi-G Grace CPU (72 cores, -stdpar=multicore)): 99.8 s wall。
Validation¶
| Tier | T0 — 収束次数まで確認 |
| QoI | gradient_error |
| Reference | discrete adjoint gradient vs finite differences |
| Gate | — ゲートなし |
Source & run details¶
| Item | Value |
|---|---|
| Target | orheo-adjoint-poiseuille2d |
| Source | native/benchmarks/adjoint_poiseuille2d.cpp |
| Lattice | D3Q19 |
| GPU twin | no |
| Modules | lbm_d3q19.hpp |
| Gallery run | 2026-07-27 @ 7628c0cf |
| Args | 16 2 . |
| Wall time | 99.82 s |
| CPU time | 4991.82 s |
| Device | Miyabi-G Grace CPU (72 cores, -stdpar=multicore) |
Computation log¶
この計算の実際の出力(先頭と末尾)。
adjoint_poiseuille2d N=16 Re=2.0 nu=0.40000 Gref=6.2500e-04 (tau=1.7000)
[forward] target profile at Gtgt=8.1250e-04 ...
[forward] control profile at Gbase=6.2500e-04 ...
target steps=2501 control steps=2501 J0=2.04797145e-03 umax_ctrl=0.05111
[adjoint] converged in 90000 iters. dJ/dG (scalar, sum of field) = -2.1845028750e+01
[FD-scalar] sweeping step h ...
h=6.250e-05 (h/G=1.0e-01) FD=-2.1845028750e+01 adj=-2.1845028750e+01 rel=4.456e-14
h=3.125e-05 (h/G=5.0e-02) FD=-2.1845028750e+01 adj=-2.1845028750e+01 rel=4.635e-14
h=1.563e-05 (h/G=2.5e-02) FD=-2.1845028750e+01 adj=-2.1845028750e+01 rel=2.347e-13
h=7.813e-06 (h/G=1.3e-02) FD=-2.1845028750e+01 adj=-2.1845028750e+01 rel=1.106e-12
h=3.906e-06 (h/G=6.3e-03) FD=-2.1845028750e+01 adj=-2.1845028750e+01 rel=5.676e-14
h=1.953e-06 (h/G=3.1e-03) FD=-2.1845028750e+01 adj=-2.1845028750e+01 rel=7.530e-14
h=9.766e-07 (h/G=1.6e-03) FD=-2.1845028750e+01 adj=-2.1845028750e+01 rel=2.517e-12
h=4.883e-07 (h/G=7.8e-04) FD=-2.1845028750e+01 adj=-2.1845028750e+01 rel=7.060e-12
...
it=10 J=3.555710e-06 (grad_norm=6.692e-02 step=2.697e-04)
it=15 J=2.506032e-06 (grad_norm=5.657e-02 step=2.560e-04)
[opt] J: 2.047971e-03 -> 1.967093e-06 (1041.12x reduction)
==== SUMMARY ====
scalar adjoint dJ/dG = -2.1845028750e+01 ; best FD = -2.1845028750e+01 ; rel-err = 4.456e-14 at h/G=1.0e-01
distributed field: max adjoint-vs-FD rel-err over 7 rows = 2.023e-12
optimisation: J 2.048e-03 -> 1.967e-06
PASS (discrete adjoint reproduces finite-difference gradient)