flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
anderson_synthetic_maps Namespace Reference

Classes

class  _Diag
 
class  LinearMapSolver
 

Functions

 rotation (rho, theta=0.5)
 
 jordan (lam0, kappa)
 
 oracle_kw (rev)
 
 raw (name, rev, calls=400)
 
 driver (name, rev, sigma)
 
 main ()
 

Variables

tuple N = (25, 20, 20)
 
int G = 2
 
 E = tuple(n + 2 * G for n in N)
 
dict MAPS
 

Detailed Description

Synthetic linear maps through the Anderson oracle (doc/steady_acceleration.md, Revision 2).

An INSTRUMENT, not a gate. It drives `anderson_oracle.AndersonOracle` and the oracle's
`march_to_steady` with a fake solver whose `step()` is a linear map on the padded `u` buffer, so the
design's algorithm runs unchanged on maps whose spectrum is known exactly. No flow build is needed.

The maps are core U4's (core-anderson tests/test_anderson.cpp `runU4`): Box(25, 20, 20, g = 2);
inner entries k < nBulk = 9997 get lam = 0.9 k / (nBulk - 1); entry nBulk gets the outlier; entries
nBulk + 1, nBulk + 2 carry a 2x2 block B (their diagonal lam is 0); c = 1 everywhere (ghosts: lam 0,
so they stay 1). Optional evaluation noise: a fresh seeded random vector of norm sigma ||g|| per
evaluation (core U8's noise model). The oracle's other fields v, w, p stay 0.

    B = rotation(rot, 0.5)        core U4 (outlier 1.02, rot 1.01: unstable) and its stable twin
    B = [[lam0, kappa], [0, lam0]]  a STABLE non-normal block: rho(J) = lam0 < 1 for every kappa,
                                    numerical range radius lam0 + |kappa| / 2

Sections (all printed; `--json` writes one record per run):
  raw      unconditional `acc.step(True)` like core U4, under rev 1 (does the guard fire?) and rev 2
           (calls to residual 1e-8 / 1e-10 / 1e-12)
  driver   the rev-1 and rev-2 `march_to_steady` (rtol 1e-4) on U4's two maps, noise 0 / 1e-12 / 1e-8

    python tests/study/anderson_synthetic_maps.py [--json out.jsonl]

Function Documentation

◆ rotation()

anderson_synthetic_maps.rotation (   rho,
  theta = 0.5 
)

Definition at line 98 of file anderson_synthetic_maps.py.

◆ jordan()

anderson_synthetic_maps.jordan (   lam0,
  kappa 
)

Definition at line 103 of file anderson_synthetic_maps.py.

◆ oracle_kw()

anderson_synthetic_maps.oracle_kw (   rev)

Definition at line 107 of file anderson_synthetic_maps.py.

Referenced by driver(), and raw().

◆ raw()

anderson_synthetic_maps.raw (   name,
  rev,
  calls = 400 
)

Definition at line 121 of file anderson_synthetic_maps.py.

References oracle_kw().

Referenced by main().

◆ driver()

anderson_synthetic_maps.driver (   name,
  rev,
  sigma 
)

Definition at line 145 of file anderson_synthetic_maps.py.

References oracle_kw().

Referenced by main().

◆ main()

anderson_synthetic_maps.main ( )

Definition at line 164 of file anderson_synthetic_maps.py.

References driver(), main(), and raw().

Referenced by main().

Variable Documentation

◆ N

tuple anderson_synthetic_maps.N = (25, 20, 20)

Definition at line 36 of file anderson_synthetic_maps.py.

◆ G

int anderson_synthetic_maps.G = 2

Definition at line 37 of file anderson_synthetic_maps.py.

◆ E

anderson_synthetic_maps.E = tuple(n + 2 * G for n in N)

Definition at line 38 of file anderson_synthetic_maps.py.

◆ MAPS

dict anderson_synthetic_maps.MAPS
Initial value:
1= {
2 "U4 unstable (1.02, rotation 1.01)": (1.02, rotation(1.01)),
3 "U4 stable twin (0.996, rotation 0.95)": (0.996, rotation(0.95)),
4 **{f"stable non-normal (lam0 {l0}, kappa {k})": (0.5, jordan(l0, k))
5 for l0 in (0.99, 0.996) for k in (0.1, 1.0, 10.0)},
6}

Definition at line 113 of file anderson_synthetic_maps.py.