xref: /petsc/include/petscviewer.h (revision 90ace30e424d9f4cdf3cb0814f02b30542ad8b7e)
1*90ace30eSBarry Smith /* $Id: viewer.h,v 1.24 1996/03/14 21:46:42 curfman Exp bsmith $ */
22eb8c8abSBarry Smith 
32eb8c8abSBarry Smith #if !defined(__VIEWER_PACKAGE)
42eb8c8abSBarry Smith #define __VIEWER_PACKAGE
52eb8c8abSBarry Smith 
62eb8c8abSBarry Smith #include "petsc.h"
72eb8c8abSBarry Smith 
82eb8c8abSBarry Smith typedef struct _Viewer*            Viewer;
92eb8c8abSBarry Smith #define VIEWER_COOKIE              PETSC_COOKIE+1
10bcd2baecSBarry Smith typedef enum { MATLAB_VIEWER,ASCII_FILE_VIEWER, ASCII_FILES_VIEWER,
11bcd2baecSBarry Smith                BINARY_FILE_VIEWER, STRING_VIEWER, DRAW_VIEWER} ViewerType;
122eb8c8abSBarry Smith 
13dbb450caSBarry Smith extern int ViewerFileOpenASCII(MPI_Comm,char*,Viewer *);
144b0e389bSBarry Smith typedef enum { BINARY_RDONLY, BINARY_WRONLY, BINARY_CREATE} ViewerBinaryType;
1521b0d8fbSLois Curfman McInnes extern int ViewerFileOpenBinary(MPI_Comm,char*,ViewerBinaryType,Viewer *);
16d7e8b826SBarry Smith extern int ViewerMatlabOpen(MPI_Comm,char*,int,Viewer *);
17bcd2baecSBarry Smith extern int ViewerStringOpen(MPI_Comm,char *,int, Viewer *);
18bcd2baecSBarry Smith extern int ViewerDrawOpenX(MPI_Comm,char *,char *,int,int,int,int,Viewer*);
194b0e389bSBarry Smith 
20bcd2baecSBarry Smith extern int ViewerGetType(Viewer,ViewerType*);
219651b370SBarry Smith extern int ViewerDestroy(Viewer);
22ae39576cSLois Curfman McInnes 
23*90ace30eSBarry Smith extern int ViewerASCIIGetPointer(Viewer,FILE**);
24*90ace30eSBarry Smith extern int ViewerBinaryGetDescriptor(Viewer,int*);
25*90ace30eSBarry Smith 
26*90ace30eSBarry Smith #define ASCII_FORMAT_DEFAULT       0
27*90ace30eSBarry Smith #define ASCII_FORMAT_MATLAB        1
28*90ace30eSBarry Smith #define ASCII_FORMAT_IMPL          2
29*90ace30eSBarry Smith #define ASCII_FORMAT_INFO          3
30*90ace30eSBarry Smith #define ASCII_FORMAT_INFO_DETAILED 4
31*90ace30eSBarry Smith #define BINARY_FORMAT_NATIVE      1
32*90ace30eSBarry Smith extern int ViewerSetFormat(Viewer,int,char *);
33*90ace30eSBarry Smith extern int ViewerGetFormat(Viewer,int*);
34*90ace30eSBarry Smith 
355fe861cdSBarry Smith extern int ViewerFlush(Viewer);
36bcd2baecSBarry Smith extern int ViewerStringsprintf(Viewer,char *,...);
374b0e389bSBarry Smith 
3821b0d8fbSLois Curfman McInnes extern Viewer STDOUT_VIEWER_SELF;
3921b0d8fbSLois Curfman McInnes extern Viewer STDERR_VIEWER_SELF;
400e6118f3SLois Curfman McInnes extern Viewer STDOUT_VIEWER_WORLD;
412eb8c8abSBarry Smith 
422eb8c8abSBarry Smith #endif
43