12eb8c8abSBarry Smith 22eb8c8abSBarry Smith #if !defined(__VIEWER_PACKAGE) 32eb8c8abSBarry Smith #define __VIEWER_PACKAGE 42eb8c8abSBarry Smith 52eb8c8abSBarry Smith #include "petsc.h" 62eb8c8abSBarry Smith 72eb8c8abSBarry Smith typedef struct _Viewer* Viewer; 82eb8c8abSBarry Smith #define VIEWER_COOKIE PETSC_COOKIE+1 92eb8c8abSBarry Smith #define MATLAB_VIEWER 0 102eb8c8abSBarry Smith #define FILE_VIEWER 1 112eb8c8abSBarry Smith #define FILES_VIEWER 2 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 164a0ce102SLois Curfman McInnes 172eb8c8abSBarry Smith extern int ViewerFileOpen(char*,Viewer *); 184a0ce102SLois Curfman McInnes extern int ViewerFileOpenSync(char*,MPI_Comm,Viewer *); 194a0ce102SLois Curfman McInnes extern int ViewerFileSetFormat(Viewer,int,char *); 202eb8c8abSBarry Smith extern int ViewerMatlabOpen(char*,int,Viewer *); 21*ae39576cSLois Curfman McInnes 22*ae39576cSLois Curfman McInnes /* These routines should not be in the public include file! */ 234a0ce102SLois Curfman McInnes extern FILE *ViewerFileGetPointer_Private(Viewer); 24*ae39576cSLois Curfman McInnes extern char *ViewerFileGetOutputname_Private(Viewer); 25*ae39576cSLois Curfman McInnes extern int ViewerFileGetFormat_Private(Viewer); 262eb8c8abSBarry Smith 272eb8c8abSBarry Smith extern Viewer STDOUT_VIEWER; 282eb8c8abSBarry Smith extern Viewer STDERR_VIEWER; 292eb8c8abSBarry Smith extern Viewer SYNC_STDOUT_VIEWER; 302eb8c8abSBarry Smith 312eb8c8abSBarry Smith extern int ViewerMatlabPutArray(Viewer,int,int,Scalar*); 322eb8c8abSBarry Smith extern int ViewMatlabPutSparse(Viewer,int,int,int,Scalar*,int*,int *); 332eb8c8abSBarry Smith 342eb8c8abSBarry Smith extern int PetscView(PetscObject,Viewer); 352eb8c8abSBarry Smith extern int ViewerInitialize(); 362eb8c8abSBarry Smith 372eb8c8abSBarry Smith #endif 38