User-defined material subroutines for FEM calculations based on automatic differentiation of strain energy func- tions