xref: /petsc/include/petscviewer.h (revision bcd2baec2099d24a3a9d1d6033b0e7e45ccc83b9)
1*bcd2baecSBarry Smith /* $Id: viewer.h,v 1.22 1996/03/07 22:39:21 bsmith 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
10*bcd2baecSBarry Smith typedef enum { MATLAB_VIEWER,ASCII_FILE_VIEWER, ASCII_FILES_VIEWER,
11*bcd2baecSBarry Smith                BINARY_FILE_VIEWER, STRING_VIEWER, DRAW_VIEWER} ViewerType;
122eb8c8abSBarry Smith 
134a0ce102SLois Curfman McInnes #define FILE_FORMAT_DEFAULT       0
144a0ce102SLois Curfman McInnes #define FILE_FORMAT_MATLAB        1
154a0ce102SLois Curfman McInnes #define FILE_FORMAT_IMPL          2
1680b4ade8SLois Curfman McInnes #define FILE_FORMAT_INFO          3
1708480c60SBarry Smith #define FILE_FORMAT_INFO_DETAILED 4
184a0ce102SLois Curfman McInnes 
19dbb450caSBarry Smith extern int ViewerFileOpenASCII(MPI_Comm,char*,Viewer *);
204b0e389bSBarry Smith typedef enum { BINARY_RDONLY, BINARY_WRONLY, BINARY_CREATE} ViewerBinaryType;
2121b0d8fbSLois Curfman McInnes extern int ViewerFileOpenBinary(MPI_Comm,char*,ViewerBinaryType,Viewer *);
22d7e8b826SBarry Smith extern int ViewerMatlabOpen(MPI_Comm,char*,int,Viewer *);
23*bcd2baecSBarry Smith extern int ViewerStringOpen(MPI_Comm,char *,int, Viewer *);
24*bcd2baecSBarry Smith extern int ViewerDrawOpenX(MPI_Comm,char *,char *,int,int,int,int,Viewer*);
254b0e389bSBarry Smith 
26*bcd2baecSBarry Smith extern int ViewerGetType(Viewer,ViewerType*);
279651b370SBarry Smith extern int ViewerDestroy(Viewer);
28ae39576cSLois Curfman McInnes 
29227d817aSBarry Smith extern int ViewerFileGetPointer(Viewer,FILE**);
304b0e389bSBarry Smith extern int ViewerFileSetFormat(Viewer,int,char *);
315fe861cdSBarry Smith extern int ViewerFlush(Viewer);
32*bcd2baecSBarry Smith extern int ViewerStringsprintf(Viewer,char *,...);
334b0e389bSBarry Smith 
3421b0d8fbSLois Curfman McInnes extern Viewer STDOUT_VIEWER_SELF;
3521b0d8fbSLois Curfman McInnes extern Viewer STDERR_VIEWER_SELF;
360e6118f3SLois Curfman McInnes extern Viewer STDOUT_VIEWER_WORLD;
372eb8c8abSBarry Smith 
382eb8c8abSBarry Smith #endif
39