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 {PETSCVIEWERGLVIS_DISCONNECTED, PETSCVIEWERGLVIS_CONNECTED, PETSCVIEWERGLVIS_DISABLED} PetscViewerGLVisStatus; 22 23 PETSC_EXTERN PetscErrorCode PetscViewerGLVisPause_Private(PetscViewer); 24 PETSC_EXTERN PetscErrorCode PetscViewerGLVisSetDM_Private(PetscViewer,PetscObject); 25 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetDM_Private(PetscViewer,PetscObject*); 26 PETSC_EXTERN PetscErrorCode PetscViewerGLVisInitWindow_Private(PetscViewer,PetscBool,PetscInt,const char*); 27 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetStatus_Private(PetscViewer,PetscViewerGLVisStatus*); 28 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetType_Private(PetscViewer,PetscViewerGLVisType*); 29 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetWindow_Private(PetscViewer,PetscInt,PetscViewer*); 30 PETSC_EXTERN PetscErrorCode PetscViewerGLVisRestoreWindow_Private(PetscViewer,PetscInt,PetscViewer*); 31 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetFields_Private(PetscViewer,PetscInt*,const char**[],PetscInt*[],PetscErrorCode(**)(PetscObject,PetscInt,PetscObject[],void*),PetscObject*[],void**); 32 PETSC_EXTERN PetscErrorCode PetscViewerGLVisGetDMWindow_Private(PetscViewer,PetscViewer*); 33 PETSC_EXTERN PetscErrorCode PetscViewerGLVisRestoreDMWindow_Private(PetscViewer,PetscViewer*); 34 35 PETSC_EXTERN PetscErrorCode PetscGLVisCollectiveBegin(MPI_Comm,PetscViewer*); 36 PETSC_EXTERN PetscErrorCode PetscGLVisCollectiveEnd(MPI_Comm,PetscViewer*); 37 #endif 38