VecView

Views a vector object.

Synopsis

#include "petscvec.h" 
int VecView(Vec vec,Viewer viewer)
Collective on Vec

Input Parameters

v - the vector
viewer - an optional 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.

You can change the format the vector is printed using the option ViewerSetFormat().

The user can open alternative visualization contexts with

ViewerASCIIOpen() - Outputs vector to a specified file
ViewerBinaryOpen() - Outputs vector in binary to a specified file; corresponding input uses VecLoad()
ViewerDrawOpen() - Outputs vector to an X window display
ViewerSocketOpen() - Outputs vector to 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 vector contents
VIEWER_FORMAT_ASCII_MATLAB - prints vector contents in Matlab format
VIEWER_FORMAT_ASCII_INDEX - prints vector contents, including indices of vector elements
VIEWER_FORMAT_ASCII_COMMON - prints vector contents, using a format common among all vector types
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

Vec, view, visualize, output, print, write, draw

See Also

ViewerASCIIOpen(), ViewerDrawOpen(), DrawLGCreate(),
ViewerSocketOpen(), ViewerBinaryOpen(), VecLoad(), ViewerCreate(), PetscDoubleView(), PetscScalarView(), PetscIntView()

Level:beginner
Location:
src/vec/interface/vector.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/vec/examples/tutorials/ex2.c
src/vec/examples/tutorials/ex3.c
src/vec/examples/tutorials/ex5.c
src/vec/examples/tutorials/ex6.c
src/vec/examples/tutorials/ex7.c
src/vec/examples/tutorials/ex8.c
src/vec/examples/tutorials/ex12.c
src/vec/examples/tutorials/ex2f.F
src/vec/examples/tutorials/ex3f.F
src/vec/examples/tutorials/ex4f.F
src/vec/examples/tutorials/ex7f.F