Due to the fact that the LagrangeSpace class methods need to be accessed from device in the FEMInterpolate functions, we added a small struct in LagrangeSpace which contains the minimal functions needed on device and which is accessible on device. This however implies code duplication, as these functions need to be redefined for the struct.
This could maybe be fixed if we has some sort of helper class.