1*e04113cfSBarry Smith 2*e04113cfSBarry Smith #if !defined(__PETSCVIEWERSAWS_H) 3*e04113cfSBarry Smith #define __PETSCVIEWERSAWS_H 4*e04113cfSBarry Smith 5*e04113cfSBarry Smith #include <petscviewer.h> 6*e04113cfSBarry Smith #include <SAWs.h> 7*e04113cfSBarry Smith PETSC_EXTERN PetscErrorCode PetscViewerSAWSOpen(MPI_Comm,PetscViewer*); 8*e04113cfSBarry Smith PETSC_EXTERN PetscViewer PETSC_VIEWER_SAWS_(MPI_Comm); 9*e04113cfSBarry Smith PETSC_EXTERN PetscErrorCode PETSC_VIEWER_SAWS_Destroy(MPI_Comm); 10*e04113cfSBarry Smith #define PETSC_VIEWER_SAWS_WORLD PETSC_VIEWER_SAWS_(PETSC_COMM_WORLD) 11*e04113cfSBarry Smith #define PETSC_VIEWER_SAWS_SELF PETSC_VIEWER_SAWS_(PETSC_COMM_SELF) 12*e04113cfSBarry Smith 13*e04113cfSBarry Smith #define PetscStackCallSAWs(func,args) do {PetscErrorCode _ierr; char* err; \ 14*e04113cfSBarry Smith PetscStackPush(#func);_ierr = func args;PetscStackPop; if (_ierr) {SETERRQ2(PETSC_COMM_SELF,PETSC_ERR_LIB,"Error in %s() %s",#func,err);} \ 15*e04113cfSBarry Smith } while (0) 16*e04113cfSBarry Smith 17*e04113cfSBarry Smith #endif 18