xref: /petsc/src/sys/classes/viewer/impls/socket/socket.h (revision 7c561f0977de51325d9fcc8e06f17306dbb264cc)
1 
2 #include <petsc/private/viewerimpl.h> /*I  "petscsys.h"  I*/
3 
4 /*
5      This is the definition of the socket viewer structure. This starts the same as the PetscViewer_Binary so the
6    binary read/writes can be called directly on it.
7 */
8 typedef struct {
9   int       port;
10   PetscInt  flowcontrol; /* allow only <flowcontrol> messages outstanding at a time while doing IO */
11   PetscBool skipheader;  /* don't write header, only raw data */
12 #if defined(PETSC_HAVE_MPIIO)
13   PetscBool MPIIO;
14 #endif
15 } PetscViewer_Socket;
16 
17 #define PETSCSOCKETDEFAULTPORT 5005
18 
19 /* different types of matrix which may be communicated */
20 #define DENSEREAL      0
21 #define SPARSEREAL     1
22 #define DENSECHARACTER 2
23 #define DENSEINT       3
24 
25 /* Note: DENSEREAL and DENSECHARACTER are stored exactly the same way */
26 /* DENSECHARACTER simply has a flag set which tells that it should be */
27 /* interpreted as a string not a numeric vector                       */
28