1: /* 2: This is the definition of the Mathematica viewer structure. 3: */ 5: #include src/sys/viewer/viewerimpl.h 6: #include petscsys.h 7: #ifdef PETSC_HAVE_MATHEMATICA 8: #include "mathlink.h" 9: #endif 11: typedef enum {MATHEMATICA_LINK_CREATE, MATHEMATICA_LINK_CONNECT, MATHEMATICA_LINK_LAUNCH} LinkMode; 13: typedef struct { 14: #ifdef PETSC_HAVE_MATHEMATICA 15: MLINK link; /* The link to Mathematica */ 16: #endif 17: char *linkname; /* The name to link to Mathematica on (usually a port) */ 18: char *linkhost; /* The host to link to Mathematica on */ 19: LinkMode linkmode; /* The link mode */ 20: const char *objName; /* The name for the next object passed to Mathematica */ 21: } PetscViewer_Mathematica; 23: EXTERN PetscErrorCode PetscViewerMathematicaSetFromOptions(PetscViewer); 24: EXTERN PetscErrorCode PetscViewerMathematicaSetLinkName(PetscViewer, const char *); 25: EXTERN PetscErrorCode PetscViewerMathematicaSetLinkPort(PetscViewer, int); 26: EXTERN PetscErrorCode PetscViewerMathematicaSetLinkHost(PetscViewer, const char *); 27: EXTERN PetscErrorCode PetscViewerMathematicaSetLinkMode(PetscViewer, LinkMode);