xref: /petsc/src/sys/classes/viewer/impls/mathematica/mathematica.h (revision 9dd11ecf0918283bb567d8b33a92f53ac4ea7840)
1*a4963045SJacob Faibussowitsch #pragma once
25c6c1daeSBarry Smith /*
35c6c1daeSBarry Smith    This is the definition of the Mathematica viewer structure.
45c6c1daeSBarry Smith */
55c6c1daeSBarry Smith 
6af0996ceSBarry Smith #include <petsc/private/viewerimpl.h> /*I  "petscsys.h"  I*/
7519f805aSKarl Rupp #if defined(PETSC_HAVE_MATHEMATICA)
85c6c1daeSBarry Smith   #include <mathlink.h>
95c6c1daeSBarry Smith #endif
105c6c1daeSBarry Smith 
119371c9d4SSatish Balay typedef enum {
129371c9d4SSatish Balay   MATHEMATICA_LINK_CREATE,
139371c9d4SSatish Balay   MATHEMATICA_LINK_CONNECT,
149371c9d4SSatish Balay   MATHEMATICA_LINK_LAUNCH
159371c9d4SSatish Balay } LinkMode;
165c6c1daeSBarry Smith 
175c6c1daeSBarry Smith typedef struct {
18519f805aSKarl Rupp #if defined(PETSC_HAVE_MATHEMATICA)
195c6c1daeSBarry Smith   MLINK link; /* The link to Mathematica */
205c6c1daeSBarry Smith #endif
215c6c1daeSBarry Smith   char       *linkname; /* The name to link to Mathematica on (usually a port) */
225c6c1daeSBarry Smith   char       *linkhost; /* The host to link to Mathematica on */
235c6c1daeSBarry Smith   LinkMode    linkmode; /* The link mode */
245c6c1daeSBarry Smith   const char *objName;  /* The name for the next object passed to Mathematica */
255c6c1daeSBarry Smith } PetscViewer_Mathematica;
265c6c1daeSBarry Smith 
2795c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetFromOptions(PetscViewer);
2895c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkName(PetscViewer, const char *);
2995c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkPort(PetscViewer, int);
3095c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkHost(PetscViewer, const char *);
3195c0884eSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkMode(PetscViewer, LinkMode);
32