xref: /petsc/src/sys/classes/viewer/impls/ascii/asciiimpl.h (revision e40966745c0bd90425229c3099d04a9f48f5ff78)
15c6c1daeSBarry Smith 
2af0996ceSBarry Smith #include <petsc/private/viewerimpl.h> /*I     "petscsys.h"   I*/
33f08860eSBarry Smith #include <../src/sys/fileio/mprint.h> /* defines the queue datastructures and variables */
45c6c1daeSBarry Smith 
55c6c1daeSBarry Smith typedef struct {
65c6c1daeSBarry Smith   FILE         *fd;
75c6c1daeSBarry Smith   PetscFileMode mode;      /* The mode in which to open the file */
85c6c1daeSBarry Smith   PetscInt      tab;       /* how many times text is tabbed in from left */
95c6c1daeSBarry Smith   PetscInt      tab_store; /* store tabs value while tabs are turned off */
105c6c1daeSBarry Smith   PetscViewer   bviewer;   /* if PetscViewer is a singleton, this points to mother */
115c6c1daeSBarry Smith   PetscViewer   sviewer;   /* if PetscViewer has a singleton, this points to singleton */
123f08860eSBarry Smith   PetscViewer   subviewer; /* used with PetscViewerGetSubViewer() */
135c6c1daeSBarry Smith   char         *filename;
145c6c1daeSBarry Smith   PetscBool     storecompressed;
155c6c1daeSBarry Smith   PetscBool     closefile;
161575c14dSBarry Smith   PetscInt      allowsynchronized; /* allow synchronized writes from any process to the viewer */
173f08860eSBarry Smith 
183f08860eSBarry Smith   PrintfQueue petsc_printfqueue, petsc_printfqueuebase;
193f08860eSBarry Smith   int         petsc_printfqueuelength;
20*e4096674SBarry Smith 
21*e4096674SBarry Smith   PetscInt fileunit; /* indicates the output is printed with Fortran IO */
225c6c1daeSBarry Smith } PetscViewer_ASCII;
235c6c1daeSBarry Smith 
245c6c1daeSBarry Smith typedef struct PetscViewerLink_t PetscViewerLink;
255c6c1daeSBarry Smith struct PetscViewerLink_t {
265c6c1daeSBarry Smith   PetscViewer               viewer;
275c6c1daeSBarry Smith   struct PetscViewerLink_t *next;
285c6c1daeSBarry Smith };
295c6c1daeSBarry Smith 
308cc058d9SJed Brown PETSC_EXTERN PetscMPIInt MPIAPI Petsc_DelViewer(MPI_Comm, PetscMPIInt, void *, void *);
31