15c6c1daeSBarry Smith 2*af0996ceSBarry 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_Netcdf(PetscViewer); 128cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscViewerCreate_HDF5(PetscViewer); 138cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscViewerCreate_Matlab(PetscViewer); 14e04113cfSBarry Smith PETSC_EXTERN PetscErrorCode PetscViewerCreate_SAWs(PetscViewer); 158cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscViewerCreate_VTK(PetscViewer); 165c6c1daeSBarry Smith 170f51fdf8SToby Isaac PetscBool PetscViewerRegisterAllCalled; 180f51fdf8SToby Isaac 195c6c1daeSBarry Smith #undef __FUNCT__ 205c6c1daeSBarry Smith #define __FUNCT__ "PetscViewerRegisterAll" 215c6c1daeSBarry Smith /*@C 225c6c1daeSBarry Smith PetscViewerRegisterAll - Registers all of the graphics methods in the PetscViewer package. 235c6c1daeSBarry Smith 245c6c1daeSBarry Smith Not Collective 255c6c1daeSBarry Smith 265c6c1daeSBarry Smith Level: developer 275c6c1daeSBarry Smith 285c6c1daeSBarry Smith .seealso: PetscViewerRegisterDestroy() 295c6c1daeSBarry Smith @*/ 30607a6623SBarry Smith PetscErrorCode PetscViewerRegisterAll(void) 315c6c1daeSBarry Smith { 325c6c1daeSBarry Smith PetscErrorCode ierr; 335c6c1daeSBarry Smith 345c6c1daeSBarry Smith PetscFunctionBegin; 350f51fdf8SToby Isaac if (PetscViewerRegisterAllCalled) PetscFunctionReturn(0); 360f51fdf8SToby Isaac PetscViewerRegisterAllCalled = PETSC_TRUE; 370f51fdf8SToby Isaac 38bdf89e91SBarry Smith ierr = PetscViewerRegister(PETSCVIEWERASCII, PetscViewerCreate_ASCII);CHKERRQ(ierr); 39bdf89e91SBarry Smith ierr = PetscViewerRegister(PETSCVIEWERBINARY, PetscViewerCreate_Binary);CHKERRQ(ierr); 40bdf89e91SBarry Smith ierr = PetscViewerRegister(PETSCVIEWERSTRING, PetscViewerCreate_String);CHKERRQ(ierr); 41bdf89e91SBarry Smith ierr = PetscViewerRegister(PETSCVIEWERDRAW, PetscViewerCreate_Draw);CHKERRQ(ierr); 425c6c1daeSBarry Smith #if defined(PETSC_USE_SOCKET_VIEWER) 43bdf89e91SBarry Smith ierr = PetscViewerRegister(PETSCVIEWERSOCKET, PetscViewerCreate_Socket);CHKERRQ(ierr); 445c6c1daeSBarry Smith #endif 455c6c1daeSBarry Smith #if defined(PETSC_HAVE_MATHEMATICA) 46bdf89e91SBarry Smith ierr = PetscViewerRegister(PETSCVIEWERMATHEMATICA,PetscViewerCreate_Mathematica);CHKERRQ(ierr); 475c6c1daeSBarry Smith #endif 48bdf89e91SBarry Smith ierr = PetscViewerRegister(PETSCVIEWERVU, PetscViewerCreate_VU);CHKERRQ(ierr); 495c6c1daeSBarry Smith #if defined(PETSC_HAVE_HDF5) 50bdf89e91SBarry Smith ierr = PetscViewerRegister(PETSCVIEWERHDF5, PetscViewerCreate_HDF5);CHKERRQ(ierr); 515c6c1daeSBarry Smith #endif 525c6c1daeSBarry Smith #if defined(PETSC_HAVE_MATLAB_ENGINE) 53bdf89e91SBarry Smith ierr = PetscViewerRegister(PETSCVIEWERMATLAB, PetscViewerCreate_Matlab);CHKERRQ(ierr); 545c6c1daeSBarry Smith #endif 55e04113cfSBarry Smith #if defined(PETSC_HAVE_SAWS) 56e04113cfSBarry Smith ierr = PetscViewerRegister(PETSCVIEWERSAWS, PetscViewerCreate_SAWs);CHKERRQ(ierr); 575c6c1daeSBarry Smith #endif 58bdf89e91SBarry Smith ierr = PetscViewerRegister(PETSCVIEWERVTK, PetscViewerCreate_VTK);CHKERRQ(ierr); 595c6c1daeSBarry Smith PetscFunctionReturn(0); 605c6c1daeSBarry Smith } 615c6c1daeSBarry Smith 62