[Gmsh] Updating multiple runtime views

Nigel Nunn nnnunnn at gmail.com
Thu May 28 22:16:40 CEST 2015


Hi gmsh,

I need help plotting multiple timesteps for multiple views at runtime.

We use the gmsh Onelab gui to launch a team of mpi procs. During a
simulation proc[0] manages sendMergeFileRequest() to send solution data to
gmsh for plotting.

All works fine for a single view, e.g. a set of slice-planes. But at each
timestep, I'd like to update a second view - say the solution on boundary
faces.

We can do this manually by writing data for each view to files, then in
gmsh,

  1. Open+merge all the field timesteps
  2. Open+merge all the boundary timesteps

Question is: how to do this programatically at runtime?
I'm thinking we could do something like this:

Initally,

  - open View[0], load geometry and solution data for first field slice
  - open View[1], load geometry and solution data for first boundary plot

then for each timestep,

  - activate View[0], merge data for next field slice
  - activate View[1], merge data for next boundary plot

If this is possible, can someone please help with the syntax?
Here's the code we currently use for sending each timestep:

  FILE *fp1 = fopen("PlotView.pos", "w");

  fprintf(fp1, "View.Visible = 0; \n");
  fprintf(fp1, "Merge \"%s\";\n", slice_file.c_str());
  fprintf(fp1, "View.TimeStep++;\n");
  fprintf(fp1, "View.ShowTime = 1;\n");
  fprintf(fp1, "Combine Views;\n");
  fprintf(fp1, "View.Visible = 1;\n");
  fclose (fp1);

  m_OLClient->sendMergeFileRequest("PlotView.pos");

Thanks (hope this makes sense!)

Nigel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20150529/d23318b0/attachment.html>