ViewerFileOpenASCII

Opens an ASCII file as a viewer.

Synopsis

int ViewerFileOpenASCII(MPI_Comm comm,char *name,Viewer *lab)

Input Parameters

comm -the communicator
name -the file name

Collective on MPI_Comm

Output Parameter

lab -the viewer to use with the specified file

Notes

If a multiprocessor communicator is used (such as PETSC_COMM_WORLD), then only the first processor in the group opens the file. All otherprocessors send their data to the first processor to print.

Each processor can instead write its own independent output byspecifying the communicator PETSC_COMM_SELF.

As shown below, ViewerFileOpenASCII() is useful in conjunction withMatView() and VecView()


   ViewerFileOpenASCII(PETSC_COMM_WORLD,"mat.output",&viewer);
   MatView(matrix,viewer);

This viewer can be destroyed with ViewerDestroy().

Keywords

Viewer, file, open

See Also

MatView(), VecView(), ViewerDestroy(), ViewerFileOpenBinary(),
ViewerASCIIGetPointer()

Location: src/viewer/impls/file/filev.c
Viewer Index
Table of Contents