|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Classes | |
| class | _DiagProxy |
| class | Case |
| class | Proxy |
Functions | |
| settings_of (name) | |
| umean (s) | |
| emit (a, rec) | |
| common_rec (a, case) | |
| cmd_run (flow, a) | |
| g1_bed (a, case, conv, Ks) | |
| cmd_oracle (flow, a) | |
| cmd_g3 (flow, a) | |
| cmd_g5 (flow, a) | |
| cmd_g8 (flow, a) | |
| cmd_mpi (flow, a) | |
| main () | |
Variables | |
| HERE = os.path.dirname(os.path.abspath(__file__)) | |
| tuple | BED_K_INF = (98.9156994, 98.9156995) |
| dict | G3_DEPTH = {"sphere": 1e-9, "bed": None} |
Gate instrument for the steady-march Anderson acceleration (doc/steady_acceleration.md, rev 2,
work orders WO-4, WO-5, WO-7 and WO-8). An INSTRUMENT, not a ctest: it prints one summary line per run and,
with --json, appends one JSON record per run. The numbers go to doc/steady_acceleration_log.md.
Subcommands (all on the module on PYTHONPATH; bound the OpenMP pool):
oracle WO-4: the C++ accelerator against the NumPy oracle (tests/study/anderson_oracle.py,
rev 2) — the per-step relative velocity residual of unconditional step(True) calls on
two identical solvers, max relative difference over the first --steps (30) steps.
run G1 / G2 / G6 / G7: march_to_steady per window (0 = accelerate=False), recording steps,
accelerated steps, converged / reason, K, wall time, pressure iterations per step by
phase (mixed vs plain), accelerator seconds, memory; with window 0 among the windows,
the G7c line per case: plain converged vs accelerated converged per window. The tight
staggered bed also prints the G1 bed line: |K_acc/K_inf - 1| <= |K_plain/K_inf - 1| +
1e-8, K_plain from window 0 of the same run or --k-plain (the logged certificate).
g3 G3: --steps (400) unconditional acc.step(True) per dt (--betas), tight; status,
restarts, running-min residual, final residual and K. With --extend-to N (WO-8): past
--steps, keep stepping until the running-min residual reaches the depth bar (sphere
1e-9) or N steps in total; every criterion is evaluated at the end of the run. The bed
has no depth bar: run it with --steps 3000 (a fixed 3000 calls per dt). K is sampled
after the last call that did not restart (review R3).
g5 G5: interrupt an accelerated march at step --at (25), checkpoint get_field u,v,w,p (or
set_state, velocity only), restore into a fresh solver, march again; against the
uninterrupted accelerated march.
g8 G8: accelerator overhead (acc.seconds over --steps accelerated steps) against the mean
plain step (last_step_timers()['step'], after --warmup plain steps, so both are timed
late in the march), and memory_bytes against the §6.3 formula.
mpi G4: tight march_to_steady under mpirun (flow.mpi_block + init_mpi), global <u_x>
monitor; and --hash: the state hash after --steps accelerated steps (np = 1 against a
serial build).
Cases (as the oracle builds them):
sphere §11 of doc/collocated_invisible_subspace.md: one sphere at the centre of the periodic unit
cube, phi (0.125), rho = F = 1, mu (1), nu dt / h^2 = beta (6) unless --dt; Stokes unless
--advection. K = F L^3 / (6 pi mu R <u_x>) (Zick & Homsy normalisation). The Z&H simple
cubic array is the same case at --phi 0.343 / 0.45.
bed a random arrangement (.npz: centres, radii, L), A1's K = F L^3 / (3 pi mu D <u_x> N_p).
--force sets the body force (finite Re), --implicit-advection A1's implicit advection.
Settings: production = PCG(200, 1e-8), 200 velocity sweeps, rtol 1e-4, max_steps 5000; tight =
PCG(400, 1e-12), velocity residual tolerance 1e-12, rtol 1e-10, max_steps 20000.
| steady_acceleration_gates.settings_of | ( | name | ) |
Definition at line 57 of file steady_acceleration_gates.py.
Referenced by cmd_g3(), cmd_g5(), cmd_g8(), cmd_mpi(), cmd_oracle(), and cmd_run().
| steady_acceleration_gates.umean | ( | s | ) |
| steady_acceleration_gates.emit | ( | a, | |
| rec | |||
| ) |
Definition at line 165 of file steady_acceleration_gates.py.
Referenced by cmd_g3(), cmd_g5(), cmd_g8(), cmd_mpi(), cmd_oracle(), cmd_run(), and g1_bed().
| steady_acceleration_gates.common_rec | ( | a, | |
| case | |||
| ) |
Definition at line 171 of file steady_acceleration_gates.py.
Referenced by cmd_g3(), cmd_g5(), cmd_g8(), cmd_mpi(), cmd_oracle(), cmd_run(), and g1_bed().
| steady_acceleration_gates.cmd_run | ( | flow, | |
| a | |||
| ) |
Definition at line 178 of file steady_acceleration_gates.py.
References common_rec(), emit(), g1_bed(), settings_of(), and umean().
| steady_acceleration_gates.g1_bed | ( | a, | |
| case, | |||
| conv, | |||
| Ks | |||
| ) |
Definition at line 259 of file steady_acceleration_gates.py.
References common_rec(), and emit().
Referenced by cmd_run().
| steady_acceleration_gates.cmd_oracle | ( | flow, | |
| a | |||
| ) |
Definition at line 289 of file steady_acceleration_gates.py.
References common_rec(), emit(), and settings_of().
| steady_acceleration_gates.cmd_g3 | ( | flow, | |
| a | |||
| ) |
Definition at line 337 of file steady_acceleration_gates.py.
References common_rec(), emit(), settings_of(), and umean().
| steady_acceleration_gates.cmd_g5 | ( | flow, | |
| a | |||
| ) |
Definition at line 392 of file steady_acceleration_gates.py.
References common_rec(), emit(), settings_of(), and umean().
| steady_acceleration_gates.cmd_g8 | ( | flow, | |
| a | |||
| ) |
Definition at line 431 of file steady_acceleration_gates.py.
References common_rec(), emit(), and settings_of().
| steady_acceleration_gates.cmd_mpi | ( | flow, | |
| a | |||
| ) |
Definition at line 471 of file steady_acceleration_gates.py.
References common_rec(), emit(), and settings_of().
| steady_acceleration_gates.main | ( | ) |
Definition at line 536 of file steady_acceleration_gates.py.
References main().
Referenced by main().
| steady_acceleration_gates.HERE = os.path.dirname(os.path.abspath(__file__)) |
Definition at line 54 of file steady_acceleration_gates.py.
| tuple steady_acceleration_gates.BED_K_INF = (98.9156994, 98.9156995) |
Definition at line 256 of file steady_acceleration_gates.py.
| dict steady_acceleration_gates.G3_DEPTH = {"sphere": 1e-9, "bed": None} |
Definition at line 334 of file steady_acceleration_gates.py.