← Projects
Automated FEM: real-time elastostatics from a graph neural network
CS 184 final project · 2-person team with Ninad Atale · proposal site · Jul – Aug 2026
A GNN that learns elastostatic response from a solver we wrote ourselves, so a user can load geometry, train, and then push on the part and watch it deform live with no solver in the loop.
- The learning problem: map a load configuration on a tetrahedral mesh to per-node displacement. The training set is self-generated: our validated FEM solver (9 correctness checks, worst residual 7.73e-11) sweeps load cases over the mesh, 512 solved cases in 1.43 s, so supervision is exact physics, not approximation.
- Architecture: encode-process-decode in PyTorch Geometric. Node features are the force vector, DOF type and material (E, ν); edge features are relative position vectors, so geometry enters through the graph, not absolute coordinates, and the learned operator is translation-invariant. An encoder MLP lifts nodes to a latent state, message passing propagates it, a decoder MLP emits 3 displacement components per node.
- Depth was set by an information bound, not a default. L message-passing layers reach exactly L hops; our test beam's graph diameter is 66 hops, and at MeshGraphNets' default 15 layers, 70.5% of nodes cannot see the load at all. I measured that before training, and it drove the depth and the ~5,000-element mesh cap.
- Label hygiene the benchmarks forced: von Mises does not superpose (summing it directly gives 35.4% peak error, so we train on tensor components and derive it after), and peak stress under a nodal point load is a singularity, 4.20 → 10.85 → 24.43 MPa under refinement, so it cannot be a training target.
- Element order is a graph-size decision: TET10 at 567 DOF beats TET4 at 36,663 DOF on accuracy, a 65× smaller graph handed to the network.
- Scoped to linear elasticity, direct forces only. Error is measured against our own solver. Reading: MeshGraphNets, arXiv 2002.01927; neither builds the viewer.
C++ · Python · TetGen · Assimp · SuperLU · pyamg · PyTorch Geometric · finite element method
Code for classes still running is kept private under Berkeley's academic-honesty policy. Happy to walk through it in person. ← Back to all projects