2: #ifndef _VIEWERIMPL 3: #define _VIEWERIMPL 5: #include <petsc-private/petscimpl.h> 6: #include <petscviewer.h> 8: struct _PetscViewerOps { 9: PetscErrorCode (*destroy)(PetscViewer); 10: PetscErrorCode (*view)(PetscViewer,PetscViewer); 11: PetscErrorCode (*flush)(PetscViewer); 12: PetscErrorCode (*getsingleton)(PetscViewer,PetscViewer*); 13: PetscErrorCode (*restoresingleton)(PetscViewer,PetscViewer*); 14: PetscErrorCode (*getsubcomm)(PetscViewer,MPI_Comm,PetscViewer*); 15: PetscErrorCode (*restoresubcomm)(PetscViewer,MPI_Comm,PetscViewer*); 16: PetscErrorCode (*setfromoptions)(PetscViewer); 17: }; 19: /* 20: Defines the viewer data structure. 21: */ 22: struct _p_PetscViewer { 23: PETSCHEADER(struct _PetscViewerOps); 24: PetscViewerFormat format,formats[10]; 25: int iformat; /* number of formats that have been pushed on formats[] stack */ 26: void *data; 27: }; 31: #endif