Replace routines that will be deprecated in version 3.8
Replace routines that will be deprecated in version 3.8

add static qualifier to PetscErrorCode used within petsc.cpp

mfem/mfem,mfem/mfem,mfem/mfem,mfem/mfem,mfem/mfem