kicad2ems.mom25d.dense

mom25d.dense - the dense matrix's pieces the solvers share: Z scaled and bordered, its LU on
the host or the GPU and their solves, the sides' loops, and batched GMRES (fast.py's, split
out: R-F3)
class kicad2ems.mom25d.dense.GpuLDL(gpu, F)[source]
A complex64 LDL^T on the GPU (gpu_ldl.LDLFactor, the backend's
factor_ldl): M(R) = Z^-1 R there; to_host() downloads it.
class kicad2ems.mom25d.dense.GpuLU(gpu, n)[source]
A complex64 LU on the GPU, taken from the backend (its work arrays
freed for the next): M(R) = Z^-1 R there; to_host() downloads it.
class kicad2ems.mom25d.dense.HostLDL(H)[source]
An LDL^T on the host (half.ldl_factor's half.Half): M(R) = Z^-1 R.
class kicad2ems.mom25d.dense.HostLU(lu)[source]
An LU on the host (_lu's, complex64 or complex128): M(R) = Z^-1 R.
kicad2ems.mom25d.dense.gmres_batched(A, B, M=None, x0=None, rtol=1e-06, restart=30, maxiter=10, stall=None, reach=None, out=None)[source]
Right-preconditioned restarted GMRES for k independent systems A x_j = b_j
run in lockstep, so every operator / preconditioner call is one batched (N x
k_active) product. A, M: callables on (N x k) arrays. Converged columns drop
out. Returns (X, iterations per column). stall: (iterations, residual): give
up when a column's relative residual is still above that after so many
iterations (a preconditioner that is no inverse: a fresh factorisation takes
two or three iterations, a broken one all of them). reach: (iterations,
residual): give up, from the third iteration, when at the rate so far a
column would still be above that residual after so many (a kept
factorisation too far from its frequency). out: a dict that receives
'rel', each column's relative residual |b - A x| / |b| at the end, from
the products made (b - sum y_j A z_j: exact, and no product more).