petsc-3.4.5 2014-06-29


Gets a viewer appropriate for the type indicated by the user


#include "petscviewer.h" 
PetscErrorCode  PetscOptionsGetViewer(MPI_Comm comm,const char pre[],const char name[],PetscViewer *viewer,PetscViewerFormat *format,PetscBool  *set)
Collective on MPI_Comm

Input Parameters

comm - the communicator to own the viewer
pre - the string to prepend to the name or NULL
name - the option one is seeking

Output Parameter

viewer - the viewer
format - the PetscViewerFormat requested by the user
set - PETSC_TRUE if found, else PETSC_FALSE

Notes: If no value is provided ascii:stdout is used

      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 info
                                    about the object to standard out - unless :append is given filename opens in write mode
      binary[:[filename][:[format][:append]]]   defaults to binaryoutput
      socket[:port]                  defaults to the standard output port
      ams[:communicatorname]         publishes object to the AMS (Argonne Memory Snooper) 

Use PetscViewerDestroy() after using the viewer, otherwise a memory leak will occur

See Also

PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(),
PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool() PetscOptionsInt(), PetscOptionsString(), PetscOptionsReal(), PetscOptionsBool(), PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHead(), PetscOptionsStringArray(),PetscOptionsRealArray(), PetscOptionsScalar(), PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), PetscOptionsList(), PetscOptionsEList()

Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages