-- Hotfix for the resonator_mk7 singularity function cadesimu.on_iteration(sim, iter) if iter == 1600 then local node = sim.mesh:find_closest(1500, 0, 0) local correction = sim.mesh:laplacian_smooth(node, radius=0.5) sim.field("magnetic_b"):apply_correction(correction) sim.log("INFO", "Hotfix applied to node " .. node.id) end end He injected it:
[INFO] Cadesimu v.4.2.1 (Cascade) starting... [INFO] Loading mesh: resonator_mk7.obj (12.4 million polygons) [INFO] Loading boundary conditions: plasma_flux.bc [INFO] Spawning 24 MPI processes on NUMA node 0. cadesimu linux
He loaded the result in (the open-source visualization software, running natively on Linux). The screen filled with a swirling, toroidal rainbow of magnetic flux lines. They were stable. Confined. Perfect. 0) local correction = sim.mesh:laplacian_smooth(node