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