Actual source code: mathematica.h
1: #pragma once
2: /*
3: This is the definition of the Mathematica viewer structure.
4: */
6: #include <petsc/private/viewerimpl.h>
7: #if defined(PETSC_HAVE_MATHEMATICA)
8: #include <mathlink.h>
9: #endif
11: typedef enum {
12: MATHEMATICA_LINK_CREATE,
13: MATHEMATICA_LINK_CONNECT,
14: MATHEMATICA_LINK_LAUNCH
15: } LinkMode;
17: typedef struct {
18: #if defined(PETSC_HAVE_MATHEMATICA)
19: MLINK link; /* The link to Mathematica */
20: #endif
21: char *linkname; /* The name to link to Mathematica on (usually a port) */
22: char *linkhost; /* The host to link to Mathematica on */
23: LinkMode linkmode; /* The link mode */
24: const char *objName; /* The name for the next object passed to Mathematica */
25: } PetscViewer_Mathematica;
27: PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetFromOptions(PetscViewer);
28: PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkName(PetscViewer, const char *);
29: PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkPort(PetscViewer, int);
30: PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkHost(PetscViewer, const char *);
31: PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkMode(PetscViewer, LinkMode);