Automatic generation of finite-element code by simultaneous optimization of expressions
The paper presents a MATHEMATICA package SMS (Symbolic Mechanics System) for the automatic derivation of formulas needed in nonlinear finite element analysis. Symbolic generation of the characteristic arrays of nonlinear finite elements (e.g. nodal force vectors, stiffness matrices, sensitivity vectors) leads to exponential behavior, both in time and space. A new approach, implemented in SMS, avoids this problem by combining several techniques: symbolic capabilities of Mathematica, automatic differentiation technique, simultaneous optimization of expressions and a stochastic evaluation of the formulas instead of a conventional pattern matching technique. SMS translates the derived symbolic formulas into an efficient compiled language (FORTRAN or C). The generated code is then incorporated into an existing finite element analysis environment. SMS was already used to developed several new, geometrically and materially nonlinear finite elements with up to 72 degrees of freedom. The design and implementation of SMS are presented. Efficiency of the new approach is compared with the efficiency of the manually written code on an example.
finite element method automatic code generation code optimization