ALL-FEM: Agentic Large Language models Fine-tuned for Finite Element Methods
Rushikesh Deotale, Adithya Srinivasan, Yuan Tian, Tianyi Zhang, Pavlos Vlachos, Hector Gomez

TL;DR
ALL-FEM introduces an autonomous system combining agentic AI and fine-tuned large language models to generate, debug, and visualize finite element method codes across diverse physical applications, improving automation in computational engineering.
Contribution
The paper presents a novel agentic framework that fine-tunes LLMs for FEniCS code generation and orchestrates multiple specialized agents to automate PDE problem-solving workflows.
Findings
Achieved 71.79% code success rate on 39 benchmarks.
Constructed a corpus of over 1000 verified FEniCS scripts.
Fine-tuned LLMs outperform non-agentic models in FE code generation.
Abstract
Finite element (FE) analysis guides the design and verification of nearly all manufactured objects. It is at the core of computational engineering, enabling simulation of complex physical systems, from fluids and solids to multiphysics systems. However, implementing FE codes and analyzing simulation results demands expertise across numerical analysis, continuum mechanics, and programming. Conventional Large Language Models (LLMs) can generate FE code, but they hallucinate, lack awareness of variational structures, and cannot close the loop from problem statement to a verified solution. Here, we propose ALL-FEM, an autonomous simulation system that integrates agentic AI with domain-specific, fine-tuned LLMs for FEniCS code generation across solid, fluid, and multiphysics applications. We construct a corpus of 1000+ verified FEniCS scripts by combining 500+ curated expert codes with a…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
