Actual source code: viewregall.c

  1: #include <petsc/private/viewerimpl.h>

  3: PETSC_EXTERN PetscErrorCode PetscViewerCreate_Socket(PetscViewer);
  4: PETSC_EXTERN PetscErrorCode PetscViewerCreate_ASCII(PetscViewer);
  5: PETSC_EXTERN PetscErrorCode PetscViewerCreate_Binary(PetscViewer);
  6: PETSC_EXTERN PetscErrorCode PetscViewerCreate_String(PetscViewer);
  7: PETSC_EXTERN PetscErrorCode PetscViewerCreate_Draw(PetscViewer);
  8: PETSC_EXTERN PetscErrorCode PetscViewerCreate_VU(PetscViewer);
  9: PETSC_EXTERN PetscErrorCode PetscViewerCreate_Mathematica(PetscViewer);
 10: PETSC_EXTERN PetscErrorCode PetscViewerCreate_HDF5(PetscViewer);
 11: PETSC_EXTERN PetscErrorCode PetscViewerCreate_Matlab(PetscViewer);
 12: PETSC_EXTERN PetscErrorCode PetscViewerCreate_SAWs(PetscViewer);
 13: PETSC_EXTERN PetscErrorCode PetscViewerCreate_VTK(PetscViewer);
 14: PETSC_EXTERN PetscErrorCode PetscViewerCreate_GLVis(PetscViewer);
 15: PETSC_EXTERN PetscErrorCode PetscViewerCreate_ADIOS(PetscViewer);
 16: PETSC_EXTERN PetscErrorCode PetscViewerCreate_ExodusII(PetscViewer);
 17: PETSC_EXTERN PetscErrorCode PetscViewerCreate_CGNS(PetscViewer);

 19: PetscBool PetscViewerRegisterAllCalled;

 21: /*@C
 22:   PetscViewerRegisterAll - Registers all of the viewer types (`PetscViewerType`) in the `PetscViewer` package.

 24:   Not Collective

 26:   Level: developer

 28: .seealso: [](sec_viewers), `PetscViewer`
 29: @*/
 30: PetscErrorCode PetscViewerRegisterAll(void)
 31: {
 32:   PetscFunctionBegin;
 33:   if (PetscViewerRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
 34:   PetscViewerRegisterAllCalled = PETSC_TRUE;

 36:   PetscCall(PetscViewerRegister(PETSCVIEWERASCII, PetscViewerCreate_ASCII));
 37:   PetscCall(PetscViewerRegister(PETSCVIEWERBINARY, PetscViewerCreate_Binary));
 38:   PetscCall(PetscViewerRegister(PETSCVIEWERSTRING, PetscViewerCreate_String));
 39:   PetscCall(PetscViewerRegister(PETSCVIEWERDRAW, PetscViewerCreate_Draw));
 40: #if defined(PETSC_USE_SOCKET_VIEWER)
 41:   PetscCall(PetscViewerRegister(PETSCVIEWERSOCKET, PetscViewerCreate_Socket));
 42: #endif
 43: #if defined(PETSC_HAVE_MATHEMATICA)
 44:   PetscCall(PetscViewerRegister(PETSCVIEWERMATHEMATICA, PetscViewerCreate_Mathematica));
 45: #endif
 46:   PetscCall(PetscViewerRegister(PETSCVIEWERVU, PetscViewerCreate_VU));
 47: #if defined(PETSC_HAVE_HDF5)
 48:   PetscCall(PetscViewerRegister(PETSCVIEWERHDF5, PetscViewerCreate_HDF5));
 49: #endif
 50: #if defined(PETSC_HAVE_MATLAB)
 51:   PetscCall(PetscViewerRegister(PETSCVIEWERMATLAB, PetscViewerCreate_Matlab));
 52: #endif
 53: #if defined(PETSC_HAVE_SAWS)
 54:   PetscCall(PetscViewerRegister(PETSCVIEWERSAWS, PetscViewerCreate_SAWs));
 55: #endif
 56:   PetscCall(PetscViewerRegister(PETSCVIEWERVTK, PetscViewerCreate_VTK));
 57:   PetscCall(PetscViewerRegister(PETSCVIEWERGLVIS, PetscViewerCreate_GLVis));
 58: #if defined(PETSC_HAVE_ADIOS)
 59:   PetscCall(PetscViewerRegister(PETSCVIEWERADIOS, PetscViewerCreate_ADIOS));
 60: #endif
 61: #if defined(PETSC_HAVE_EXODUSII)
 62:   PetscCall(PetscViewerRegister(PETSCVIEWEREXODUSII, PetscViewerCreate_ExodusII));
 63: #endif
 64: #if defined(PETSC_HAVE_CGNS)
 65:   PetscCall(PetscViewerRegister(PETSCVIEWERCGNS, PetscViewerCreate_CGNS));
 66: #endif
 67:   PetscFunctionReturn(PETSC_SUCCESS);
 68: }