1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Vec/VecView.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>VecView</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<div id="version" align=right><b>petsc-3.4.2 2013-07-02</b></div>
<A NAME="VecView"><H1>VecView</H1></A>
Views a vector object.
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscvec.h"
PetscErrorCode VecView(Vec vec,PetscViewer viewer)
</PRE>
Collective on <A HREF="../Vec/Vec.html#Vec">Vec</A>
<P>
<H3><FONT COLOR="#CC3333">Input Parameters</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>vec </B></TD><TD>- the vector
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>viewer </B></TD><TD>- an optional visualization context
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
The available visualization contexts include
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B><A HREF="../Viewer/PETSC_VIEWER_STDOUT_SELF.html#PETSC_VIEWER_STDOUT_SELF">PETSC_VIEWER_STDOUT_SELF</A> </B></TD><TD>- standard output (default)
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B><A HREF="../Viewer/PETSC_VIEWER_STDOUT_WORLD.html#PETSC_VIEWER_STDOUT_WORLD">PETSC_VIEWER_STDOUT_WORLD</A> </B></TD><TD>- synchronized standard
output where only the first processor opens
the file. All other processors send their
data to the first processor to print.
</TD></TR></TABLE>
<P>
You can change the format the vector is printed using the
option <A HREF="../Viewer/PetscViewerSetFormat.html#PetscViewerSetFormat">PetscViewerSetFormat</A>().
<P>
The user can open alternative visualization contexts with
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B><A HREF="../Viewer/PetscViewerASCIIOpen.html#PetscViewerASCIIOpen">PetscViewerASCIIOpen</A>() </B></TD><TD>- Outputs vector to a specified file
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B><A HREF="../Viewer/PetscViewerBinaryOpen.html#PetscViewerBinaryOpen">PetscViewerBinaryOpen</A>() </B></TD><TD>- Outputs vector in binary to a
specified file; corresponding input uses <A HREF="../Vec/VecLoad.html#VecLoad">VecLoad</A>()
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B><A HREF="../Viewer/PetscViewerDrawOpen.html#PetscViewerDrawOpen">PetscViewerDrawOpen</A>() </B></TD><TD>- Outputs vector to an X window display
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B><A HREF="../Viewer/PetscViewerSocketOpen.html#PetscViewerSocketOpen">PetscViewerSocketOpen</A>() </B></TD><TD>- Outputs vector to Socket viewer
</TD></TR></TABLE>
<P>
The user can call <A HREF="../Viewer/PetscViewerSetFormat.html#PetscViewerSetFormat">PetscViewerSetFormat</A>() to specify the output
format of ASCII printed objects (when using <A HREF="../Viewer/PETSC_VIEWER_STDOUT_SELF.html#PETSC_VIEWER_STDOUT_SELF">PETSC_VIEWER_STDOUT_SELF</A>,
<A HREF="../Viewer/PETSC_VIEWER_STDOUT_WORLD.html#PETSC_VIEWER_STDOUT_WORLD">PETSC_VIEWER_STDOUT_WORLD</A> and <A HREF="../Viewer/PetscViewerASCIIOpen.html#PetscViewerASCIIOpen">PetscViewerASCIIOpen</A>). Available formats include
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_DEFAULT </B></TD><TD>- default, prints vector contents
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_ASCII_MATLAB </B></TD><TD>- prints vector contents in MATLAB format
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_ASCII_INDEX </B></TD><TD>- prints vector contents, including indices of vector elements
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>PETSC_VIEWER_ASCII_COMMON </B></TD><TD>- prints vector contents, using a
format common among all vector types
</TD></TR></TABLE>
<P>
Notes for HDF5 Viewer: the name of the <A HREF="../Vec/Vec.html#Vec">Vec</A> (given with <A HREF="../Sys/PetscObjectSetName.html#PetscObjectSetName">PetscObjectSetName</A>() is the name that is used
for the object in the HDF5 file. If you wish to store the same vector to the HDF5 viewer (with different values,
obviously) several times, you must change its name each time before calling the <A HREF="../Vec/VecView.html#VecView">VecView</A>(). The name you use
here should equal the name that you use in the <A HREF="../Vec/Vec.html#Vec">Vec</A> object that you use with <A HREF="../Vec/VecLoad.html#VecLoad">VecLoad</A>().
<P>
See the manual page for <A HREF="../Vec/VecLoad.html#VecLoad">VecLoad</A>() on the exact format the binary viewer stores
the values in the file.
<P>
<P>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../Viewer/PetscViewerASCIIOpen.html#PetscViewerASCIIOpen">PetscViewerASCIIOpen</A>(), <A HREF="../Viewer/PetscViewerDrawOpen.html#PetscViewerDrawOpen">PetscViewerDrawOpen</A>(), <A HREF="../Draw/PetscDrawLGCreate.html#PetscDrawLGCreate">PetscDrawLGCreate</A>(),
<BR><A HREF="../Viewer/PetscViewerSocketOpen.html#PetscViewerSocketOpen">PetscViewerSocketOpen</A>(), <A HREF="../Viewer/PetscViewerBinaryOpen.html#PetscViewerBinaryOpen">PetscViewerBinaryOpen</A>(), <A HREF="../Vec/VecLoad.html#VecLoad">VecLoad</A>(), <A HREF="../Viewer/PetscViewerCreate.html#PetscViewerCreate">PetscViewerCreate</A>(),
<A HREF="../Sys/PetscRealView.html#PetscRealView">PetscRealView</A>(), <A HREF="../Sys/PetscScalarView.html#PetscScalarView">PetscScalarView</A>(), <A HREF="../Sys/PetscIntView.html#PetscIntView">PetscIntView</A>()
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>beginner
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/vec/vec/interface/vector.c.html#VecView">src/vec/vec/interface/vector.c</A>
<BR><A HREF="./index.html">Index of all Vec routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/vec/vec/examples/tutorials/ex2.c.html">src/vec/vec/examples/tutorials/ex2.c.html</A><BR>
<A HREF="../../../src/vec/vec/examples/tutorials/ex3.c.html">src/vec/vec/examples/tutorials/ex3.c.html</A><BR>
<A HREF="../../../src/vec/vec/examples/tutorials/ex5.c.html">src/vec/vec/examples/tutorials/ex5.c.html</A><BR>
<A HREF="../../../src/vec/vec/examples/tutorials/ex6.c.html">src/vec/vec/examples/tutorials/ex6.c.html</A><BR>
<A HREF="../../../src/vec/vec/examples/tutorials/ex7.c.html">src/vec/vec/examples/tutorials/ex7.c.html</A><BR>
<A HREF="../../../src/vec/vec/examples/tutorials/ex8.c.html">src/vec/vec/examples/tutorials/ex8.c.html</A><BR>
<A HREF="../../../src/vec/vec/examples/tutorials/ex10.c.html">src/vec/vec/examples/tutorials/ex10.c.html</A><BR>
<A HREF="../../../src/vec/vec/examples/tutorials/ex12.c.html">src/vec/vec/examples/tutorials/ex12.c.html</A><BR>
<A HREF="../../../src/vec/vec/examples/tutorials/ex15.c.html">src/vec/vec/examples/tutorials/ex15.c.html</A><BR>
<A HREF="../../../src/vec/vec/examples/tutorials/ex16.c.html">src/vec/vec/examples/tutorials/ex16.c.html</A><BR>
<A HREF="../../../src/vec/vec/examples/tutorials/ex19.c.html">src/vec/vec/examples/tutorials/ex19.c.html</A><BR>
</BODY></HTML>
|