MatView

Visualizes a matrix object.

Synopsis

#include "petscmat.h" 
int MatView(Mat mat,Viewer viewer)
Collective on Mat

Input Parameters

mat - the matrix
ptr - visualization context

Notes

The available visualization contexts include
VIEWER_STDOUT_SELF - standard output (default)
VIEWER_STDOUT_WORLD - synchronized standard output where only the first processor opens the file. All other processors send their data to the first processor to print.
VIEWER_DRAW_WORLD - graphical display of nonzero structure

The user can open alternative visualization contexts with

ViewerASCIIOpen() - Outputs matrix to a specified file
ViewerBinaryOpen() - Outputs matrix in binary to a specified file; corresponding input uses MatLoad()
ViewerDrawOpen() - Outputs nonzero matrix structure to an X window display
ViewerSocketOpen() - Outputs matrix to Socket viewer. Currently only the sequential dense and AIJ matrix types support the Socket viewer.

The user can call ViewerSetFormat() to specify the output format of ASCII printed objects (when using VIEWER_STDOUT_SELF, VIEWER_STDOUT_WORLD and ViewerASCIIOpen). Available formats include

VIEWER_FORMAT_ASCII_DEFAULT - default, prints matrix contents
VIEWER_FORMAT_ASCII_MATLAB - prints matrix contents in Matlab format
VIEWER_FORMAT_ASCII_DENSE - prints entire matrix including zeros
VIEWER_FORMAT_ASCII_COMMON - prints matrix contents, using a sparse format common among all matrix types
VIEWER_FORMAT_ASCII_IMPL - prints matrix contents, using an implementation-specific format (which is in many cases the same as the default)
VIEWER_FORMAT_ASCII_INFO - prints basic information about the matrix size and structure (not the matrix entries)
VIEWER_FORMAT_ASCII_INFO_LONG - prints more detailed information about the matrix structure

Keywords

matrix, view, visualize, output, print, write, draw

See Also

ViewerSetFormat(), ViewerASCIIOpen(), ViewerDrawOpen(),
ViewerSocketOpen(), ViewerBinaryOpen(), MatLoad()

Level:beginner
Location:
src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages