Actual source code: glvisviewerimpl.h
1: #pragma once
3: #include <petscviewer.h>
4: #include <petscsys.h>
6: struct _n_PetscViewerGLVisVecInfo {
7: char *fec_type; /* the output of FiniteElementCollection::Name() */
8: };
9: typedef struct _n_PetscViewerGLVisVecInfo *PetscViewerGLVisVecInfo;
11: struct _n_PetscViewerGLVisInfo {
12: PetscBool enabled; /* whether or not to visualize data from the process (it works, but it currently misses a public API) */
13: PetscBool init; /* whether or not the popup window has been initialized (must be done after having sent the data the first time) */
14: PetscInt size[2]; /* window sizes */
15: PetscReal pause; /* pause argument */
16: char *fmt; /* format */
17: };
18: typedef struct _n_PetscViewerGLVisInfo *PetscViewerGLVisInfo;
20: typedef enum {
21: PETSCVIEWERGLVIS_DISCONNECTED,
22: PETSCVIEWERGLVIS_CONNECTED,
23: PETSCVIEWERGLVIS_DISABLED
24: } PetscViewerGLVisStatus;
26: PETSC_SINGLE_LIBRARY_INTERN PetscErrorCode PetscViewerGLVisPause_Internal(PetscViewer);
27: PETSC_SINGLE_LIBRARY_INTERN PetscErrorCode PetscViewerGLVisSetDM_Internal(PetscViewer, PetscObject);
28: PETSC_SINGLE_LIBRARY_INTERN PetscErrorCode PetscViewerGLVisGetDM_Internal(PetscViewer, PetscObject *);
29: PETSC_SINGLE_LIBRARY_INTERN PetscErrorCode PetscViewerGLVisInitWindow_Internal(PetscViewer, PetscBool, PetscInt, const char *);
30: PETSC_SINGLE_LIBRARY_INTERN PetscErrorCode PetscViewerGLVisGetStatus_Internal(PetscViewer, PetscViewerGLVisStatus *);
31: PETSC_SINGLE_LIBRARY_INTERN PetscErrorCode PetscViewerGLVisGetType_Internal(PetscViewer, PetscViewerGLVisType *);
32: PETSC_SINGLE_LIBRARY_INTERN PetscErrorCode PetscViewerGLVisGetWindow_Internal(PetscViewer, PetscInt, PetscViewer *);
33: PETSC_SINGLE_LIBRARY_INTERN PetscErrorCode PetscViewerGLVisRestoreWindow_Internal(PetscViewer, PetscInt, PetscViewer *);
34: PETSC_SINGLE_LIBRARY_INTERN PetscErrorCode PetscViewerGLVisGetFields_Internal(PetscViewer, PetscInt *, const char **[], PetscInt *[], PetscErrorCode (**)(PetscObject, PetscInt, PetscObject[], void *), PetscObject *[], void **);
35: PETSC_SINGLE_LIBRARY_INTERN PetscErrorCode PetscViewerGLVisGetDMWindow_Internal(PetscViewer, PetscViewer *);
36: PETSC_SINGLE_LIBRARY_INTERN PetscErrorCode PetscViewerGLVisRestoreDMWindow_Internal(PetscViewer, PetscViewer *);
38: PETSC_SINGLE_LIBRARY_INTERN PetscErrorCode PetscGLVisCollectiveBegin(MPI_Comm, PetscViewer *);
39: PETSC_SINGLE_LIBRARY_INTERN PetscErrorCode PetscGLVisCollectiveEnd(MPI_Comm, PetscViewer *);