[Gmsh] Writing node-data from ".geo" file

DILASSER Guillaume Guillaume.DILASSER at cea.fr
Tue Jun 20 09:04:44 CEST 2017

Hi Aditya,

The enclosed file shows how you can generate post-processing datasets directly from within Gmsh and save them into a .msh file. Basically, it uses the following steps :

·         Create a geometry and mesh it.

·         Generate a new post processing view on that geometry, containing the values to assign to each node. Here for the example I use the MathEval Plugin to compute the distance from each node to the origin. Here you will probably have to dig into Gmsh Plugins to find which are useful in your case.

·         Save the post-processing view within a mesh-oriented .pos file (renamed with a .msh extension).
You can run this example from the command line with gmsh example1.geo -2 (-0 should also work). In any case, it should output a NodeData.msh file that contains the meshed geometry along with a node-based post-processing view.

However, on a more fundamental level, if you aim is simply to “mark” specific nodes of the mesh for whatever reason, why not defining Physical Entities<http://gmsh.info/doc/texinfo/gmsh.html#Elementary-vs-physical-entities> instead of using a post-processing view ? That would be much easier…

Hoping this helps, let me know if your still have questions.

Sincerely Yours,

Guillaume DILASSER
Doctorant SACM / LEAS
CEA - Centre de Saclay - Bât.123 - PC 319c
91191 Gif sur Yvette Cedex - France -

guillaume.dilasser at cea.fr<mailto:guillaume.dilasser at cea.fr>

De : gmsh [mailto:gmsh-bounces at ace20.montefiore.ulg.ac.be] De la part de Aditya Kommajosula
Envoyé : lundi 19 juin 2017 23:08
À : gmsh at onelab.info
Objet : [Gmsh] Writing node-data from ".geo" file


I was wondering if it is possible to write node-data to a ".msh" file from within the ".geo" file. All the examples from the documentation seem to explain the format of a ".msh" file containing node-data, but I would like gmsh to write out node-data (if possible) to the ".msh" file it generates (I need this to place "markers" on specific boundary nodes)

Thank you!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20170620/f26408c0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example1.geo
Type: application/octet-stream
Size: 768 bytes
Desc: example1.geo
URL: <http://onelab.info/pipermail/gmsh/attachments/20170620/f26408c0/attachment.geo>

More information about the gmsh mailing list