Polymorphic constitutive equations in finite element codes

Abstract This work presents an object-oriented design approach to the programming of finite element constitutive equations. A universal interface for arbitrary material laws is introduced from which easy addition and expansion of the material library can take place. Although such expansion using a generic interface is by definition polymorphic, the idiom is carried much further in several aspects of program design. Deriving from abstract examples of equation and algorithmic encapsulation, simple elastic damage and complex inelastic constitutive laws are developed. Examples of calculations show that adequate performance is given by C++ with respect to Fortran 77 for simple to very complex material laws. The performance is seen to be a much stronger function of the compiler used than the actual numerical complexity.