xref: /petsc/include/petscviewer.h (revision 30de9b251c71d073cc9d88242eefe8db4dcc3e99)
173f4d377SMatthew Knepley /* $Id: petscviewer.h,v 1.85 2001/08/06 21:13:28 bsmith Exp $ */
284cb2905SBarry Smith /*
3b0a32e0cSBarry Smith      PetscViewers are objects where other objects can be looked at or stored.
484cb2905SBarry Smith */
53c119ea2SBarry Smith 
60a835dfdSSatish Balay #if !defined(__PETSCVIEWER_H)
70a835dfdSSatish Balay #define __PETSCVIEWER_H
82eb8c8abSBarry Smith 
98ba1e511SMatthew Knepley extern int PETSC_VIEWER_COOKIE;
108ba1e511SMatthew Knepley 
11b9617806SBarry Smith /*S
12b9617806SBarry Smith      PetscViewer - Abstract PETSc object that helps view (in ASCII, binary, graphically etc)
13b9617806SBarry Smith          other PETSc objects
14b9617806SBarry Smith 
15b9617806SBarry Smith    Level: beginner
16b9617806SBarry Smith 
17b9617806SBarry Smith   Concepts: viewing
18b9617806SBarry Smith 
19b9617806SBarry Smith .seealso:  PetscViewerCreate(), PetscViewerSetType(), PetscViewerType
20b9617806SBarry Smith S*/
21b0a32e0cSBarry Smith typedef struct _p_PetscViewer* PetscViewer;
223c119ea2SBarry Smith 
233c119ea2SBarry Smith /*
24b0a32e0cSBarry Smith     petsc.h must be included AFTER the definition of PetscViewer for ADIC to
253c119ea2SBarry Smith    process correctly.
263c119ea2SBarry Smith */
272eb8c8abSBarry Smith #include "petsc.h"
282eb8c8abSBarry Smith 
29b9617806SBarry Smith /*E
30b9617806SBarry Smith     PetscViewerType - String with the name of a PETSc PETScViewer
31b9617806SBarry Smith 
32b9617806SBarry Smith    Level: beginner
33b9617806SBarry Smith 
34b9617806SBarry Smith .seealso: PetscViewerSetType(), PetscViewer
35b9617806SBarry Smith E*/
36b9617806SBarry Smith typedef char* PetscViewerType;
37b0a32e0cSBarry Smith #define PETSC_VIEWER_SOCKET       "socket"
38b0a32e0cSBarry Smith #define PETSC_VIEWER_ASCII        "ascii"
39fb9695e5SSatish Balay #define PETSC_VIEWER_BINARY       "binary"
40b0a32e0cSBarry Smith #define PETSC_VIEWER_STRING       "string"
41fb9695e5SSatish Balay #define PETSC_VIEWER_DRAW         "draw"
42b0a32e0cSBarry Smith #define PETSC_VIEWER_AMS          "ams"
4344c73c46SMatthew Knepley #define PETSC_VIEWER_VU           "vu"
444ebda54eSMatthew Knepley #define PETSC_VIEWER_MATHEMATICA  "mathematica"
454ebda54eSMatthew Knepley #define PETSC_VIEWER_SILO         "silo"
4677ed5343SBarry Smith 
47b0a32e0cSBarry Smith extern PetscFList PetscViewerList;
48b0a32e0cSBarry Smith EXTERN int PetscViewerRegisterAll(char *);
49b0a32e0cSBarry Smith EXTERN int PetscViewerRegisterDestroy(void);
507b2a1423SBarry Smith 
51b0a32e0cSBarry Smith EXTERN int PetscViewerRegister(char*,char*,char*,int(*)(PetscViewer));
52*30de9b25SBarry Smith 
53*30de9b25SBarry Smith /*MC
54*30de9b25SBarry Smith    PetscViewerRegisterDynamic - Adds a method to the Krylov subspace solver package.
55*30de9b25SBarry Smith 
56*30de9b25SBarry Smith    Synopsis:
57*30de9b25SBarry Smith    int PetscViewerRegisterDynamic(char *name_solver,char *path,char *name_create,int (*routine_create)(PetscViewer))
58*30de9b25SBarry Smith 
59*30de9b25SBarry Smith    Not Collective
60*30de9b25SBarry Smith 
61*30de9b25SBarry Smith    Input Parameters:
62*30de9b25SBarry Smith +  name_solver - name of a new user-defined solver
63*30de9b25SBarry Smith .  path - path (either absolute or relative) the library containing this solver
64*30de9b25SBarry Smith .  name_create - name of routine to create method context
65*30de9b25SBarry Smith -  routine_create - routine to create method context
66*30de9b25SBarry Smith 
67*30de9b25SBarry Smith    Level: developer
68*30de9b25SBarry Smith 
69*30de9b25SBarry Smith    Notes:
70*30de9b25SBarry Smith    PetscViewerRegisterDynamic() may be called multiple times to add several user-defined solvers.
71*30de9b25SBarry Smith 
72*30de9b25SBarry Smith    If dynamic libraries are used, then the fourth input argument (routine_create)
73*30de9b25SBarry Smith    is ignored.
74*30de9b25SBarry Smith 
75*30de9b25SBarry Smith    Sample usage:
76*30de9b25SBarry Smith .vb
77*30de9b25SBarry Smith    PetscViewerRegisterDynamic("my_viewer_type",/home/username/my_lib/lib/libO/solaris/mylib.a,
78*30de9b25SBarry Smith                "MyViewerCreate",MyViewerCreate);
79*30de9b25SBarry Smith .ve
80*30de9b25SBarry Smith 
81*30de9b25SBarry Smith    Then, your solver can be chosen with the procedural interface via
82*30de9b25SBarry Smith $     PetscViewerSetType(ksp,"my_viewer_type")
83*30de9b25SBarry Smith    or at runtime via the option
84*30de9b25SBarry Smith $     -viewer_type my_viewer_type
85*30de9b25SBarry Smith 
86*30de9b25SBarry Smith   Concepts: registering^Viewers
87*30de9b25SBarry Smith 
88*30de9b25SBarry Smith .seealso: PetscViewerRegisterAll(), PetscViewerRegisterDestroy()
89*30de9b25SBarry Smith M*/
90aa482453SBarry Smith #if defined(PETSC_USE_DYNAMIC_LIBRARIES)
91b0a32e0cSBarry Smith #define PetscViewerRegisterDynamic(a,b,c,d) PetscViewerRegister(a,b,c,0)
927b2a1423SBarry Smith #else
93b0a32e0cSBarry Smith #define PetscViewerRegisterDynamic(a,b,c,d) PetscViewerRegister(a,b,c,d)
947b2a1423SBarry Smith #endif
95*30de9b25SBarry Smith 
96b0a32e0cSBarry Smith EXTERN int PetscViewerCreate(MPI_Comm,PetscViewer*);
97b0a32e0cSBarry Smith EXTERN int PetscViewerSetFromOptions(PetscViewer);
987b2a1423SBarry Smith 
99b0a32e0cSBarry Smith EXTERN int PetscViewerASCIIOpen(MPI_Comm,const char[],PetscViewer*);
100b0a32e0cSBarry Smith typedef enum {PETSC_BINARY_RDONLY,PETSC_BINARY_WRONLY,PETSC_BINARY_CREATE} PetscViewerBinaryType;
101b0a32e0cSBarry Smith EXTERN int PetscViewerBinaryOpen(MPI_Comm,const char[],PetscViewerBinaryType,PetscViewer*);
102b0a32e0cSBarry Smith EXTERN int PetscViewerSocketOpen(MPI_Comm,const char[],int,PetscViewer*);
103b0a32e0cSBarry Smith EXTERN int PetscViewerStringOpen(MPI_Comm,char[],int,PetscViewer*);
104b0a32e0cSBarry Smith EXTERN int PetscViewerDrawOpen(MPI_Comm,const char[],const char[],int,int,int,int,PetscViewer*);
105b0a32e0cSBarry Smith EXTERN int PetscViewerAMSSetCommName(PetscViewer,const char[]);
1064ebda54eSMatthew Knepley EXTERN int PetscViewerMathematicaOpen(MPI_Comm, int, const char[], const char[], PetscViewer *);
1074ebda54eSMatthew Knepley EXTERN int PetscViewerSiloOpen(MPI_Comm, const char[], PetscViewer *);
1084b0e389bSBarry Smith 
109b0a32e0cSBarry Smith EXTERN int PetscViewerGetType(PetscViewer,PetscViewerType*);
110b0a32e0cSBarry Smith EXTERN int PetscViewerSetType(PetscViewer,PetscViewerType);
111b0a32e0cSBarry Smith EXTERN int PetscViewerDestroy(PetscViewer);
112b0a32e0cSBarry Smith EXTERN int PetscViewerGetSingleton(PetscViewer,PetscViewer*);
113b0a32e0cSBarry Smith EXTERN int PetscViewerRestoreSingleton(PetscViewer,PetscViewer*);
114ae39576cSLois Curfman McInnes 
115090de74eSSatish Balay 
116b9617806SBarry Smith /*E
117b9617806SBarry Smith     PetscViewerFormat - Way a viewer presents the object
118b9617806SBarry Smith 
119b9617806SBarry Smith    Level: beginner
120b9617806SBarry Smith 
121b9617806SBarry Smith .seealso: PetscViewerSetFormat(), PetscViewer, PetscViewerType, PetscViewerPushFormat(), PetscViewerPopFormat()
122b9617806SBarry Smith E*/
123fb9695e5SSatish Balay typedef enum {
124f3ef73ceSBarry Smith   PETSC_VIEWER_ASCII_DEFAULT,
125f3ef73ceSBarry Smith   PETSC_VIEWER_ASCII_MATLAB,
1264ebda54eSMatthew Knepley   PETSC_VIEWER_ASCII_MATHEMATICA,
127f3ef73ceSBarry Smith   PETSC_VIEWER_ASCII_IMPL,
128f3ef73ceSBarry Smith   PETSC_VIEWER_ASCII_INFO,
129456192e2SBarry Smith   PETSC_VIEWER_ASCII_INFO_DETAIL,
130f3ef73ceSBarry Smith   PETSC_VIEWER_ASCII_COMMON,
131f3ef73ceSBarry Smith   PETSC_VIEWER_ASCII_SYMMODU,
132f3ef73ceSBarry Smith   PETSC_VIEWER_ASCII_INDEX,
133f3ef73ceSBarry Smith   PETSC_VIEWER_ASCII_DENSE,
134f3ef73ceSBarry Smith   PETSC_VIEWER_BINARY_DEFAULT,
135f3ef73ceSBarry Smith   PETSC_VIEWER_BINARY_NATIVE,
136f3ef73ceSBarry Smith   PETSC_VIEWER_DRAW_BASIC,
137f3ef73ceSBarry Smith   PETSC_VIEWER_DRAW_LG,
138f3ef73ceSBarry Smith   PETSC_VIEWER_DRAW_CONTOUR,
139f3ef73ceSBarry Smith   PETSC_VIEWER_DRAW_PORTS,
140f3ef73ceSBarry Smith   PETSC_VIEWER_NATIVE,
1414aedb280SBarry Smith   PETSC_VIEWER_NOFORMAT,
1424aedb280SBarry Smith   PETSC_VIEWER_ASCII_FACTOR_INFO} PetscViewerFormat;
143090de74eSSatish Balay 
144f3ef73ceSBarry Smith EXTERN int PetscViewerSetFormat(PetscViewer,PetscViewerFormat);
145f3ef73ceSBarry Smith EXTERN int PetscViewerPushFormat(PetscViewer,PetscViewerFormat);
146b0a32e0cSBarry Smith EXTERN int PetscViewerPopFormat(PetscViewer);
147f3ef73ceSBarry Smith EXTERN int PetscViewerGetFormat(PetscViewer,PetscViewerFormat*);
148b0a32e0cSBarry Smith EXTERN int PetscViewerFlush(PetscViewer);
1494b0e389bSBarry Smith 
15077ed5343SBarry Smith /*
15177ed5343SBarry Smith    Operations explicit to a particular class of viewers
15277ed5343SBarry Smith */
153ed5c6e3eSMatthew Knepley 
154ed5c6e3eSMatthew Knepley /*E
155ed5c6e3eSMatthew Knepley   PetscViewerFormat - Access mode for a file.
156ed5c6e3eSMatthew Knepley 
157ed5c6e3eSMatthew Knepley   Level: beginner
158ed5c6e3eSMatthew Knepley 
159ed5c6e3eSMatthew Knepley .seealso: PetscViewerASCIISetMode()
160ed5c6e3eSMatthew Knepley E*/
161ed5c6e3eSMatthew Knepley typedef enum {FILE_MODE_READ, FILE_MODE_WRITE, FILE_MODE_APPEND, FILE_MODE_UPDATE, FILE_MODE_APPEND_UPDATE} PetscFileMode;
162ed5c6e3eSMatthew Knepley 
163b0a32e0cSBarry Smith EXTERN int PetscViewerASCIIGetPointer(PetscViewer,FILE**);
164ed5c6e3eSMatthew Knepley EXTERN int PetscViewerASCIISetMode(PetscViewer,PetscFileMode);
165f80b7eb0SBarry Smith EXTERN int PetscViewerASCIIPrintf(PetscViewer,const char[],...) PETSC_PRINTF_FORMAT_CHECK(2,3);
166f80b7eb0SBarry Smith EXTERN int PetscViewerASCIISynchronizedPrintf(PetscViewer,const char[],...) PETSC_PRINTF_FORMAT_CHECK(2,3);
167b0a32e0cSBarry Smith EXTERN int PetscViewerASCIIPushTab(PetscViewer);
168b0a32e0cSBarry Smith EXTERN int PetscViewerASCIIPopTab(PetscViewer);
169b0a32e0cSBarry Smith EXTERN int PetscViewerASCIIUseTabs(PetscViewer,PetscTruth);
170b0a32e0cSBarry Smith EXTERN int PetscViewerASCIISetTab(PetscViewer,int);
171b0a32e0cSBarry Smith EXTERN int PetscViewerBinaryGetDescriptor(PetscViewer,int*);
172b0a32e0cSBarry Smith EXTERN int PetscViewerBinaryGetInfoPointer(PetscViewer,FILE **);
173b0a32e0cSBarry Smith EXTERN int PetscViewerBinarySetType(PetscViewer,PetscViewerBinaryType);
174f80b7eb0SBarry Smith EXTERN int PetscViewerStringSPrintf(PetscViewer,char *,...) PETSC_PRINTF_FORMAT_CHECK(2,3);
175b0a32e0cSBarry Smith EXTERN int PetscViewerStringSetString(PetscViewer,char[],int);
176b0a32e0cSBarry Smith EXTERN int PetscViewerDrawClear(PetscViewer);
177b0a32e0cSBarry Smith EXTERN int PetscViewerDrawSetInfo(PetscViewer,const char[],const char[],int,int,int,int);
178b0a32e0cSBarry Smith EXTERN int PetscViewerSocketSetConnection(PetscViewer,const char[],int);
179bba1ac68SSatish Balay EXTERN int PetscViewerBinarySkipInfo(PetscViewer);
18008641331SSatish Balay EXTERN int PetscViewerBinaryLoadInfo(PetscViewer);
18108641331SSatish Balay 
182c655490fSBarry Smith 
183b0a32e0cSBarry Smith EXTERN int PetscViewerSetFilename(PetscViewer,const char[]);
184b0a32e0cSBarry Smith EXTERN int PetscViewerGetFilename(PetscViewer,char**);
18577ed5343SBarry Smith 
18644c6da4fSMatthew Knepley EXTERN int PetscPLAPACKInitializePackage(char *);
18765804fbbSSatish Balay EXTERN int PetscPLAPACKFinalizePackage(void);
18844c6da4fSMatthew Knepley 
18955dcf840SMatthew Knepley EXTERN int PetscViewerVUGetPointer(PetscViewer, FILE**);
190c4b95c56SMatthew Knepley EXTERN int PetscViewerVUSetMode(PetscViewer, PetscFileMode);
191c4b95c56SMatthew Knepley EXTERN int PetscViewerVUSetVecSeen(PetscViewer, PetscTruth);
192c4b95c56SMatthew Knepley EXTERN int PetscViewerVUGetVecSeen(PetscViewer, PetscTruth *);
193f80b7eb0SBarry Smith EXTERN int PetscViewerVUPrintDeferred(PetscViewer, const char [], ...) PETSC_PRINTF_FORMAT_CHECK(2,3);
194c4b95c56SMatthew Knepley EXTERN int PetscViewerVUFlushDeferred(PetscViewer);
19555dcf840SMatthew Knepley 
19644c6da4fSMatthew Knepley EXTERN int PetscViewerMathematicaInitializePackage(char *);
19786e45947SSatish Balay EXTERN int PetscViewerMathematicaFinalizePackage(void);
198918c3ce8SMatthew Knepley EXTERN int PetscViewerMathematicaGetName(PetscViewer, const char **);
1997eb62a3eSMatthew Knepley EXTERN int PetscViewerMathematicaSetName(PetscViewer, const char []);
2007eb62a3eSMatthew Knepley EXTERN int PetscViewerMathematicaClearName(PetscViewer);
2017eb62a3eSMatthew Knepley EXTERN int PetscViewerMathematicaSkipPackets(PetscViewer, int);
2024ebda54eSMatthew Knepley 
2037eb62a3eSMatthew Knepley EXTERN int PetscViewerSiloGetName(PetscViewer, char **);
2047eb62a3eSMatthew Knepley EXTERN int PetscViewerSiloSetName(PetscViewer, const char []);
2057eb62a3eSMatthew Knepley EXTERN int PetscViewerSiloClearName(PetscViewer);
2067eb62a3eSMatthew Knepley EXTERN int PetscViewerSiloGetMeshName(PetscViewer, char **);
2077eb62a3eSMatthew Knepley EXTERN int PetscViewerSiloSetMeshName(PetscViewer, const char []);
2087eb62a3eSMatthew Knepley EXTERN int PetscViewerSiloClearMeshName(PetscViewer);
2094ebda54eSMatthew Knepley 
21077ed5343SBarry Smith /*
21177ed5343SBarry Smith      These are all the default viewers that do not have
21277ed5343SBarry Smith    to be explicitly opened
21377ed5343SBarry Smith */
214b0a32e0cSBarry Smith EXTERN PetscViewer PETSC_VIEWER_STDOUT_(MPI_Comm);
215b0a32e0cSBarry Smith EXTERN PetscViewer PETSC_VIEWER_STDERR_(MPI_Comm);
216b0a32e0cSBarry Smith EXTERN PetscViewer PETSC_VIEWER_DRAW_(MPI_Comm);
217b0a32e0cSBarry Smith EXTERN PetscViewer PETSC_VIEWER_SOCKET_(MPI_Comm);
218b0a32e0cSBarry Smith EXTERN PetscViewer PETSC_VIEWER_BINARY_(MPI_Comm);
2197eb62a3eSMatthew Knepley EXTERN PetscViewer PETSC_VIEWER_MATHEMATICA_WORLD_PRIVATE;
2205311e20fSBarry Smith 
221b0a32e0cSBarry Smith #define PETSC_VIEWER_STDERR_SELF  PETSC_VIEWER_STDERR_(PETSC_COMM_SELF)
222b0a32e0cSBarry Smith #define PETSC_VIEWER_STDERR_WORLD PETSC_VIEWER_STDERR_(PETSC_COMM_WORLD)
223*30de9b25SBarry Smith 
224*30de9b25SBarry Smith /*MC
225*30de9b25SBarry Smith   PETSC_VIEWER_STDOUT_WORLD  - same as PETSC_VIEWER_STDOUT_(PETSC_COMM_WORLD)
226*30de9b25SBarry Smith 
227*30de9b25SBarry Smith   Level: beginner
228*30de9b25SBarry Smith M*/
229*30de9b25SBarry Smith #define PETSC_VIEWER_STDOUT_WORLD PETSC_VIEWER_STDOUT_(PETSC_COMM_WORLD)
230*30de9b25SBarry Smith 
231*30de9b25SBarry Smith /*MC
232*30de9b25SBarry Smith   PETSC_VIEWER_STDOUT_SELF  - same as PETSC_VIEWER_STDOUT_(PETSC_COMM_SELF)
233*30de9b25SBarry Smith 
234*30de9b25SBarry Smith   Level: beginner
235*30de9b25SBarry Smith M*/
236*30de9b25SBarry Smith #define PETSC_VIEWER_STDOUT_SELF  PETSC_VIEWER_STDOUT_(PETSC_COMM_SELF)
237*30de9b25SBarry Smith 
238*30de9b25SBarry Smith /*MC
239*30de9b25SBarry Smith   PETSC_VIEWER_DRAW_WORLD  - same as PETSC_VIEWER_DRAW_(PETSC_COMM_WORLD)
240*30de9b25SBarry Smith 
241*30de9b25SBarry Smith   Level: intermediate
242*30de9b25SBarry Smith M*/
243b0a32e0cSBarry Smith #define PETSC_VIEWER_DRAW_WORLD   PETSC_VIEWER_DRAW_(PETSC_COMM_WORLD)
244*30de9b25SBarry Smith 
245*30de9b25SBarry Smith /*MC
246*30de9b25SBarry Smith   PETSC_VIEWER_DRAW_SELF  - same as PETSC_VIEWER_DRAW_(PETSC_COMM_SELF)
247*30de9b25SBarry Smith 
248*30de9b25SBarry Smith   Level: intermediate
249*30de9b25SBarry Smith M*/
250*30de9b25SBarry Smith #define PETSC_VIEWER_DRAW_SELF    PETSC_VIEWER_DRAW_(PETSC_COMM_SELF)
251*30de9b25SBarry Smith 
252*30de9b25SBarry Smith /*MC
253*30de9b25SBarry Smith   PETSC_VIEWER_SOCKET_WORLD  - same as PETSC_VIEWER_SOCKET_(PETSC_COMM_WORLD)
254*30de9b25SBarry Smith 
255*30de9b25SBarry Smith   Level: intermediate
256*30de9b25SBarry Smith M*/
257b0a32e0cSBarry Smith #define PETSC_VIEWER_SOCKET_WORLD PETSC_VIEWER_SOCKET_(PETSC_COMM_WORLD)
258*30de9b25SBarry Smith 
259*30de9b25SBarry Smith /*MC
260*30de9b25SBarry Smith   PETSC_VIEWER_SOCKET_SELF  - same as PETSC_VIEWER_SOCKET_(PETSC_COMM_SELF)
261*30de9b25SBarry Smith 
262*30de9b25SBarry Smith   Level: intermediate
263*30de9b25SBarry Smith M*/
264b0a32e0cSBarry Smith #define PETSC_VIEWER_SOCKET_SELF  PETSC_VIEWER_SOCKET_(PETSC_COMM_SELF)
265*30de9b25SBarry Smith 
266*30de9b25SBarry Smith /*MC
267*30de9b25SBarry Smith   PETSC_VIEWER_BINARY_WORLD  - same as PETSC_VIEWER_BINARY_(PETSC_COMM_WORLD)
268*30de9b25SBarry Smith 
269*30de9b25SBarry Smith   Level: intermediate
270*30de9b25SBarry Smith M*/
271b0a32e0cSBarry Smith #define PETSC_VIEWER_BINARY_WORLD PETSC_VIEWER_BINARY_(PETSC_COMM_WORLD)
272*30de9b25SBarry Smith 
273*30de9b25SBarry Smith /*MC
274*30de9b25SBarry Smith   PETSC_VIEWER_BINARY_SELF  - same as PETSC_VIEWER_BINARY_(PETSC_COMM_SELF)
275*30de9b25SBarry Smith 
276*30de9b25SBarry Smith   Level: intermediate
277*30de9b25SBarry Smith M*/
278b0a32e0cSBarry Smith #define PETSC_VIEWER_BINARY_SELF  PETSC_VIEWER_BINARY_(PETSC_COMM_SELF)
279*30de9b25SBarry Smith 
2807eb62a3eSMatthew Knepley #define PETSC_VIEWER_MATHEMATICA_WORLD (PetscViewerInitializeMathematicaWorld_Private(),PETSC_VIEWER_MATHEMATICA_WORLD_PRIVATE)
28165ef3172SBarry Smith 
28277ed5343SBarry Smith /*
283b0a32e0cSBarry Smith     PetscViewer based on the ALICE Memory Snooper
28477ed5343SBarry Smith */
285aa482453SBarry Smith #if defined(PETSC_HAVE_AMS)
286cb5b572fSBarry Smith #include "ams.h"
287b0a32e0cSBarry Smith EXTERN int         PetscViewerAMSGetAMSComm(PetscViewer,AMS_Comm *);
288b0a32e0cSBarry Smith EXTERN int         PetscViewerAMSOpen(MPI_Comm,const char[],PetscViewer*);
289b1607693SBarry Smith EXTERN int         PetscViewerAMSLock(PetscViewer);
290b0a32e0cSBarry Smith EXTERN PetscViewer PETSC_VIEWER_AMS_(MPI_Comm);
291b0a32e0cSBarry Smith EXTERN int         PETSC_VIEWER_AMS_Destroy(MPI_Comm);
292b0a32e0cSBarry Smith #define PETSC_VIEWER_AMS_WORLD PETSC_VIEWER_AMS_(PETSC_COMM_WORLD)
2932eb8c8abSBarry Smith #endif
294cb5b572fSBarry Smith 
295f2b01315SBarry Smith /*
296b0a32e0cSBarry Smith     PetscViewer utility routines used by PETSc that are not normally used
297f2b01315SBarry Smith    by users.
298f2b01315SBarry Smith */
29987828ca2SBarry Smith EXTERN int  PetscViewerSocketPutScalar(PetscViewer,int,int,PetscScalar*);
30087828ca2SBarry Smith EXTERN int  PetscViewerSocketPutReal(PetscViewer,int,int,PetscReal*);
301b0a32e0cSBarry Smith EXTERN int  PetscViewerSocketPutInt(PetscViewer,int,int*);
30287828ca2SBarry Smith EXTERN int  PetscViewerSocketPutSparse_Private(PetscViewer,int,int,int,PetscScalar*,int*,int *);
303b0a32e0cSBarry Smith EXTERN int  PetscViewerDestroyAMS_Private(void);
304f2b01315SBarry Smith 
305b9617806SBarry Smith /*S
306b9617806SBarry Smith      PetscViewers - Abstract collection of PetscViewers
307b9617806SBarry Smith 
308b9617806SBarry Smith    Level: intermediate
309b9617806SBarry Smith 
310b9617806SBarry Smith   Concepts: viewing
311b9617806SBarry Smith 
312b9617806SBarry Smith .seealso:  PetscViewerCreate(), PetscViewerSetType(), PetscViewerType, PetscViewer, PetscViewersCreate(),
313b9617806SBarry Smith            PetscViewersGetViewer()
314b9617806SBarry Smith S*/
315b0a32e0cSBarry Smith typedef struct _p_PetscViewers* PetscViewers;
316b0a32e0cSBarry Smith EXTERN int PetscViewersCreate(MPI_Comm,PetscViewers*);
317b0a32e0cSBarry Smith EXTERN int PetscViewersDestroy(PetscViewers);
318b0a32e0cSBarry Smith EXTERN int PetscViewersGetViewer(PetscViewers,int,PetscViewer*);
319d132466eSBarry Smith 
320cb5b572fSBarry Smith #endif
321