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