Actual source code: viewerimpl.h

petsc-3.7.3 2016-08-01
Report Typos and Errors
  2: #ifndef _VIEWERIMPL
  3: #define _VIEWERIMPL

  5: #include <petsc/private/petscimpl.h>
  6: #include <petscviewer.h>

  8: PETSC_EXTERN PetscBool      PetscViewerRegisterAllCalled;
  9: PETSC_EXTERN PetscErrorCode PetscViewerRegisterAll(void);

 11: struct _PetscViewerOps {
 12:    PetscErrorCode (*destroy)(PetscViewer);
 13:    PetscErrorCode (*view)(PetscViewer,PetscViewer);
 14:    PetscErrorCode (*flush)(PetscViewer);
 15:    PetscErrorCode (*getsubviewer)(PetscViewer,MPI_Comm,PetscViewer*);
 16:    PetscErrorCode (*restoresubviewer)(PetscViewer,MPI_Comm,PetscViewer*);
 17:    PetscErrorCode (*read)(PetscViewer,void*,PetscInt,PetscInt*,PetscDataType);
 18:    PetscErrorCode (*setfromoptions)(PetscOptionItems*,PetscViewer);
 19:    PetscErrorCode (*setup)(PetscViewer);
 20: };

 22: #define PETSCVIEWERFORMATPUSHESMAX 25
 23: /*
 24:    Defines the viewer data structure.
 25: */
 26: struct _p_PetscViewer {
 27:   PETSCHEADER(struct _PetscViewerOps);
 28:   PetscViewerFormat format,formats[PETSCVIEWERFORMATPUSHESMAX];
 29:   int               iformat;   /* number of formats that have been pushed on formats[] stack */
 30:   void              *data;
 31:   PetscBool         setupcalled;
 32: };



 36: #endif