xref: /petsc/src/sys/classes/viewer/interface/viewregall.c (revision 4c02969da7909d2d0a703fac8fe8864f681a3812)
15c6c1daeSBarry Smith 
2af0996ceSBarry Smith #include <petsc/private/viewerimpl.h>  /*I "petscsys.h" I*/
35c6c1daeSBarry Smith 
48cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscViewerCreate_Socket(PetscViewer);
58cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscViewerCreate_ASCII(PetscViewer);
68cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscViewerCreate_Binary(PetscViewer);
78cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscViewerCreate_String(PetscViewer);
88cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscViewerCreate_Draw(PetscViewer);
98cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscViewerCreate_VU(PetscViewer);
108cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscViewerCreate_Mathematica(PetscViewer);
118cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscViewerCreate_HDF5(PetscViewer);
128cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscViewerCreate_Matlab(PetscViewer);
13e04113cfSBarry Smith PETSC_EXTERN PetscErrorCode PetscViewerCreate_SAWs(PetscViewer);
148cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscViewerCreate_VTK(PetscViewer);
158135c375SStefano Zampini PETSC_EXTERN PetscErrorCode PetscViewerCreate_GLVis(PetscViewer);
16*4c02969dSBarry Smith PETSC_EXTERN PetscErrorCode PetscViewerCreate_ADIOS(PetscViewer);
175c6c1daeSBarry Smith 
180f51fdf8SToby Isaac PetscBool PetscViewerRegisterAllCalled;
190f51fdf8SToby Isaac 
205c6c1daeSBarry Smith /*@C
215c6c1daeSBarry Smith   PetscViewerRegisterAll - Registers all of the graphics methods in the PetscViewer package.
225c6c1daeSBarry Smith 
235c6c1daeSBarry Smith   Not Collective
245c6c1daeSBarry Smith 
255c6c1daeSBarry Smith    Level: developer
265c6c1daeSBarry Smith 
275c6c1daeSBarry Smith .seealso:  PetscViewerRegisterDestroy()
285c6c1daeSBarry Smith @*/
29607a6623SBarry Smith PetscErrorCode  PetscViewerRegisterAll(void)
305c6c1daeSBarry Smith {
315c6c1daeSBarry Smith   PetscErrorCode ierr;
325c6c1daeSBarry Smith 
335c6c1daeSBarry Smith   PetscFunctionBegin;
340f51fdf8SToby Isaac   if (PetscViewerRegisterAllCalled) PetscFunctionReturn(0);
350f51fdf8SToby Isaac   PetscViewerRegisterAllCalled = PETSC_TRUE;
360f51fdf8SToby Isaac 
37bdf89e91SBarry Smith   ierr = PetscViewerRegister(PETSCVIEWERASCII,      PetscViewerCreate_ASCII);CHKERRQ(ierr);
38bdf89e91SBarry Smith   ierr = PetscViewerRegister(PETSCVIEWERBINARY,     PetscViewerCreate_Binary);CHKERRQ(ierr);
39bdf89e91SBarry Smith   ierr = PetscViewerRegister(PETSCVIEWERSTRING,     PetscViewerCreate_String);CHKERRQ(ierr);
40bdf89e91SBarry Smith   ierr = PetscViewerRegister(PETSCVIEWERDRAW,       PetscViewerCreate_Draw);CHKERRQ(ierr);
415c6c1daeSBarry Smith #if defined(PETSC_USE_SOCKET_VIEWER)
42bdf89e91SBarry Smith   ierr = PetscViewerRegister(PETSCVIEWERSOCKET,     PetscViewerCreate_Socket);CHKERRQ(ierr);
435c6c1daeSBarry Smith #endif
445c6c1daeSBarry Smith #if defined(PETSC_HAVE_MATHEMATICA)
45bdf89e91SBarry Smith   ierr = PetscViewerRegister(PETSCVIEWERMATHEMATICA,PetscViewerCreate_Mathematica);CHKERRQ(ierr);
465c6c1daeSBarry Smith #endif
47bdf89e91SBarry Smith   ierr = PetscViewerRegister(PETSCVIEWERVU,         PetscViewerCreate_VU);CHKERRQ(ierr);
485c6c1daeSBarry Smith #if defined(PETSC_HAVE_HDF5)
49bdf89e91SBarry Smith   ierr = PetscViewerRegister(PETSCVIEWERHDF5,       PetscViewerCreate_HDF5);CHKERRQ(ierr);
505c6c1daeSBarry Smith #endif
515c6c1daeSBarry Smith #if defined(PETSC_HAVE_MATLAB_ENGINE)
52bdf89e91SBarry Smith   ierr = PetscViewerRegister(PETSCVIEWERMATLAB,     PetscViewerCreate_Matlab);CHKERRQ(ierr);
535c6c1daeSBarry Smith #endif
54e04113cfSBarry Smith #if defined(PETSC_HAVE_SAWS)
55e04113cfSBarry Smith   ierr = PetscViewerRegister(PETSCVIEWERSAWS,        PetscViewerCreate_SAWs);CHKERRQ(ierr);
565c6c1daeSBarry Smith #endif
57bdf89e91SBarry Smith   ierr = PetscViewerRegister(PETSCVIEWERVTK,        PetscViewerCreate_VTK);CHKERRQ(ierr);
588135c375SStefano Zampini   ierr = PetscViewerRegister(PETSCVIEWERGLVIS,      PetscViewerCreate_GLVis);CHKERRQ(ierr);
59*4c02969dSBarry Smith #if defined(PETSC_HAVE_ADIOS)
60*4c02969dSBarry Smith   ierr = PetscViewerRegister(PETSCVIEWERADIOS,      PetscViewerCreate_ADIOS);CHKERRQ(ierr);
61*4c02969dSBarry Smith #endif
625c6c1daeSBarry Smith   PetscFunctionReturn(0);
635c6c1daeSBarry Smith }
645c6c1daeSBarry Smith 
65