1e04113cfSBarry Smith 2*26bd1501SBarry Smith #if !defined(PETSCVIEWERSAWS_H) 3*26bd1501SBarry Smith #define PETSCVIEWERSAWS_H 4e04113cfSBarry Smith 5e04113cfSBarry Smith #include <petscviewer.h> 6e04113cfSBarry Smith #include <SAWs.h> 792081c13SBarry Smith PETSC_EXTERN PetscErrorCode PetscViewerSAWsOpen(MPI_Comm,PetscViewer*); 8e04113cfSBarry Smith PETSC_EXTERN PetscViewer PETSC_VIEWER_SAWS_(MPI_Comm); 9e04113cfSBarry Smith PETSC_EXTERN PetscErrorCode PETSC_VIEWER_SAWS_Destroy(MPI_Comm); 10e04113cfSBarry Smith #define PETSC_VIEWER_SAWS_WORLD PETSC_VIEWER_SAWS_(PETSC_COMM_WORLD) 11e04113cfSBarry Smith #define PETSC_VIEWER_SAWS_SELF PETSC_VIEWER_SAWS_(PETSC_COMM_SELF) 12e04113cfSBarry Smith 1316ad0300SBarry Smith #define PetscStackCallSAWs(func,args) do {PetscErrorCode _ierr; \ 1416ad0300SBarry Smith PetscStackPush(#func);_ierr = func args;PetscStackPop; if (_ierr) {SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in %s() %d",#func,_ierr);} \ 15e04113cfSBarry Smith } while (0) 16e04113cfSBarry Smith 17e04113cfSBarry Smith #endif 18