PetscObjectViewFromOptions#
Processes command line options to determine if/how a PetscObject is to be viewed.
Synopsis#
#include "petscsys.h"
PetscErrorCode PetscObjectViewFromOptions(PetscObject obj, PetscObject bobj, const char name[])
Collective
Input Parameters#
obj - the object
bobj - optional other object that provides prefix (if
NULLthen the prefix inobjis used)name - option string that is used to activate viewing. It typically ends with
_view.
Options Database Key#
-name viewer_specification - See
PetscOptionsCreateViewer()for the values ofviewer_specification
Notes#
This function is usually not called directly but is called by, for example, MatViewFromOptions().
This checks the options database, creates the viewer on-the-fly, uses it and then destroys it. Hence it should not be called in heavily used routines,
rather PetscOptionsCreateViewer() should be used to construct the viewer once which can then be utilized in the heavily used routine.
See Also#
PetscObject, PetscObjectViewSynchronizedFromOptions(), PetscObjectView(), PetscOptionsCreateViewer()
Level#
developer
Location#
Examples#
src/snes/tutorials/ex69.c
src/dm/impls/swarm/tutorials/ex1f90.F90
src/ts/tutorials/ex30.c
src/snes/tutorials/ex62.c
src/ts/tutorials/ex11.c
src/snes/tutorials/ex27.c
src/dm/field/tutorials/ex1.c
src/snes/tutorials/ex55.c
src/snes/tutorials/ex5.c
src/vec/vec/utils/tagger/tutorials/ex1.c
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages