no need to have this function. `PetscFinalize()` will be anyway callled in a main function. Besides, this implementation delete `_solver` twice, i.e. first in this function and second in a destructor.