1 2 #include <petsc/private/viewerimpl.h> /*I "petscsys.h" I*/ 3 4 PETSC_EXTERN PetscErrorCode PetscViewerCreate_Socket(PetscViewer); 5 PETSC_EXTERN PetscErrorCode PetscViewerCreate_ASCII(PetscViewer); 6 PETSC_EXTERN PetscErrorCode PetscViewerCreate_Binary(PetscViewer); 7 PETSC_EXTERN PetscErrorCode PetscViewerCreate_String(PetscViewer); 8 PETSC_EXTERN PetscErrorCode PetscViewerCreate_Draw(PetscViewer); 9 PETSC_EXTERN PetscErrorCode PetscViewerCreate_VU(PetscViewer); 10 PETSC_EXTERN PetscErrorCode PetscViewerCreate_Mathematica(PetscViewer); 11 PETSC_EXTERN PetscErrorCode PetscViewerCreate_HDF5(PetscViewer); 12 PETSC_EXTERN PetscErrorCode PetscViewerCreate_Matlab(PetscViewer); 13 PETSC_EXTERN PetscErrorCode PetscViewerCreate_SAWs(PetscViewer); 14 PETSC_EXTERN PetscErrorCode PetscViewerCreate_VTK(PetscViewer); 15 PETSC_EXTERN PetscErrorCode PetscViewerCreate_GLVis(PetscViewer); 16 PETSC_EXTERN PetscErrorCode PetscViewerCreate_ADIOS(PetscViewer); 17 PETSC_EXTERN PetscErrorCode PetscViewerCreate_ExodusII(PetscViewer); 18 PETSC_EXTERN PetscErrorCode PetscViewerCreate_CGNS(PetscViewer); 19 20 PetscBool PetscViewerRegisterAllCalled; 21 22 /*@C 23 PetscViewerRegisterAll - Registers all of the graphics methods in the PetscViewer package. 24 25 Not Collective 26 27 Level: developer 28 @*/ 29 PetscErrorCode PetscViewerRegisterAll(void) { 30 PetscFunctionBegin; 31 if (PetscViewerRegisterAllCalled) PetscFunctionReturn(0); 32 PetscViewerRegisterAllCalled = PETSC_TRUE; 33 34 PetscCall(PetscViewerRegister(PETSCVIEWERASCII, PetscViewerCreate_ASCII)); 35 PetscCall(PetscViewerRegister(PETSCVIEWERBINARY, PetscViewerCreate_Binary)); 36 PetscCall(PetscViewerRegister(PETSCVIEWERSTRING, PetscViewerCreate_String)); 37 PetscCall(PetscViewerRegister(PETSCVIEWERDRAW, PetscViewerCreate_Draw)); 38 #if defined(PETSC_USE_SOCKET_VIEWER) 39 PetscCall(PetscViewerRegister(PETSCVIEWERSOCKET, PetscViewerCreate_Socket)); 40 #endif 41 #if defined(PETSC_HAVE_MATHEMATICA) 42 PetscCall(PetscViewerRegister(PETSCVIEWERMATHEMATICA, PetscViewerCreate_Mathematica)); 43 #endif 44 PetscCall(PetscViewerRegister(PETSCVIEWERVU, PetscViewerCreate_VU)); 45 #if defined(PETSC_HAVE_HDF5) 46 PetscCall(PetscViewerRegister(PETSCVIEWERHDF5, PetscViewerCreate_HDF5)); 47 #endif 48 #if defined(PETSC_HAVE_MATLAB_ENGINE) 49 PetscCall(PetscViewerRegister(PETSCVIEWERMATLAB, PetscViewerCreate_Matlab)); 50 #endif 51 #if defined(PETSC_HAVE_SAWS) 52 PetscCall(PetscViewerRegister(PETSCVIEWERSAWS, PetscViewerCreate_SAWs)); 53 #endif 54 PetscCall(PetscViewerRegister(PETSCVIEWERVTK, PetscViewerCreate_VTK)); 55 PetscCall(PetscViewerRegister(PETSCVIEWERGLVIS, PetscViewerCreate_GLVis)); 56 #if defined(PETSC_HAVE_ADIOS) 57 PetscCall(PetscViewerRegister(PETSCVIEWERADIOS, PetscViewerCreate_ADIOS)); 58 #endif 59 #if defined(PETSC_HAVE_EXODUSII) 60 PetscCall(PetscViewerRegister(PETSCVIEWEREXODUSII, PetscViewerCreate_ExodusII)); 61 #endif 62 #if defined(PETSC_HAVE_CGNS) 63 PetscCall(PetscViewerRegister(PETSCVIEWERCGNS, PetscViewerCreate_CGNS)); 64 #endif 65 PetscFunctionReturn(0); 66 } 67