15c6c1daeSBarry Smith /* 25c6c1daeSBarry Smith This is the definition of the Mathematica viewer structure. 35c6c1daeSBarry Smith */ 45c6c1daeSBarry Smith 5af0996ceSBarry Smith #include <petsc/private/viewerimpl.h> /*I "petscsys.h" I*/ 6519f805aSKarl Rupp #if defined(PETSC_HAVE_MATHEMATICA) 75c6c1daeSBarry Smith #include <mathlink.h> 85c6c1daeSBarry Smith #endif 95c6c1daeSBarry Smith 10*9371c9d4SSatish Balay typedef enum { 11*9371c9d4SSatish Balay MATHEMATICA_LINK_CREATE, 12*9371c9d4SSatish Balay MATHEMATICA_LINK_CONNECT, 13*9371c9d4SSatish Balay MATHEMATICA_LINK_LAUNCH 14*9371c9d4SSatish Balay } LinkMode; 155c6c1daeSBarry Smith 165c6c1daeSBarry Smith typedef struct { 17519f805aSKarl Rupp #if defined(PETSC_HAVE_MATHEMATICA) 185c6c1daeSBarry Smith MLINK link; /* The link to Mathematica */ 195c6c1daeSBarry Smith #endif 205c6c1daeSBarry Smith char *linkname; /* The name to link to Mathematica on (usually a port) */ 215c6c1daeSBarry Smith char *linkhost; /* The host to link to Mathematica on */ 225c6c1daeSBarry Smith LinkMode linkmode; /* The link mode */ 235c6c1daeSBarry Smith const char *objName; /* The name for the next object passed to Mathematica */ 245c6c1daeSBarry Smith } PetscViewer_Mathematica; 255c6c1daeSBarry Smith 2695c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetFromOptions(PetscViewer); 2795c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkName(PetscViewer, const char *); 2895c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkPort(PetscViewer, int); 2995c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkHost(PetscViewer, const char *); 3095c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkMode(PetscViewer, LinkMode); 31