xref: /petsc/include/petsc/private/glvisviewerimpl.h (revision a32e9c995d3c9cc14233efbb30d372fdb63ce962)
1 #ifndef _GLVISIMPL_H
2 #define _GLVISIMPL_H
3 
4 #include <petscviewer.h>
5 #include <petscsys.h>
6 
7 struct _n_PetscViewerGLVisVecInfo {
8   char *fec_type; /* the output of FiniteElementCollection::Name() */
9 };
10 typedef struct _n_PetscViewerGLVisVecInfo *PetscViewerGLVisVecInfo;
11 
12 struct _n_PetscViewerGLVisInfo {
13   PetscBool enabled; /* whether or not to visualize data from the process (it works, but it currently misses a public API) */
14   PetscBool init;    /* whether or not the popup window has been initialized (must be done after having sent the data the first time) */
15   PetscInt  size[2]; /* window sizes */
16   PetscReal pause;   /* pause argument */
17   char     *fmt;     /* format */
18 };
19 typedef struct _n_PetscViewerGLVisInfo *PetscViewerGLVisInfo;
20 
21 typedef enum {
22   PETSCVIEWERGLVIS_DISCONNECTED,
23   PETSCVIEWERGLVIS_CONNECTED,
24   PETSCVIEWERGLVIS_DISABLED
25 } PetscViewerGLVisStatus;
26 
27 PETSC_EXTERN PetscErrorCode PetscViewerGLVisPause_Private(PetscViewer);
28 PETSC_EXTERN PetscErrorCode PetscViewerGLVisSetDM_Private(PetscViewer, PetscObject);
29 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetDM_Private(PetscViewer, PetscObject *);
30 PETSC_EXTERN PetscErrorCode PetscViewerGLVisInitWindow_Private(PetscViewer, PetscBool, PetscInt, const char *);
31 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetStatus_Private(PetscViewer, PetscViewerGLVisStatus *);
32 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetType_Private(PetscViewer, PetscViewerGLVisType *);
33 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetWindow_Private(PetscViewer, PetscInt, PetscViewer *);
34 PETSC_EXTERN PetscErrorCode PetscViewerGLVisRestoreWindow_Private(PetscViewer, PetscInt, PetscViewer *);
35 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetFields_Private(PetscViewer, PetscInt *, const char **[], PetscInt *[], PetscErrorCode (**)(PetscObject, PetscInt, PetscObject[], void *), PetscObject *[], void **);
36 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetDMWindow_Private(PetscViewer, PetscViewer *);
37 PETSC_EXTERN PetscErrorCode PetscViewerGLVisRestoreDMWindow_Private(PetscViewer, PetscViewer *);
38 
39 PETSC_EXTERN PetscErrorCode PetscGLVisCollectiveBegin(MPI_Comm, PetscViewer *);
40 PETSC_EXTERN PetscErrorCode PetscGLVisCollectiveEnd(MPI_Comm, PetscViewer *);
41 #endif
42