This was deprecated in PETSc 3.7 - since we require at least that version we can
use the new function.
// Set options
PetscErrorCode ierr =
- PetscViewerSetFormat(PETSC_VIEWER_STDOUT_(comm), format);
+ PetscViewerPushFormat(PETSC_VIEWER_STDOUT_(comm), format);
AssertThrow(ierr == 0, ExcPETScError(ierr));
// Write to screen
ierr = MatView(matrix, PETSC_VIEWER_STDOUT_(comm));
AssertThrow(ierr == 0, ExcPETScError(ierr));
+ ierr = PetscViewerPopFormat(PETSC_VIEWER_STDOUT_(comm));
+ AssertThrow(ierr == 0, ExcPETScError(ierr));
}
void
// Set options
PetscErrorCode ierr =
- PetscViewerSetFormat(PETSC_VIEWER_STDOUT_(comm), format);
+ PetscViewerPushFormat(PETSC_VIEWER_STDOUT_(comm), format);
AssertThrow(ierr == 0, ExcPETScError(ierr));
// Write to screen
ierr = VecView(vector, PETSC_VIEWER_STDOUT_(comm));
AssertThrow(ierr == 0, ExcPETScError(ierr));
+ ierr = PetscViewerPopFormat(PETSC_VIEWER_STDOUT_(comm));
+ AssertThrow(ierr == 0, ExcPETScError(ierr));
}
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams