|
flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
|
Classes | |
| class | Geo |
Functions | |
| edge_frac (pa, pb) | |
| snap (a) | |
| level_op (ax, ay, unknown, h, periodic, W) | |
| transfers (n, periodic) | |
| build_hierarchy (G, mode, nmin=4) | |
| colour_sets (n) | |
| smooth (A, x, b, sets, order) | |
| vcycle (levels, l, b, singular) | |
| contraction (levels, singular, its=60) | |
| bicgstab_its (levels, singular) | |
| disc_union (centres, R, L) | |
Variables | |
| int | SNAP = 1e-3 |
| int | n = int(sys.argv[1]) if len(sys.argv) > 1 else 128 |
| float | L = 1.0 |
| float | off = 0.37 / n |
| dict | cases |
| G = Geo(n, L, sdf, per) | |
| str | line = f"{name:34s}" |
| lv = build_hierarchy(G, mode) | |
| rho = contraction(lv, False) | |
| its = bicgstab_its(lv, False) | |
| flush | |
2-D prototype (architect, Amendment A1 to doc/scalar_ibm_design.md): which coarse construction of the lumped-probe surrogate's WALL term makes a sound V-cycle? Surrogate (steady, Lam = 1): S = aperture 5-point Laplacian + diagonal wall sink W_i = alpha_i/s0_i, alpha_i = |area vector|/h^2 (aperture-consistent), s0 = 1.1 * 1/2 (|n_x|+|n_y|) h (Dirichlet wall). Coarse constructions compared (same smoother, transfers and exact bottom, so only A_c differs): redisc-sL : faces averaged + wall W_C = <alpha / s_L>, s_L = probe distance at the level's H (design ยง5.2) avg-s0 : faces averaged + wall W_C = <alpha / s0> (= variational for piecewise-constant P) rap : Galerkin R A P, R = 4-child average, P = bilinear (zero beyond Dirichlet box faces) Smoother: 4-colour Gauss-Seidel (colour = (i%2, j%2): race-free for 5- and 9-point), 2 pre (colours 0..3) + 2 post (3..0); bilinear prolongation, pinned cells re-zeroed; exact bottom at 4x4. Measure: V-cycle contraction rho(I - B S) by power iteration (mean projected out when singular). Results (n = 64 -> 128) are in doc/scalar_ibm_design.md, Amendment A1.
| mg_coarse_wall.edge_frac | ( | pa, | |
| pb | |||
| ) |
Definition at line 20 of file mg_coarse_wall.py.
| mg_coarse_wall.snap | ( | a | ) |
Definition at line 29 of file mg_coarse_wall.py.
| mg_coarse_wall.level_op | ( | ax, | |
| ay, | |||
| unknown, | |||
| h, | |||
| periodic, | |||
| W | |||
| ) |
5-point per-volume operator on an n x n level, identity rows at pinned cells.
Definition at line 59 of file mg_coarse_wall.py.
Referenced by build_hierarchy().
| mg_coarse_wall.transfers | ( | n, | |
| periodic | |||
| ) |
R: average of 4 children (nc^2 x n^2); P: cell-centred bilinear (n^2 x nc^2).
Definition at line 87 of file mg_coarse_wall.py.
Referenced by build_hierarchy().
| mg_coarse_wall.build_hierarchy | ( | G, | |
| mode, | |||
nmin = 4 |
|||
| ) |
Definition at line 108 of file mg_coarse_wall.py.
References level_op(), mean(), and transfers().
| mg_coarse_wall.colour_sets | ( | n | ) |
Definition at line 144 of file mg_coarse_wall.py.
Referenced by vcycle().
| mg_coarse_wall.smooth | ( | A, | |
| x, | |||
| b, | |||
| sets, | |||
| order | |||
| ) |
Definition at line 149 of file mg_coarse_wall.py.
Referenced by vcycle().
| mg_coarse_wall.vcycle | ( | levels, | |
| l, | |||
| b, | |||
| singular | |||
| ) |
Definition at line 157 of file mg_coarse_wall.py.
References colour_sets(), mean(), smooth(), and vcycle().
Referenced by bicgstab_its(), contraction(), and vcycle().
| mg_coarse_wall.contraction | ( | levels, | |
| singular, | |||
its = 60 |
|||
| ) |
Definition at line 180 of file mg_coarse_wall.py.
| mg_coarse_wall.bicgstab_its | ( | levels, | |
| singular | |||
| ) |
Definition at line 199 of file mg_coarse_wall.py.
| mg_coarse_wall.disc_union | ( | centres, | |
| R, | |||
| L | |||
| ) |
Definition at line 211 of file mg_coarse_wall.py.
| int mg_coarse_wall.SNAP = 1e-3 |
Definition at line 17 of file mg_coarse_wall.py.
| int mg_coarse_wall.n = int(sys.argv[1]) if len(sys.argv) > 1 else 128 |
Definition at line 223 of file mg_coarse_wall.py.
| float mg_coarse_wall.L = 1.0 |
Definition at line 224 of file mg_coarse_wall.py.
| float mg_coarse_wall.off = 0.37 / n |
Definition at line 225 of file mg_coarse_wall.py.
| dict mg_coarse_wall.cases |
Definition at line 226 of file mg_coarse_wall.py.
Definition at line 235 of file mg_coarse_wall.py.
| mg_coarse_wall.line = f"{name:34s}" |
Definition at line 236 of file mg_coarse_wall.py.
| mg_coarse_wall.lv = build_hierarchy(G, mode) |
Definition at line 238 of file mg_coarse_wall.py.
| mg_coarse_wall.rho = contraction(lv, False) |
Definition at line 239 of file mg_coarse_wall.py.
| mg_coarse_wall.its = bicgstab_its(lv, False) |
Definition at line 240 of file mg_coarse_wall.py.
| mg_coarse_wall.flush |
Definition at line 242 of file mg_coarse_wall.py.