xref: /petsc/include/petsc/private/glvisviewerimpl.h (revision e3acc61dbe4e529e64e419129a71ab22fc3ce44d)
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   PetscReal pause;    /* pause argument */
16   char*     fmt;      /* format */
17 };
18 typedef struct _n_PetscViewerGLVisInfo *PetscViewerGLVisInfo;
19 
20 typedef enum {PETSCVIEWERGLVIS_DISCONNECTED, PETSCVIEWERGLVIS_CONNECTED, PETSCVIEWERGLVIS_DISABLED} PetscViewerGLVisStatus;
21 
22 PETSC_EXTERN PetscErrorCode PetscViewerGLVisPause_Private(PetscViewer);
23 PETSC_EXTERN PetscErrorCode PetscViewerGLVisSetDM_Private(PetscViewer,PetscObject);
24 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetDM_Private(PetscViewer,PetscObject*);
25 PETSC_EXTERN PetscErrorCode PetscViewerGLVisInitWindow_Private(PetscViewer,PetscBool,PetscInt,const char*);
26 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetStatus_Private(PetscViewer,PetscViewerGLVisStatus*);
27 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetType_Private(PetscViewer,PetscViewerGLVisType*);
28 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetWindow_Private(PetscViewer,PetscInt,PetscViewer*);
29 PETSC_EXTERN PetscErrorCode PetscViewerGLVisRestoreWindow_Private(PetscViewer,PetscInt,PetscViewer*);
30 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetFields_Private(PetscViewer,PetscInt*,const char**[],PetscInt*[],PetscErrorCode(**)(PetscObject,PetscInt,PetscObject[],void*),PetscObject*[],void**);
31 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetDMWindow_Private(PetscViewer,PetscViewer*);
32 #endif
33