Changed c_str() back to the direct array access to string variable for PETSc