#include "petscmat.h" PetscErrorCode MatView(Mat mat,PetscViewer viewer)Collective on Mat
mat | - the matrix | |
viewer | - visualization context |
PETSC_VIEWER_STDOUT_SELF | - for sequential matrices | |
PETSC_VIEWER_STDOUT_WORLD | - for parallel matrices created on PETSC_COMM_WORLD | |
PETSC_VIEWER_STDOUT_(comm) | - for matrices created on MPI communicator comm | |
PETSC_VIEWER_DRAW_WORLD | - graphical display of nonzero structure |
The user can open alternative visualization contexts with
PetscViewerASCIIOpen() | - Outputs matrix to a specified file | |
PetscViewerBinaryOpen() | - Outputs matrix in binary to a specified file; corresponding input uses MatLoad() | |
PetscViewerDrawOpen() | - Outputs nonzero matrix structure to an X window display | |
PetscViewerSocketOpen() | - Outputs matrix to Socket viewer. Currently only the sequential dense and AIJ matrix types support the Socket viewer. |
The user can call PetscViewerPushFormat() to specify the output format of ASCII printed objects (when using PETSC_VIEWER_STDOUT_SELF, PETSC_VIEWER_STDOUT_WORLD and PetscViewerASCIIOpen). Available formats include