Actual source code: mathematica.h

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

 5:  #include private/viewerimpl.h
  6: #ifdef PETSC_HAVE_MATHEMATICA
  7: #include "mathlink.h"
  8: #endif

 10: typedef enum {MATHEMATICA_LINK_CREATE, MATHEMATICA_LINK_CONNECT, MATHEMATICA_LINK_LAUNCH} LinkMode;

 12: typedef struct {
 13: #ifdef PETSC_HAVE_MATHEMATICA
 14:   MLINK        link;         /* The link to Mathematica */
 15: #endif
 16:   char        *linkname;     /* The name to link to Mathematica on (usually a port) */
 17:   char        *linkhost;     /* The host to link to Mathematica on */
 18:   LinkMode     linkmode;     /* The link mode */
 19:   const char  *objName;      /* The name for the next object passed to Mathematica */
 20: } PetscViewer_Mathematica;

 22: EXTERN PetscErrorCode PetscViewerMathematicaSetFromOptions(PetscViewer);
 23: EXTERN PetscErrorCode PetscViewerMathematicaSetLinkName(PetscViewer, const char *);
 24: EXTERN PetscErrorCode PetscViewerMathematicaSetLinkPort(PetscViewer, int);
 25: EXTERN PetscErrorCode PetscViewerMathematicaSetLinkHost(PetscViewer, const char *);
 26: EXTERN PetscErrorCode PetscViewerMathematicaSetLinkMode(PetscViewer, LinkMode);