
Solving PDEs with the FEniCSx Stack, Checked by Manufactured Solutions
A finite-element simulation you cannot verify is an opinion, not a result. This book solves real PDEs with DOLFINx and the FEniCSx stack and verifies every method it presents — in the open, by a test the reader can run — because verification comes before validation, and a slope you can measure beats a picture you can only admire.
The code is the argument, and all of it is here. Every figure comes from one self-contained Python program — the weak form in UFL, the mesh in gmsh, the system through PETSc, run in parallel over MPI — each printed in the book, runnable against a pinned stack. Newton converges quadratically on an automatic Jacobian; a Stokes flow stays stable on an inf-sup pair; a steel wrench is solved from CAD as a coupled thermo-mechanical system. Nothing is a black box, nothing left as an exercise.
Where a problem has a closed form, the answer is matched against it; where it does not, manufactured solutions measure the error against the order the theory promises. The book is candid about where finite elements quietly fail — volumetric locking, checkerboard pressure, geometry error hiding in a functional — and names the test that catches each. It builds to one verified analysis: a steel wrench, heated until its steel softens and loaded until it yields, reported down to the safety factor below one.

