:orphan: # PetscViewerASCIISetFILE Given an open file sets the `PETSCVIEWERASCII` viewer to use the file for output ## Synopsis ``` #include "petscviewer.h" PetscErrorCode PetscViewerASCIISetFILE(PetscViewer viewer, FILE *fd) ``` Not Collective ## Input Parameters - ***viewer -*** the `PetscViewer` to use with the specified file - ***fd -*** the `FILE` pointer ## Notes This `PetscViewer` can be destroyed with `PetscViewerDestroy()`, but the `fd` will NOT be closed. If a multiprocessor communicator is used (such as `PETSC_COMM_WORLD`), then only the first processor in the group uses the file. All other processors send their data to the first processor to print. ## See Also `MatView()`, `VecView()`, `PetscViewerDestroy()`, `PetscViewerBinaryOpen()`, `PetscViewerASCIIGetPointer()`, `PetscViewerPushFormat()`, `PETSC_VIEWER_STDOUT_`, `PETSC_VIEWER_STDERR_`, `PETSC_VIEWER_STDOUT_WORLD`, `PETSC_VIEWER_STDOUT_SELF`, `PetscViewerASCIIOpen()`, `PetscViewerASCIIOpenWithFILE()`, `PETSCVIEWERASCII` ## Level beginner ## Location src/sys/classes/viewer/impls/ascii/vcreatea.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/ascii/vcreatea.c) [Index of all Viewer routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)