[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5. Solver module

Five external solvers can be interfaced simultaneously with Gmsh.

If you just want to start a solver from the solver module, with no further interactions between the solver and Gmsh, just edit the options relative to one of the five available solvers (e.g., Solver.Name0, Solver.Executable0, ...; see 5.1 Solver options), and set the corresponding "client-server" option to zero (e.g., Solver.ClientServer0 = 0). This doesn't require any modification to be made to the solver.

If you want the solver to interact with Gmsh (for error messages, option definitions, post-processing, etc.), you need to link your solver with the `GmshClient.c' file and add the appropriate function calls inside your program. You can then proceed as in the previous case, but this time you should set the client-server option to 1 (e.g., Solver.ClientServer0 = 1), so that Gmsh and the solver can communicate through a Unix socket. See 5.2 Solver example, for an example of how to interface a C solver. Bindings for solvers written in other languages (e.g., Perl) are available on http://www.geuz.org/gmsh/.

5.1 Solver options  
5.2 Solver example  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.1 Solver options

Solver.Name0
Name of solver 0
Default value: "GetDP"
Saved in: General.OptionsFileName

Solver.Help0
Help string for solver 0
Default value: "A General environment for the treatment of Discrete Problems. Copyright (C) 1997-2004 Patrick Dular and Christophe Geuzaine. Visit http://www.geuz.org/getdp/ for more info"
Saved in: General.OptionsFileName

Solver.Executable0
System command to launch solver 0 (should not contain the `&' character)
Default value: "getdp"
Saved in: General.OptionsFileName

Solver.Extension0
Default file name extension for solver 0
Default value: ".pro"
Saved in: General.OptionsFileName

Solver.MeshName0
Default mesh file name for solver 0
Default value: ""
Saved in: General.OptionsFileName

Solver.MeshCommand0
Command used to specify the mesh file for solver 0
Default value: "-msh %s"
Saved in: General.OptionsFileName

Solver.SocketCommand0
Command to specify the socket to solver 0
Default value: "-socket %s"
Saved in: General.OptionsFileName

Solver.NameCommand0
Command to specify the problem name to solver 0
Default value: "%s"
Saved in: General.OptionsFileName

Solver.OptionCommand0
Command to get options from solver 0
Default value: ""
Saved in: General.OptionsFileName

Solver.FirstOption0
Label of first option for solver 0
Default value: "Resolution"
Saved in: General.OptionsFileName

Solver.SecondOption0
Label of second option for solver 0
Default value: "PostOperation"
Saved in: General.OptionsFileName

Solver.ThirdOption0
Label of third option for solver 0
Default value: ""
Saved in: General.OptionsFileName

Solver.FourthOption0
Label of fourth option for solver 0
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthOption0
Label of fifth option for solver 0
Default value: ""
Saved in: General.OptionsFileName

Solver.FirstButton0
Label of first button for solver 0
Default value: "Pre"
Saved in: General.OptionsFileName

Solver.FirstButtonCommand0
Command associated with the first button for solver 0
Default value: "-pre %s"
Saved in: General.OptionsFileName

Solver.SecondButton0
Label of second button for solver 0
Default value: "Cal"
Saved in: General.OptionsFileName

Solver.SecondButtonCommand0
Command associated with the second button for solver 0
Default value: "-cal"
Saved in: General.OptionsFileName

Solver.ThirdButton0
Label of third button for solver 0
Default value: "Pos"
Saved in: General.OptionsFileName

Solver.ThirdButtonCommand0
Command associated with the third button for solver 0
Default value: "-bin -pos %s"
Saved in: General.OptionsFileName

Solver.FourthButton0
Label of fourth button for solver 0
Default value: ""
Saved in: General.OptionsFileName

Solver.FourthButtonCommand0
Command associated with the fourth button for solver 0
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthButton0
Label of fifth button for solver 0
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthButtonCommand0
Command associated with the fifth button for solver 0
Default value: ""
Saved in: General.OptionsFileName

Solver.Name1
Name of solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.Help1
Help string for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.Executable1
System command to launch solver 1 (should not contain the `&' character)
Default value: ""
Saved in: General.OptionsFileName

Solver.Extension1
Default file name extension for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.MeshName1
Default mesh file name for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.MeshCommand1
Command used to specify the mesh file for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.SocketCommand1
Command to specify the socket to solver 1
Default value: "-socket %s"
Saved in: General.OptionsFileName

Solver.NameCommand1
Command to specify the problem name to solver 1
Default value: "%s"
Saved in: General.OptionsFileName

Solver.OptionCommand1
Command to get options from solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.FirstOption1
Label of first option for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.SecondOption1
Label of second option for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.ThirdOption1
Label of third option for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.FourthOption1
Label of fourth option for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthOption1
Label of fifth option for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.FirstButton1
Label of first button for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.FirstButtonCommand1
Command associated with the first button for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.SecondButton1
Label of second button for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.SecondButtonCommand1
Command associated with the second button for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.ThirdButton1
Label of third button for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.ThirdButtonCommand1
Command associated with the third button for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.FourthButton1
Label of fourth button for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.FourthButtonCommand1
Command associated with the fourth button for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthButton1
Label of fifth button for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthButtonCommand1
Command associated with the fifth button for solver 1
Default value: ""
Saved in: General.OptionsFileName

Solver.Name2
Name of solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.Help2
Help string for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.Executable2
System command to launch solver 2 (should not contain the `&' character)
Default value: ""
Saved in: General.OptionsFileName

Solver.Extension2
Default file name extension for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.MeshName2
Default mesh file name for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.MeshCommand2
Command used to specify the mesh file for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.SocketCommand2
Command to specify the socket to solver 2
Default value: "-socket %s"
Saved in: General.OptionsFileName

Solver.NameCommand2
Command to specify the problem name to solver 2
Default value: "%s"
Saved in: General.OptionsFileName

Solver.OptionCommand2
Command to get options from solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.FirstOption2
Label of first option for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.SecondOption2
Label of second option for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.ThirdOption2
Label of third option for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.FourthOption2
Label of fourth option for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthOption2
Label of fifth option for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.FirstButton2
Label of first button for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.FirstButtonCommand2
Command associated with the first button for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.SecondButton2
Label of second button for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.SecondButtonCommand2
Command associated with the second button for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.ThirdButton2
Label of third button for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.ThirdButtonCommand2
Command associated with the third button for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.FourthButton2
Label of fourth button for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.FourthButtonCommand2
Command associated with the fourth button for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthButton2
Label of fifth button for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthButtonCommand2
Command associated with the fifth button for solver 2
Default value: ""
Saved in: General.OptionsFileName

Solver.Name3
Name of solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.Help3
Help string for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.Executable3
System command to launch solver 3 (should not contain the `&' character)
Default value: ""
Saved in: General.OptionsFileName

Solver.Extension3
Default file name extension for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.MeshName3
Default mesh file name for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.MeshCommand3
Command used to specify the mesh file for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.SocketCommand3
Command to specify the socket to solver 3
Default value: "-socket %s"
Saved in: General.OptionsFileName

Solver.NameCommand3
Command to specify the problem name to solver 3
Default value: "%s"
Saved in: General.OptionsFileName

Solver.OptionCommand3
Command to get options from solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.FirstOption3
Label of first option for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.SecondOption3
Label of second option for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.ThirdOption3
Label of third option for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.FourthOption3
Label of fourth option for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthOption3
Label of fifth option for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.FirstButton3
Label of first button for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.FirstButtonCommand3
Command associated with the first button for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.SecondButton3
Label of second button for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.SecondButtonCommand3
Command associated with the second button for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.ThirdButton3
Label of third button for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.ThirdButtonCommand3
Command associated with the third button for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.FourthButton3
Label of fourth button for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.FourthButtonCommand3
Command associated with the fourth button for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthButton3
Label of fifth button for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthButtonCommand3
Command associated with the fifth button for solver 3
Default value: ""
Saved in: General.OptionsFileName

Solver.Name4
Name of solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.Help4
Help string for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.Executable4
System command to launch solver 4 (should not contain the `&' character)
Default value: ""
Saved in: General.OptionsFileName

Solver.Extension4
Default file name extension for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.MeshName4
Default mesh file name for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.MeshCommand4
Command used to specify the mesh file for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.SocketCommand4
Command to specify the socket to solver 4
Default value: "-socket %s"
Saved in: General.OptionsFileName

Solver.NameCommand4
Command to specify the problem name to solver 4
Default value: "%s"
Saved in: General.OptionsFileName

Solver.OptionCommand4
Command to get options from solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.FirstOption4
Label of first option for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.SecondOption4
Label of second option for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.ThirdOption4
Label of third option for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.FourthOption4
Label of fourth option for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthOption4
Label of fifth option for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.FirstButton4
Label of first button for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.FirstButtonCommand4
Command associated with the first button for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.SecondButton4
Label of second button for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.SecondButtonCommand4
Command associated with the second button for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.ThirdButton4
Label of third button for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.ThirdButtonCommand4
Command associated with the third button for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.FourthButton4
Label of fourth button for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.FourthButtonCommand4
Command associated with the fourth button for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthButton4
Label of fifth button for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.FifthButtonCommand4
Command associated with the fifth button for solver 4
Default value: ""
Saved in: General.OptionsFileName

Solver.MaximumDelay
Maximum delay allowed for solver response (in seconds)
Default value: 4
Saved in: General.OptionsFileName

Solver.Plugins
Enable default solver plugins?
Default value: 0
Saved in: General.OptionsFileName

Solver.ClientServer0
Connect solver 0 to the Gmsh server
Default value: 1
Saved in: General.OptionsFileName

Solver.MergeViews0
Automatically merge any post-processing view created by solver 0
Default value: 1
Saved in: General.OptionsFileName

Solver.PopupMessages0
Automatically display messages produced by solver 0
Default value: 1
Saved in: General.OptionsFileName

Solver.ClientServer1
Connect solver 1 to the Gmsh server
Default value: 0
Saved in: General.OptionsFileName

Solver.MergeViews1
Automatically merge any post-processing view created by solver 1
Default value: 1
Saved in: General.OptionsFileName

Solver.PopupMessages1
Automatically display messages produced by solver 1
Default value: 1
Saved in: General.OptionsFileName

Solver.ClientServer2
Connect solver 2 to the Gmsh server
Default value: 0
Saved in: General.OptionsFileName

Solver.MergeViews2
Automatically merge any post-processing view created by solver 2
Default value: 1
Saved in: General.OptionsFileName

Solver.PopupMessages2
Automatically display messages produced by solver 2
Default value: 1
Saved in: General.OptionsFileName

Solver.ClientServer3
Connect solver 3 to the Gmsh server
Default value: 0
Saved in: General.OptionsFileName

Solver.MergeViews3
Automatically merge any post-processing view created by solver 3
Default value: 1
Saved in: General.OptionsFileName

Solver.PopupMessages3
Automatically display messages produced by solver 3
Default value: 1
Saved in: General.OptionsFileName

Solver.ClientServer4
Connect solver 4 to the Gmsh server
Default value: 0
Saved in: General.OptionsFileName

Solver.MergeViews4
Automatically merge any post-processing view created by solver 4
Default value: 1
Saved in: General.OptionsFileName

Solver.PopupMessages4
Automatically display messages produced by solver 4
Default value: 1
Saved in: General.OptionsFileName


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

5.2 Solver example

Here is a small example of how to interface a C solver with Gmsh. The following listing reproduces the `utils/solvers/mysolver.c' file from the Gmsh source distribution.

/* $Id: mysolver.c,v 1.5 2004/05/22 01:24:19 geuzaine Exp $ */
/*
 * Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, and/or sell copies of the
 * Software, and to permit persons to whom the Software is furnished
 * to do so, provided that the above copyright notice(s) and this
 * permission notice appear in all copies of the Software and that
 * both the above copyright notice(s) and this permission notice
 * appear in supporting documentation.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE
 * COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR
 * ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY
 * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
 * OF THIS SOFTWARE.
 * 
 *  Please report all bugs and problems to <gmsh@geuz.org>.
 */

/* This file contains a dummy client solver for Gmsh. It does not
   solve anything, but shows how to program your own solver to interact
   with the Gmsh solver module.
   
   To compile this solver, type something like:

   gcc -o mysolver.exe mysolver.c GmshClient.c
   
   To run it, merge the contents of the file mysolver.opt into your
   default Gmsh option file, or lauch Gmsh with the command:
   
   gmsh -option mysolver.opt 

   You will then see a new button labeled "My C solver" in Gmsh's
   solver menu.
*/

/* We start by including some standard headers. Under Windows, you
   will need to install the cygwin tools (http://www.cygwin.com) to
   compile this example (as well as your own solver), since the Gmsh
   solver interface uses Unix sockets. */

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>

/* Now we include the Gmsh client interface definitions. At the time
   of this writing, the client interface contains only three
   functions: Gmsh_Connect, Gmsh_SendString and Gmsh_Disconnect. This
   example shows how to use these functions in order to program some
   simple interactions between a solver and Gmsh. */

#include "GmshClient.h"

/* The following typedef defines the two actions of our dummy solver:
   either output some valid option strings, or run a dummy computation
   and output a post-processing map. */

typedef enum { options, run } action;

/* Let's now define some fake CPU intensive functions: */

long worktime()
{
  struct timeval tp;
  gettimeofday(&tp, (struct timezone *)0);
  return (long)tp.tv_sec * 1000000 + (long)tp.tv_usec;
}

void work()
{
  long t1 = worktime();
  while(1) {
    if(worktime() - t1 > 1.e5)
      break;
  }
}

/* And here we go with the main routine of the solver: */

int main(int argc, char *argv[])
{
  action what = run;
  int i = 0, s;
  char *name = NULL, *option = NULL, *socket = NULL, tmp[256];
  FILE *file;

  /* 1. Loop through the command line arguments, remember the action
     the solver has to perform (what) and store the socket name, the
     option name and the problem name. */

  while(i < argc) {
    if(argv[i][0] == '-') {
      if(!strcmp(argv[i] + 1, "socket")) {
        i++;
        if(argv[i])
          socket = argv[i++];
      }
      else if(!strcmp(argv[i] + 1, "options")) {
        i++;
        what = options;
      }
      else if(!strcmp(argv[i] + 1, "run")) {
        i++;
        what = run;
        if(argv[i])
          option = argv[i++];
      }
    }
    else
      name = argv[i++];
  }

  /* 2. If the '-socket' option was not given, we cannot connect to
        Gmsh... */

  if(!socket) {
    printf("No socket specified: running non-interactively...\n");
    exit(1);
  }

  /* 3. Try to connect to the socket given by the '-socket' command
     line option: */

  s = Gmsh_Connect(socket);
  switch (s) {

    /* 3.1. If the socket is <0, issue an error... */

  case -1:
    printf("Couldn't create socket %s\n", socket);
    break;
  case -2:
    printf("Couldn't connect to socket %s\n", socket);
    break;
  default:

    /* 3.2. ...otherwise, send the GMSH_CLIENT_START command (together
       with the process ID of the solver), check if a problem name was
       specified, and decide what to do according to the 'what'
       variable: */

    sprintf(tmp, "%d", getpid());
    Gmsh_SendString(s, GMSH_CLIENT_START, tmp);
    if(!name) {
      Gmsh_SendString(s, GMSH_CLIENT_ERROR, "Missing file name");
      Gmsh_Disconnect(s);
      exit(1);
    }
    switch (what) {

      /* 3.2.1. If what==options, the solver sends the valid options
         (here for the first option): */

    case options:
      Gmsh_SendString(s, GMSH_CLIENT_OPTION_1, "Val1");
      Gmsh_SendString(s, GMSH_CLIENT_OPTION_1, "Val2");
      Gmsh_SendString(s, GMSH_CLIENT_OPTION_1, "Val3");
      break;

      /* 3.2.2. If what==run, the solver runs the chosen option,
         updates the progress message, issues some information data,
         produces a post-processing map and asks Gmsh to merge it: */

    case run:
      sprintf(tmp, "Running %s with option %s...", name, option);
      Gmsh_SendString(s, GMSH_CLIENT_INFO, tmp);
      for(i = 0; i < 10; i++) {
        sprintf(tmp, "%d %% complete", 10*i);
        Gmsh_SendString(s, GMSH_CLIENT_PROGRESS, tmp);
        work();
      }
      sprintf(tmp, "Done with %s!", name);
      Gmsh_SendString(s, GMSH_CLIENT_INFO, tmp);
      file = fopen("mysolver.pos", "wb");
      if(!file) {
        Gmsh_SendString(s, GMSH_CLIENT_ERROR, "Unable to open output file");
      }
      else {
        fprintf(file, "View \"%s\"{\n", option);
	fprintf(file, "ST(0,0,0,1,0,0,0,1,0){0,1,2};\n");
        fprintf(file, "};\n");
        fclose(file);
        Gmsh_SendString(s, GMSH_CLIENT_VIEW, "mysolver.pos");
      }
      break;
    }

    /* 3.3. We can now disconnect the solver from Gmsh: */

    Gmsh_SendString(s, GMSH_CLIENT_STOP, "Goodbye!");
    Gmsh_Disconnect(s);
    break;
  }

  /* 4. That's it! */

}

To define the above solver as the second external solver in Gmsh, you should define the following solver options (either merge them in your Gmsh option file, or use the -option command-line option--see 8.3 Command-line options):

// These options define 'mysolver.exe' as the second solver in Gmsh's
// solver module, under the name 'My C Solver'.
Solver.Name1 = "My C solver";
Solver.Help1 = "A simple example of the client/server 
solver implementation in Gmsh...";
Solver.Executable1 = "./mysolver.exe";
Solver.Extension1 = "";
Solver.MeshName1 = "";
Solver.MeshCommand1 = "";
Solver.SocketCommand1 = "-socket %s";
Solver.NameCommand1 = "%s";
Solver.OptionCommand1 = "-options";
Solver.FirstOption1 = "Option";
Solver.SecondOption1 = "";
Solver.ThirdOption1 = "";
Solver.FourthOption1 = "";
Solver.FifthOption1 = "";
Solver.FirstButton1 = "Run";
Solver.FirstButtonCommand1 = "-run %s";
Solver.SecondButton1 = "";
Solver.SecondButtonCommand1 = "";
Solver.ThirdButton1 = "";
Solver.ThirdButtonCommand1 = "";
Solver.FourthButton1 = "";
Solver.FourthButtonCommand1 = "";
Solver.FifthButton1 = "";
Solver.FifthButtonCommand1 = "";
Solver.ClientServer1 = 1;
Solver.MergeViews1 = 1;
Solver.PopupMessages1 = 1;


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

Back to geuz.org/gmsh