Wolfram Library Archive

Courseware Demos MathSource Technical Notes
All Collections Articles Books Conference Proceedings
Title Downloads

Automatic Generation of Numerical Codes

Jože Korelc
Organization: University of Ljubljana, Slovenia

2005 Wolfram Technology Conference
Conference location

Champaign IL

The paper presents a hybrid system for automatic generation of numerical codes by symbolic approach with the emphasis on finite element formulations where straightforward use of symbolic and algebraic systems lead to the exponential growth of derived expressions. The system consists of three major components. The Mathematica package AceGen is used for the symbolic derivation of formulas needed in numerical procedures and automatic code generation. An approach implemented in AceGen overcomes the problem of expression growth by combining several techniques: Mathematica’s symbolic algebra system, automatic differentiation, automatic code generation and theorem proving. The second component, called Computational Templates, is a collection of prearranged modules for the automatic creation of the interface between the finite element code and the finite element environment. Those modules together enable multi-language and multi-environment generation of nonlinear finite element codes from the same symbolic description. Currently supported are C, Fortran, and Mathematica language and several research and commercial finite element environments (FEAP, ELFEN, ABAQUS). The third component is a model finite element environment called Driver. The advantage of this finite element environment is that it exists in two equivalent codes. The first version (MDriver) is written in Mathematica’s symbolic language, so when a particular problem is analyzed, the advantages of Mathematica, such as high precision arithmetic, interval arithmetic, or even symbolic evaluation of FE quantities, can be used. The second version (CDriver) is written in C language and is connected with Mathematica via the MathLink protocol so that large-scale problems can be solved at the same time. Several examples involving large-scale multi-physics and multi-field problems are presented.

*Engineering > Finite Element Methods

KorelcPres.ppt (2.4 MB) - Microsoft Powerpoint document