diff options
-rw-r--r-- | src/petsc_confmetric_solver.c | 4 | ||||
-rw-r--r-- | src/petsc_flat_solver.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/petsc_confmetric_solver.c b/src/petsc_confmetric_solver.c index 7ef205e..131b26c 100644 --- a/src/petsc_confmetric_solver.c +++ b/src/petsc_confmetric_solver.c @@ -867,7 +867,11 @@ int petsc_confmetric_solver(cGH *GH, int *MetricPsiI, int MetricPsiISize, } if (trips==0) { +#if PETSC_VERSION_MAJOR < 2 || (PETSC_VERSION_MAJOR == 2 && PETSC_VERSION_MINOR == 0) + OptionsSetValue("-ksp_monitor",""); +#else PetscOptionsSetValue("-ksp_monitor",""); +#endif } if (verbose) diff --git a/src/petsc_flat_solver.c b/src/petsc_flat_solver.c index 5f5172d..e76631a 100644 --- a/src/petsc_flat_solver.c +++ b/src/petsc_flat_solver.c @@ -481,7 +481,11 @@ int petsc_flat(cGH *GH, int FieldIndex, int MIndex, int NIndex, if (trips==0) { +#if PETSC_VERSION_MAJOR < 2 || (PETSC_VERSION_MAJOR == 2 && PETSC_VERSION_MINOR == 0) + OptionsSetValue("-ksp_monitor",""); +#else PetscOptionsSetValue("-ksp_monitor",""); +#endif } if (verbose) |