How a magpylib model with soft parts becomes a solved one, in each of the three solvers. solve_cells cuts the parts into cells, solve_face_charge puts a charge on their surfaces, and solve_fem hands them to NGSolve. Pick a model to light up its path, and click any box for what happens inside it and the papers it rests on.
T has one 3×3 block per pair of cells. The code never treats it as one matrix: it splits the cells into clusters and builds each cluster pair the cheapest exact way. Here a soft plate (a grid of 4,096 cuboids), a magnet (a grid of 1,728) and a pole piece of 1,500 tetrahedra. Click a block.
The same count as _auto_solver: the share of T's entries that FFT products cover. Each uniform grid covers its own block, m². Two grids of one spacing also cover their mutual blocks, 2·mₐ·m_b, once a block passes 10⁶ entries. From 10 % on, GMRES; below, the dense direct solve.
What the iterative solver repeats until the residual is small enough. The heavy step is the product with T; everything else is per cell or on a small Krylov basis.
The methods material-response builds on, and the sources of the use cases. Each box in the map names the ones it rests on. DOIs checked against Crossref on 6 November 2026.