Vega FEM Library

NEW: Vega FEM 2.2 released on Apr 21, 2015. This is a minor release, fixing a few minor issues and memory leaks.

Vega is a computationally efficient and stable C/C++ physics library for three-dimensional deformable object simulation. It is designed to model large deformations, including geometric and material nonlinearities, and can also efficiently simulate linear systems. Vega contains about 100,000 lines of code, and is open-source and free. It is released under the 3-clause BSD license, which means that it can be used freely both in academic research and in commercial applications.

Vega implements several widely used methods for simulation of large deformations of 3D solid deformable objects:

Method Description Citations
co-rotational linear FEM (optional: exact tangent stiffness matrix) large deformations, uses polar decomposition of the deformation gradient to extract large rotations, linear strain-stress relationship [MG04]; exact matrix: [Bar12] (similar to [CPSS10])
co-rotational orthotropic (anisotropic) FEM elasticity same as above, but the strain-stress relationship is orthotropic, i.e., models anisotropic materials with different stiffnesses in three orthogonal directions [LB14]
invertible isotropic nonlinear FEM large deformations, nonlinear isotropic strain-stress relationship, e.g., Saint-Venant Kirchhoff, neo-Hookean, Mooney-Rivlin models; includes a mechanism to handle element inversions [ITF04], [TSIF05]
Saint-Venant Kirchhoff FEM deformable model large deformations, Green-Lagrange strain, linear strain-stress relationship, informally referred to as isotropic geometrically nonlinear FEM [Bar07]
linear FEM elasticity standard small-deformation FEM, linear Cauchy strain, linear strain-stress relationship [Sha90]
mass-spring system standard 3D mass-spring code; optionally, the network can be built as edges of a tet mesh many

For any 3D tetrahedral or cubic mesh, Vega can compute both internal elastic forces and their gradients (tangent stiffness matrix), in any deformed configuration. Different parts of the mesh can be assigned arbitrary material properties. Vega can also timestep these models in time under any user-specified forces, using several provided integrators: implicit backward Euler [BW98], implicit Newmark [Wri02], explicit central differences [Wri02] and symplectic Euler. All models include support for multi-core computing. In addition to linear materials, Vega provides neo-Hookean and Mooney-Rivlin nonlinear material models; arbitrary nonlinear material models can be added to Vega. For isotropic hyperelastic materials, this is as easy as defining an energy function, and its first and second derivatives.

Since version 2.0, Vega FEM also supports model reduction [BJ05], cloth simulation (Baraff-Witkin cloth solver, [BW98]), and rigid body dynamics. Isotropic materials now also include (optional) compression resistance ([KTY09] and several prior references), which makes it possible to simulate very soft materials undergoing large compression in a stable way.

Since version 2.1, Vega FEM also supports orthotropic materials [LB14], i.e., anisotropic materials that exhibit different stiffnesses in three orthogonal directions. Also included is a binary .vegb format, faster loading of volumetric meshes with many regions, and support for the clang compiler (Mac). We also fixed known bugs and made numerous code improvements.

Vega is a middleware physics library. It is aimed at researchers and engineers with some preexisting knowledge in numerical simulation, computer graphics and/or solid mechanics, who can integrate Vega into their projects. The strength of Vega lies in its many C/C++ libraries which depend minimally on each other, and are in most cases independently reusable. Vega contains about 100,000 lines of C/C++ code. It compiles under Windows, Linux and Mac OS X, and has no required external dependencies. Optionally, the built-in conjugate gradient solver can be replaced for an external sparse linear system solver such as Intel MKL or SPOOLES.

Most of Vega was written by Jernej Barbič. Other code contributors include Fun Shing Sin, Daniel Schroeder, Andy Pierce, Yuyu Xu, Yijing Li, Hongyi Xu, Yili Zhao, Christopher Twigg and Somya Sharma.


  • [BJ05] Jernej Barbič, Doug L. James: Real-Time Subspace Integration for St.Venant-Kirchhoff Deformable Models, ACM Transactions on Graphics 24(3) (SIGGRAPH 2005), pages 982-990, August 2005
  • [Bar07] Jernej Barbič. Real-time Reduced Large-Deformation Models and Distributed Contact for Computer Graphics and Haptics. PhD thesis, Carnegie Mellon University, August 2007.
  • [Bar12] Jernej Barbič. Exact Corotational Linear FEM Stiffness Matrix. Technical report, University of Southern California, 2012.
  • [BW98] David Baraff and Andrew P. Witkin. Large Steps in Cloth Simulation. In Proc. of ACM SIGGRAPH 98, pages 43–54, July 1998.
  • [BW08] Javier Bonet and Richard D. Wood. Nonlinear Continuum Mechanics for Finite Element Analysis, 2nd Ed. Cambridge University Press, 2008.
  • [CPSS10] Isaac Chao, Ulrich Pinkall, Patrick Sanan, and Peter Schroeder. A Simple Geometric Model for Elastic Deformations. ACM Transactions on Graphics, 29(3) (SIGGRAPH 2010), 38:1–38:6, 2010.
  • [Han11] Hang Si. TetGen: A Quality Tetrahedral Mesh Generator and a 3D Delaunay Triangulator, 2011.
  • [ITF04] Geoffrey Irving, Joseph Teran, and Ronald Fedkiw. Invertible Finite Elements for Robust Simulation of Large Deformation. In Symp. on Computer Animation (SCA), pages 131–140, 2004.
  • [KTY09] Ryo Kikuuwe, Hiroaki Tabuchi, and Motoji Yamamoto. An edge-based computationally efficient formulation of Saint Venant-Kirchhoff tetrahedral finite elements. ACM Trans. on Graphics, 28(1):1–13, 2009.
  • [Kli08] Matthew Klingner. Improving Tetrahedral Meshes. PhD thesis, Department of Electrical Engineering and Computer Sciences, University of California, Berkeley, 2008. 38
  • [KS09] Matthew Klingner and Jonathan Richard Shewchuk. Stellar: A tetrahedral mesh improvement program, 2009.
  • [LB14] Yijing Li, Jernej Barbič: Stable Orthotropic Materials, In Symp. on Computer Animation (SCA), pages 41–46, 2014.
  • [MG04] Matthias Müller and Markus Gross. Interactive Virtual Materials. In Proc. of Graphics Interface 2004, pages 239–246, 2004.
  • [PAR] PARDISO: Parallel Direct Sparse Solver Interface. Pardiso project, and Intel MKL,
  • [Sha90] Ahmed A. Shabana. Theory of Vibration, Volume II: Discrete and Continuous Systems. Springer–Verlag, 1990.
  • [She94] Jonathan Richard Shewchuk. An introduction to the conjugate gradient method without the agonizing pain, 1994.
  • [SSB13] Fun Shing Sin, Daniel Schroeder, and Jernej Barbič: Vega: Nonlinear FEM Deformable Object Simulator. Computer Graphics Forum, 32(1), 2013, p. 38-50
  • [SPO] SPOOLES: SParse Object Oriented Linear Equations Solver. Boeing Phantom Works.
  • [TSIF05] Joseph Teran, Eftychios Sifakis, Geoffrey Irving, and Ronald Fedkiw. Robust Quasistatic Finite Elements and Flesh Simulation. In Symp. on Computer Animation (SCA), pages 181–190, 2005.
  • [Wri02] Peter Wriggers. Computational Contact Mechanics. John Wiley & Sons, Ltd., 2002.