forgot to name the last commit, but what I basically did was change all double to PetscReal. This way, in theory my code should also run in Petsc complex version, provided that I also install the Pastix.