Actual source code: mathematica.h

  1: /*
  2:    This is the definition of the Mathematica viewer structure.
  3: */

  5: #include <petsc/private/viewerimpl.h>
  6: #if defined(PETSC_HAVE_MATHEMATICA)
  7:   #include <mathlink.h>
  8: #endif

 10: typedef enum {
 11:   MATHEMATICA_LINK_CREATE,
 12:   MATHEMATICA_LINK_CONNECT,
 13:   MATHEMATICA_LINK_LAUNCH
 14: } LinkMode;

 16: typedef struct {
 17: #if defined(PETSC_HAVE_MATHEMATICA)
 18:   MLINK link; /* The link to Mathematica */
 19: #endif
 20:   char       *linkname; /* The name to link to Mathematica on (usually a port) */
 21:   char       *linkhost; /* The host to link to Mathematica on */
 22:   LinkMode    linkmode; /* The link mode */
 23:   const char *objName;  /* The name for the next object passed to Mathematica */
 24: } PetscViewer_Mathematica;

 26: PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetFromOptions(PetscViewer);
 27: PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkName(PetscViewer, const char *);
 28: PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkPort(PetscViewer, int);
 29: PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkHost(PetscViewer, const char *);
 30: PETSC_EXTERN PetscErrorCode PetscViewerMathematicaSetLinkMode(PetscViewer, LinkMode);