[Gmsh] feature request: gmsh reads input from TCP port

Al Danial al.danial at gmail.com
Sat Aug 6 17:01:51 CEST 2005


The examples in utils/solvers/* show how one might tie an external
solver to gmsh.  From what I can tell, this scheme means gmsh and 
the external solver need to run on the same machine for the socket 
communication to work.

What would be really nice is the capability to run gmsh on another
computer on a network then send it commands over TCP.  You'd start
gmsh on Machine_A with something like

   gmsh -p 19000

which says "wait for commands on port 19000", then from another
computer, Machine_B, you'd connect to Machine_A's port 19000 and
send it strings like

  "lc = 0.009;"
  "Point(1) = {0, 0, 0, 9.e-1 * lc};"
  "Point(2) = {.1, 0,  0, lc} ;"
  "Point(3) = {.1, .3, 0, lc} ;"
  "Point(4) = {0,  .3, 0, lc} ;"
  "Line(1) = {1,2} ;"
  "Line(2) = {3,2} ;"
  "Line(3) = {3,4} ;"
  "Line(4) = {4,1} ;"

(lines from t1.geo for example).  In other words, rather than reading
input from a .geo file, in server mode gmsh would read input from a
port.  The two machines merely need to be on the same network; don't
need to share a file system (or operating system for that matter).

The primary benefit is that you could run gmsh on a computer that has
optimal graphics hardware--and tied to a massive screen in a conference
room perhaps--while running the solver on a cluster or some other
computer with beefy CPU's but little in the way of graphics.

I can provide demo client/server TCP code if there's a possibility
that this request might be implemented.        -- Al