#include "petsc.h" int PetscViewerASCIIOpen(MPI_Comm comm,const char name[],PetscViewer *lab)Collective on MPI_Comm
comm | - the communicator | |
name | - the file name |
If a multiprocessor communicator is used (such as PETSC_COMM_WORLD), then only the first processor in the group opens the file. All other processors send their data to the first processor to print.
Each processor can instead write its own independent output by specifying the communicator PETSC_COMM_SELF.
As shown below, PetscViewerASCIIOpen() is useful in conjunction with MatView() and VecView()
PetscViewerASCIIOpen(PETSC_COMM_WORLD,"mat.output",&viewer); MatView(matrix,viewer);
Level:beginner
Location:src/sys/src/viewer/impls/ascii/vcreatea.c
Index of all Viewer routines
Table of Contents for all manual pages
Index of all manual pages