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 } PetscViewer_Socket; 14 15 #define PETSCSOCKETDEFAULTPORT 5005 16 17 /* different types of matrix which may be communicated */ 18 #define DENSEREAL 0 19 #define SPARSEREAL 1 20 #define DENSECHARACTER 2 21 #define DENSEINT 3 22 23 /* Note: DENSEREAL and DENSECHARACTER are stored exactly the same way */ 24 /* DENSECHARACTER simply has a flag set which tells that it should be */ 25 /* interpreted as a string not a numeric vector */ 26 27 28 29