|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Functions | |
| load (path) | |
| ldl_pivots (S) | |
| analyse_operator (path) | |
| analyse (path) | |
| main (dirs) | |
Variables | |
| int | MAGIC = 0x50434D47444E5331 |
WO-M — spectrum of the densely assembled multigrid preconditioner (float vs double storage).
Reads the matrices written by `mg_dense_precond` and answers, for each configuration, the ONE
question WO-M was opened on: is the V-cycle preconditioner M indefinite because the coarse operator
is a bad approximation (VOF_PLAN S3, coefficient-aware coarsening), or because the operator is
STORED in float (mac_cutcell_mg.hpp MReal) and float rounding breaks A*1 = 0 at eps_f32 x contrast?
Both builds run the identical code path on the identical problem; only MReal differs.
Method note. sym(M) is singular BY CONSTRUCTION: M's inputs are mean-removed and its output is
mean-removed at the end of the level-0 V-cycle, so the constant vector is an exact null direction.
An UNPIVOTED LDL^T on such a matrix produces one pivot at round-off whose SIGN is noise — which is
why WO-H's "1 negative pivot (-1.1e-12)" at ratio 1e2 must not be read as indefiniteness. This
script therefore reports both:
* the raw unpivoted LDL^T pivots, for direct comparability with the WO-H table, and
* the eigenvalues of sym(M) deflated onto the mean-free subspace (P sym(M) P, P = I - 11^T/n),
where a negative eigenvalue that is not at round-off is unambiguous indefiniteness.
Usage: python mg_precond_analyze.py <dir-with-*.bin> [more dirs...]
| mg_precond_analyze.load | ( | path | ) |
Definition at line 32 of file mg_precond_analyze.py.
Referenced by analyse(), and analyse_operator().
| mg_precond_analyze.ldl_pivots | ( | S | ) |
Unpivoted LDL^T pivots of a symmetric matrix (the WO-H instrument, reproduced).
Definition at line 42 of file mg_precond_analyze.py.
Referenced by analyse().
| mg_precond_analyze.analyse_operator | ( | path | ) |
kappa(A) of the FINE operator on the mean-free subspace, and the attainable-accuracy floor it implies. Classical result (Greenbaum; Higham NLA ch.19): a CG-type iteration cannot drive the TRUE relative residual below O(eps * kappa(A)) whatever the preconditioner, because round-off in the recurrence enters at that level. So this column says what a solve on this operator could ever reach in each storage precision — the ceiling any precision policy is measured against, and the reason a fixed rtol of 1e-8 stops being meaningful once kappa exceeds ~1e8 in fp64.
Definition at line 57 of file mg_precond_analyze.py.
References load().
Referenced by main().
| mg_precond_analyze.analyse | ( | path | ) |
Definition at line 79 of file mg_precond_analyze.py.
References ldl_pivots(), and load().
Referenced by main().
| mg_precond_analyze.main | ( | dirs | ) |
Definition at line 119 of file mg_precond_analyze.py.
References analyse(), analyse_operator(), and main().
| int mg_precond_analyze.MAGIC = 0x50434D47444E5331 |
Definition at line 29 of file mg_precond_analyze.py.