xref: /petsc/src/sys/classes/viewer/impls/socket/socket.h (revision 9dd11ecf0918283bb567d8b33a92f53ac4ea7840)
1*a4963045SJacob Faibussowitsch #pragma once
2af0996ceSBarry Smith #include <petsc/private/viewerimpl.h> /*I  "petscsys.h"  I*/
35c6c1daeSBarry Smith 
476667918SBarry Smith /*
576667918SBarry Smith      This is the definition of the socket viewer structure. This starts the same as the PetscViewer_Binary so the
676667918SBarry Smith    binary read/writes can be called directly on it.
776667918SBarry Smith */
85c6c1daeSBarry Smith typedef struct {
95c6c1daeSBarry Smith   int       port;
1076667918SBarry Smith   PetscInt  flowcontrol; /* allow only <flowcontrol> messages outstanding at a time while doing IO */
1176667918SBarry Smith   PetscBool skipheader;  /* don't write header, only raw data */
125c6c1daeSBarry Smith #if defined(PETSC_HAVE_MPIIO)
135c6c1daeSBarry Smith   PetscBool MPIIO;
145c6c1daeSBarry Smith #endif
155c6c1daeSBarry Smith } PetscViewer_Socket;
165c6c1daeSBarry Smith 
175c6c1daeSBarry Smith #define PETSCSOCKETDEFAULTPORT 5005
185c6c1daeSBarry Smith 
195c6c1daeSBarry Smith /* different types of matrix which may be communicated */
205c6c1daeSBarry Smith #define DENSEREAL      0
215c6c1daeSBarry Smith #define SPARSEREAL     1
225c6c1daeSBarry Smith #define DENSECHARACTER 2
235c6c1daeSBarry Smith #define DENSEINT       3
245c6c1daeSBarry Smith 
255c6c1daeSBarry Smith /* Note: DENSEREAL and DENSECHARACTER are stored exactly the same way */
265c6c1daeSBarry Smith /* DENSECHARACTER simply has a flag set which tells that it should be */
275c6c1daeSBarry Smith /* interpreted as a string not a numeric vector                       */
28