PetscOptionsViewer#
From a PetscOptionsBegin()/PetscOptionsEnd() block, read a viewer specification from the options database and create the requested PetscViewer
Synopsis#
#include <petscviewer.h>
PetscErrorCode PetscOptionsViewer(const char opt[], const char text[], const char man[], PetscViewer *viewer, PetscViewerFormat *format, PetscBool *set)
Logically Collective
Input Parameters#
opt - the option name, for example
-vec_viewtext - help string shown by
-helpman - manual page name (the name of an
.htmlfile under the PETSc doc tree)
Output Parameters#
viewer - the
PetscViewercreated, orNULLif the option was not givenformat - the
PetscViewerFormatrequested by the option, or the defaultset -
PETSC_TRUEif the user supplied the option,PETSC_FALSEotherwise
Note#
Must be called between PetscOptionsBegin() and PetscOptionsEnd(); expands to a call to the internal PetscOptionsViewer_Private(), which has access to the current PetscOptionsObject. Destroy viewer with PetscViewerDestroy() when finished.
See Also#
PetscOptionsCreateViewer(), PetscOptionsBegin(), PetscOptionsEnd(), PetscViewer, PetscViewerFormat,
PetscViewerDestroy()
Level#
beginner
Location#
Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages