PetscOptionsPushGetViewerOff#
sets if a PetscOptionsGetViewer() returns a viewer.
Synopsis#
#include "petscviewer.h"
PetscErrorCode PetscOptionsPushGetViewerOff(PetscBool flg)
Logically Collective
Input Parameter#
flg -
PETSC_TRUEto turn off viewer creation,PETSC_FALSEto turn it on.
Note#
Calling XXXViewFromOptions in an inner loop can be expensive. This can appear, for example, when using
many small subsolves. Call this function to control viewer creation in PetscOptionsGetViewer(), thus removing the expensive XXXViewFromOptions calls.
Developer Notes;
Instead of using this approach, the calls to PetscOptionsGetViewer() can be moved into XXXSetFromOptions()
See Also#
Viewers: Looking at PETSc Objects, PetscOptionsGetViewer(), PetscOptionsPopGetViewerOff()
Level#
developer
Location#
src/sys/classes/viewer/interface/viewreg.c
Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages