An Active-Library Based Investigation into the Performance Optimisation of Linear Algebra and the Finite Element Method