xref: /petsc/src/sys/classes/viewer/interface/viewregall.c (revision df4cd43f92eaa320656440c40edb1046daee8f75)
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 viewer methods in the `PetscViewer` package.
24 
25   Not Collective
26 
27    Level: developer
28 
29 .seealso: [](sec_viewers), `PetscViewer`
30 @*/
31 PetscErrorCode PetscViewerRegisterAll(void)
32 {
33   PetscFunctionBegin;
34   if (PetscViewerRegisterAllCalled) PetscFunctionReturn(PETSC_SUCCESS);
35   PetscViewerRegisterAllCalled = PETSC_TRUE;
36 
37   PetscCall(PetscViewerRegister(PETSCVIEWERASCII, PetscViewerCreate_ASCII));
38   PetscCall(PetscViewerRegister(PETSCVIEWERBINARY, PetscViewerCreate_Binary));
39   PetscCall(PetscViewerRegister(PETSCVIEWERSTRING, PetscViewerCreate_String));
40   PetscCall(PetscViewerRegister(PETSCVIEWERDRAW, PetscViewerCreate_Draw));
41 #if defined(PETSC_USE_SOCKET_VIEWER)
42   PetscCall(PetscViewerRegister(PETSCVIEWERSOCKET, PetscViewerCreate_Socket));
43 #endif
44 #if defined(PETSC_HAVE_MATHEMATICA)
45   PetscCall(PetscViewerRegister(PETSCVIEWERMATHEMATICA, PetscViewerCreate_Mathematica));
46 #endif
47   PetscCall(PetscViewerRegister(PETSCVIEWERVU, PetscViewerCreate_VU));
48 #if defined(PETSC_HAVE_HDF5)
49   PetscCall(PetscViewerRegister(PETSCVIEWERHDF5, PetscViewerCreate_HDF5));
50 #endif
51 #if defined(PETSC_HAVE_MATLAB)
52   PetscCall(PetscViewerRegister(PETSCVIEWERMATLAB, PetscViewerCreate_Matlab));
53 #endif
54 #if defined(PETSC_HAVE_SAWS)
55   PetscCall(PetscViewerRegister(PETSCVIEWERSAWS, PetscViewerCreate_SAWs));
56 #endif
57   PetscCall(PetscViewerRegister(PETSCVIEWERVTK, PetscViewerCreate_VTK));
58   PetscCall(PetscViewerRegister(PETSCVIEWERGLVIS, PetscViewerCreate_GLVis));
59 #if defined(PETSC_HAVE_ADIOS)
60   PetscCall(PetscViewerRegister(PETSCVIEWERADIOS, PetscViewerCreate_ADIOS));
61 #endif
62 #if defined(PETSC_HAVE_EXODUSII)
63   PetscCall(PetscViewerRegister(PETSCVIEWEREXODUSII, PetscViewerCreate_ExodusII));
64 #endif
65 #if defined(PETSC_HAVE_CGNS)
66   PetscCall(PetscViewerRegister(PETSCVIEWERCGNS, PetscViewerCreate_CGNS));
67 #endif
68   PetscFunctionReturn(PETSC_SUCCESS);
69 }
70