kicad2ems.mom25d.fast

mom25d.fast - the solvers: Z filled by the compiled core and solved directly
(LU, double or mixed precision, on the CPU or the GPU) or by the block
low-rank LU and GMRES

  Z = Z_far + dZ_near
    Z_far   : every interaction with a 1-point (centroid) rule per triangle
    dZ_near : sparse correction (accurate - centroid) for triangle pairs
              closer than near_fac cell sizes: analytic singular /
              near-singular parts + higher-order quadrature
  Vias and lumped elements add a few dense rows/columns and sparse entries.
The compiled core is required (its mesher too): python -m
kicad2ems.mom25d.core.build.
class kicad2ems.mom25d.fast.FastOperator(sim, near_fac=None)[source]
Builds Z for a mom25d.sim.Simulation with the compiled core and solves
with it (solve: policy.choose's plan at each frequency).
entry(rows, cols)[source]
The far field's (centroid-rule) block Z[rows, cols] of the edges.
extra_blocks(f)[source]
Lumped elements and metal loss: a sparse N x N addition to Z.
kh2(f)[source]
(k h)^2 at f: k in the densest dielectric, h the mesh's median edge -
about the ratio of a cell's jw part of the MPIE to its 1/(jw) part.
matvec_exact(X, Sx=None)[source]
Z X in double precision without storing Z, X: N or N x k (far:
triangle-aggregated, one kernel pass for all columns; near: dZ_exact, or
on the fly).
plan(f)[source]
policy.choose's SolvePlan at f, from the simulation and what this
operator holds and learnt; its notes once.
release_host()[source]
Free _host_matrix's mapped memory (16 N^2 bytes) after a sweep.
setup(f, mode='direct')[source]
mode: 'direct' (the tables only: the core fills Z), 'sparse' (the
tables and the sparse near field, dZ).
solve(f, E)[source]
The currents at f for excitation columns E, as policy.choose plans:
Z filled (dense double, or complex64 with the refinement
matrix-free), in the RWG or the loop/tree basis; a kept LU tried,
else a fresh one factored and refined, down the rungs where it
fails (_ladder).
class kicad2ems.mom25d.fast.Kept(f, M, dsc, cost, loops)
M
Alias for field number 1
cost
Alias for field number 3
dsc
Alias for field number 2
f
Alias for field number 0
loops
Alias for field number 4