:orphan: # PetscViewerASCIIRead Reads from a `PETSCVIEWERASCII` file ## Synopsis ``` #include "petscviewer.h" PetscErrorCode PetscViewerASCIIRead(PetscViewer viewer, void *data, PetscInt num, PetscInt *count, PetscDataType dtype) ``` Only MPI rank 0 in the `PetscViewer` may call this ## Input Parameters - ***viewer -*** the `PETSCVIEWERASCII` viewer - ***data -*** location to write the data, treated as an array of type indicated by `datatype` - ***num -*** number of items of data to read - ***datatype -*** type of data to read ## Output Parameter - ***count -*** number of items of data actually read, or `NULL` ## See Also [](sec_viewers), `PetscViewerASCIIOpen()`, `PetscViewerPushFormat()`, `PetscViewerDestroy()`, `PetscViewerCreate()`, `PetscViewerFileSetMode()`, `PetscViewerFileSetName()` `VecView()`, `MatView()`, `VecLoad()`, `MatLoad()`, `PetscViewerBinaryGetDescriptor()`, `PetscViewerBinaryGetInfoPointer()`, `PetscFileMode`, `PetscViewer`, `PetscViewerBinaryRead()` ## Level beginner ## Location src/sys/classes/viewer/impls/ascii/filev.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/ascii/filev.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)