PetscOptionsGetViewers#
Get multiple viewers from a comma-separated list in the options database
Synopsis#
#include "petscviewer.h"
PetscErrorCode PetscOptionsGetViewers(MPI_Comm comm, PetscOptions options, const char pre[], const char name[], PetscInt *n_max, PetscViewer viewers[], PetscViewerFormat formats[], PetscBool *set)
Collective
Input Parameters#
comm - the communicator to own the viewer
options - options database, use
NULL
for default global databasepre - the string to prepend to the name or
NULL
name - the option one is seeking
n_max - on input: the maximum number of viewers; on output: the number of viewers in the comma-separated list
Output Parameters#
viewers - an array to hold at least
n_max
PetscViewer
s, orNULL
if not needed; on output: if notNULL
, the firstn_max
entries are initializedPetscViewer
sformats - an array to hold at least
n_max
PetscViewerFormat
s, orNULL
if not needed; on output: if notNULL
, the firstn_max
entries are validPetscViewewFormat
sset -
PETSC_TRUE
if found, elsePETSC_FALSE
Note#
See PetscOptionsGetViewer()
for how the format strings for the viewers are interpreted. Use PetscViewerDestroy()
on each viewer, otherwise a memory leak will occur.
If PETSc is configured with --with-viewfromoptions=0
this function always returns with n_max
of 0 and set
of PETSC_FALSE
See Also#
Level#
intermediate
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