Finite element template library