#include "petscviewer.h" PetscErrorCode PetscOptionsGetViewer(MPI_Comm comm,PetscOptions options,const char pre[],const char name[],PetscViewer *viewer,PetscViewerFormat *format,PetscBool *set)Collective
comm | - the communicator to own the viewer | |
options | - options database, use NULL for default global database | |
pre | - the string to prepend to the name or NULL | |
name | - the option one is seeking |
viewer | - the viewer, pass NULL if not needed | |
format | - the PetscViewerFormat requested by the user, pass NULL if not needed | |
set | - PETSC_TRUE if found, else PETSC_FALSE |
ascii[:[filename][:[format][:append]]] defaults to stdout - format can be one of ascii_info, ascii_info_detail, or ascii_matlab,for example ascii::ascii_info prints just the information about the object not all details unless :append is given filename opens in write mode, overwriting what was already there
binary[:[filename][:[format][:append]]] defaults to the file binaryoutput
draw[:drawtype[:filename]] for example, draw:tikz, draw:tikz:figure.tex or draw:x
socket[:port] defaults to the standard output port
saws[:communicatorname] publishes object to the Scientific Application Webserver (SAWs)
Use PetscViewerDestroy() after using the viewer, otherwise a memory leak will occur
You can control whether calls to this function create a viewer (or return early with *set of PETSC_FALSE) with PetscOptionsPushGetViewerOff. This is useful if calling many small subsolves, in which case XXXViewFromOptions can take an appreciable fraction of the runtime.
If PETSc is configured with --with-viewfromoptions=0 this function always returns with *set of PETSC_FALSE