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