15c6c1daeSBarry Smith /* 25c6c1daeSBarry Smith This is the definition of the Mathematica viewer structure. 35c6c1daeSBarry Smith */ 45c6c1daeSBarry Smith 55c6c1daeSBarry Smith #include <petsc-private/viewerimpl.h> /*I "petscsys.h" I*/ 6*519f805aSKarl Rupp #if defined(PETSC_HAVE_MATHEMATICA) 75c6c1daeSBarry Smith #include <mathlink.h> 85c6c1daeSBarry Smith #endif 95c6c1daeSBarry Smith 105c6c1daeSBarry Smith typedef enum {MATHEMATICA_LINK_CREATE, MATHEMATICA_LINK_CONNECT, MATHEMATICA_LINK_LAUNCH} LinkMode; 115c6c1daeSBarry Smith 125c6c1daeSBarry Smith typedef struct { 13*519f805aSKarl Rupp #if defined(PETSC_HAVE_MATHEMATICA) 145c6c1daeSBarry Smith MLINK link; /* The link to Mathematica */ 155c6c1daeSBarry Smith #endif 165c6c1daeSBarry Smith char *linkname; /* The name to link to Mathematica on (usually a port) */ 175c6c1daeSBarry Smith char *linkhost; /* The host to link to Mathematica on */ 185c6c1daeSBarry Smith LinkMode linkmode; /* The link mode */ 195c6c1daeSBarry Smith const char *objName; /* The name for the next object passed to Mathematica */ 205c6c1daeSBarry Smith } PetscViewer_Mathematica; 215c6c1daeSBarry Smith 225c6c1daeSBarry Smith extern PetscErrorCode PetscViewerMathematicaSetFromOptions(PetscViewer); 235c6c1daeSBarry Smith extern PetscErrorCode PetscViewerMathematicaSetLinkName(PetscViewer, const char *); 245c6c1daeSBarry Smith extern PetscErrorCode PetscViewerMathematicaSetLinkPort(PetscViewer, int); 255c6c1daeSBarry Smith extern PetscErrorCode PetscViewerMathematicaSetLinkHost(PetscViewer, const char *); 265c6c1daeSBarry Smith extern PetscErrorCode PetscViewerMathematicaSetLinkMode(PetscViewer, LinkMode); 27