Updated the behaviour of the getPotentialEnergy() and getKineticEnergy() function in the structural mechanics model.
The energies are computed by matrix vector multiplications.
However, in case the respective matrix is not (yet) assembled, the function behaves as if the matrix is the zero matrix.
Thus, the result, the energy is zero.
This commit changes the behaviour of the function in such a way, that they now test, if the matrix they need are assembled.
If they are not assembled they will call the respective assemble function.
Note that this is just one behaviour, another solution would be, to generate an error in that case.