PetscViewerWritable — PETSc 3.23.0 documentation

Skip to main content
`Ctrl`+`K`

# PetscViewerWritable

Return a flag whether the viewer can be written to with `PetscViewerWrite()`

## Synopsis

    #include "petscviewer.h"
    PetscErrorCode PetscViewerWritable(PetscViewer viewer, PetscBool *flg)

Not Collective

## Input Parameter

- viewer - the `PetscViewer` context

## Output Parameter

- flg - `PETSC_TRUE` if the viewer is writable, `PETSC_FALSE` otherwise

## Note

`PETSC_TRUE` means viewer is in a mode allowing writing, i.e. `PetscViewerFileGetMode()` returns one of `FILE_MODE_WRITE`, `FILE_MODE_APPEND`, `FILE_MODE_UPDATE`, `FILE_MODE_APPEND_UPDATE`.

## See Also

Viewers: Looking at PETSc Objects, `PetscViewer`, `PetscViewerReadable()`, `PetscViewerCheckWritable()`, `PetscViewerCreate()`, `PetscViewerFileSetMode()`, `PetscViewerFileSetType()`

## Level

intermediate

## Location

src/sys/classes/viewer/interface/view.c

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