|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| check (ok, what) | |
| study_march (step, umean) | |
| sphere_solver (Cls, N, *tight, mu=1.0, dt=None, advection=None) | |
| umean (s) | |
| gate_g0b () | |
| gate_g1_small () | |
| gate_g7a () | |
| state_of (s) | |
| accelerated (Cls, calls) | |
| gate_adapter () | |
| scripted (values) | |
| certify (values, **kw) | |
| per_block (blocks) | |
| gate_certify () | |
| main () | |
| test_march_to_steady () | |
Variables | |
| float | PHI = 0.125 |
| float | L = 1.0 |
| list | FAILED = [] |
| TOL_K | |
| CHECK_EVERY | |
| N_PASS | |
| MAX_STEPS | |
| float | RHO_SLOW = 0.997 |
| int | ROUNDOFF = 1e-11 |
| tuple | SCHEMES = (("staggered", pf.Solver), ("collocated", pf.SolverColocated)) |
ctest `march_to_steady`: peclet.flow.march_to_steady and its Anderson accelerator (doc/steady_acceleration.md rev 2, work orders WO-4, WO-7). * G0(b) — `march_to_steady(accelerate=False)` IS the study's march (tests/study/ study_avg_velocity_spheres.py, the instrument copied verbatim below as `study_march`): the §11 case (one sphere, phi = 0.125, periodic unit cube, rho = mu = F = 1, nu dt / h^2 = 6, Stokes, PCG(200, 1e-8), 200 velocity sweeps), N = 16, staggered and collocated 'ghost': identical step count and bit-identical <u_x>. * a small G1 — the same case at N = 12, tight inner solves (PCG(400, 1e-12), velocity residual tolerance 1e-12, rtol 1e-10), accelerated and plain both `converged=True` with |K_acc / K_plain - 1| <= 1e-8, on both grids. * G7a — staggered N = 16 at mu = 0.0158, dt = 1.234e-2, SOU advection, whose plain march diverges: `converged=False` with reason "diverged" or "max_steps" for accelerate=False and for accelerate=True at windows 3, 5 and 8 (rev 2: no instability guard; the plain steps of the certification expose the growth). * the adapter (review R4, R5), N = 12 production, both grids: `set_dt` between calls resets the history (`num_resets` + 1) and that call does not mix (bitwise the plain step of a twin solver, while without `set_dt` a mix was pending); the same for staggered `set_advection(True)` (the advection settings are in the signature, review R5); a refused feature enabled after construction (`set_pressure_warmstart(True)`) is refused at the next call; collocated `set_advection(True)` after construction (4 -> 7 state fields) is reported as a configuration change and resets. * four pure-Python tests of the driver's certification (`peclet.flow.steady._certify`) on scripted monitor sequences: (i) four blocks with R > 1, then a geometric tail inside the budget -> "pass"; (ii) a clean tail at R = 0.99 that fails the remainder bound -> "slow" at the first such block; (iii) a sequence that never passes -> "budget" after exactly 2 (num_passes + 3) blocks; (iv) two passing blocks at R = 0.9, then R = 1.1 for every later block -> "budget" after exactly 2 (num_passes + 3) blocks, never "pass" (R >= 1 resets the pass count — what rev 2 relies on). Exit 0 pass, 1 fail, 77 skipped (no module).
| test_march_to_steady.check | ( | ok, | |
| what | |||
| ) |
Definition at line 49 of file test_march_to_steady.py.
Referenced by gate_adapter(), gate_certify(), gate_g0b(), gate_g1_small(), and gate_g7a().
| test_march_to_steady.study_march | ( | step, | |
| umean | |||
| ) |
Definition at line 61 of file test_march_to_steady.py.
References umean().
Referenced by gate_g0b().
| test_march_to_steady.sphere_solver | ( | Cls, | |
| N, | |||
| * | tight, | ||
mu = 1.0, |
|||
dt = None, |
|||
advection = None |
|||
| ) |
Definition at line 84 of file test_march_to_steady.py.
Referenced by accelerated(), gate_g0b(), gate_g1_small(), and gate_g7a().
| test_march_to_steady.umean | ( | s | ) |
Definition at line 111 of file test_march_to_steady.py.
References mean().
Referenced by gate_g0b(), gate_g1_small(), gate_g7a(), and study_march().
| test_march_to_steady.gate_g0b | ( | ) |
Definition at line 118 of file test_march_to_steady.py.
References check(), sphere_solver(), study_march(), and umean().
Referenced by main().
| test_march_to_steady.gate_g1_small | ( | ) |
Definition at line 133 of file test_march_to_steady.py.
References check(), sphere_solver(), and umean().
Referenced by main().
| test_march_to_steady.gate_g7a | ( | ) |
Definition at line 149 of file test_march_to_steady.py.
References check(), sphere_solver(), and umean().
Referenced by main().
| test_march_to_steady.state_of | ( | s | ) |
Definition at line 161 of file test_march_to_steady.py.
Referenced by gate_adapter().
| test_march_to_steady.accelerated | ( | Cls, | |
| calls | |||
| ) |
A production N = 12 sphere solver and its accelerator after `calls` step(True) calls.
Definition at line 165 of file test_march_to_steady.py.
References sphere_solver().
Referenced by gate_adapter().
| test_march_to_steady.gate_adapter | ( | ) |
Definition at line 174 of file test_march_to_steady.py.
References accelerated(), check(), and state_of().
Referenced by main().
| test_march_to_steady.scripted | ( | values | ) |
A fake step and a monitor that returns values[k] after the k-th step.
Definition at line 231 of file test_march_to_steady.py.
Referenced by certify().
| test_march_to_steady.certify | ( | values, | |
| ** | kw | ||
| ) |
Definition at line 244 of file test_march_to_steady.py.
References scripted().
Referenced by gate_certify().
| test_march_to_steady.per_block | ( | blocks | ) |
A monitor sequence (one value per step) whose block-end values are `blocks`.
Definition at line 254 of file test_march_to_steady.py.
Referenced by gate_certify().
| test_march_to_steady.gate_certify | ( | ) |
Definition at line 262 of file test_march_to_steady.py.
References certify(), check(), and per_block().
Referenced by main().
| test_march_to_steady.main | ( | ) |
Definition at line 317 of file test_march_to_steady.py.
References gate_adapter(), gate_certify(), gate_g0b(), gate_g1_small(), and gate_g7a().
Referenced by test_march_to_steady().
| test_march_to_steady.test_march_to_steady | ( | ) |
Definition at line 327 of file test_march_to_steady.py.
References main().
| float test_march_to_steady.PHI = 0.125 |
Definition at line 44 of file test_march_to_steady.py.
| float test_march_to_steady.L = 1.0 |
Definition at line 45 of file test_march_to_steady.py.
| list test_march_to_steady.FAILED = [] |
Definition at line 46 of file test_march_to_steady.py.
| test_march_to_steady.TOL_K |
Definition at line 56 of file test_march_to_steady.py.
| test_march_to_steady.CHECK_EVERY |
Definition at line 56 of file test_march_to_steady.py.
| test_march_to_steady.N_PASS |
Definition at line 56 of file test_march_to_steady.py.
| test_march_to_steady.MAX_STEPS |
Definition at line 56 of file test_march_to_steady.py.
| float test_march_to_steady.RHO_SLOW = 0.997 |
Definition at line 57 of file test_march_to_steady.py.
| int test_march_to_steady.ROUNDOFF = 1e-11 |
Definition at line 58 of file test_march_to_steady.py.
| tuple test_march_to_steady.SCHEMES = (("staggered", pf.Solver), ("collocated", pf.SolverColocated)) |
Definition at line 115 of file test_march_to_steady.py.