tatva: A Monolithic Differentiable Framework for Scalable, Energy-Centric Mechanics

  • Pundir, Mohit (ETH Zurich)
  • Lorez, Flavio (ETH Zurich)
  • Kammer, David S (ETH Zurich)

Please login to view abstract download link

As computational mechanics transitions toward data-driven constitutive laws and complex multiphysics, traditional Finite Element (FE) libraries, characterized by the ”compute-assemble-solve” paradigm, face a significant bottleneck: the ”Assembly Trap.” This legacy architecture often forces a trade-off be- tween physical expressivity and GPU performance. We present tatva (https://github.com/ smec-ethz/tatva), an open-source Python library that fundamentally recasts FEA as a monolithic differentiable framework. tatva decouples physical definition from numerical discretization by repre- senting entire systems through a single, global potential energy functional. Developed on the JAX ecosystem [1], tatva utilizes high-order Automatic Differentiation (AD) [2] to generate machine-precision tangents without manual linearization. From a software design perspective, tatva addresses the GPU assembly challenge through a novel sparse-assembly strategy based on distance-2 graph coloring [3], ensuring that both sparse stiffness matrix construction and matrix-free Jacobian-Vector Products (JVPs) scale linearly O(N ) up to 10 million degrees of freedom on a single GPU. The monolithic architecture of tatva fundamentally simplifies the implementation of classical chal- lenging mechanical problems by reducing them to their foundational energy functionals. Complexi- ties such as contact resolution via penalty or barrier methods, cohesive-zone modeling for fracture, and non-linear constraints are implemented as additive potential terms, bypassing the need for specialized contact-detection kernels or manual linearization of jump conditions. Beyond these classical domains, the software’s differentiable nature enables the seamless integration of Neural Constitutive Models at the quadrature level and the Neural Operator Element Method at the domain level. By treating physics as a variational summation of energies, the library allows for the implicit coupling of AI-driven and classical physics regions within a single differentiable graph. tatva is thus positioned as a modern, scalable infrastructure for researchers requiring an AI-ready framework that remains deeply rooted in the reliability of variational mechanics.