#1578 Update the code to fit with new versions of third party libraries
Two modifications:
- Some PETSc enum values were modified; it has been taken into account in a way both former and current version will work without warning.
- An issue with a static method which transposed a matrix; this step was in fact unnecessary and has been removed.