xref: /petsc/src/sys/classes/viewer/impls/mathematica/mathematica.h (revision 95c0884e6f7665b705eebf88174e89dc920c2fc0)
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 
105c6c1daeSBarry Smith typedef enum {MATHEMATICA_LINK_CREATE, MATHEMATICA_LINK_CONNECT, MATHEMATICA_LINK_LAUNCH} LinkMode;
115c6c1daeSBarry Smith 
125c6c1daeSBarry Smith typedef struct {
13519f805aSKarl 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 
22*95c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetFromOptions(PetscViewer);
23*95c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkName(PetscViewer,const char*);
24*95c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkPort(PetscViewer,int);
25*95c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkHost(PetscViewer,const char*);
26*95c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkMode(PetscViewer,LinkMode);
27