manpagez: man pages & more
info gmsh
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 Interactive mode

To launch Gmsh in interactive mode, just double-click on the Gmsh icon, or type

> gmsh

at your shell prompt in a terminal. This will open the main Gmsh window, with a tree-like menu on the left, a graphic area on the right, and a status bar at the bottom. (You can detach the tree menu using ‘Window->Attach/Detach Menu’.)

To open the first tutorial file (see section Tutorial), select the ‘File->Open’ menu, and choose ‘t1.geo’. When using a terminal, you can specify the file name directly on the command line, i.e.:

> gmsh t1.geo

To perform the mesh generation, go to the mesh module (by selecting ‘Mesh’ in the tree) and choose the dimension (‘1D’ will mesh all the lines; ‘2D’ will mesh all the surfaces—as well as all the lines if ‘1D’ was not called before; ‘3D’ will mesh all the volumes—and all the surfaces if ‘2D’ was not called before). To save the resulting mesh in the current mesh format click on ‘Save’, or select the appropriate format and file name with the ‘File->Save As’ menu. The default mesh file name is based on the name of the current active model, with an appended extension depending on the mesh format(2).

To create a new geometry or to modify an existing geometry, select ’Geometry’ in the tree. For example, to create a spline, select ‘Elementary’, ‘Add’, ‘New’ and ‘Spline’. You will then be asked to select a list of points, and to type e to finish the selection (or q to abort it). Once the interactive command is completed, a text string is automatically added at the end of the current script file. You can edit the script file by hand at any time by pressing the ‘Edit’ button in the ‘Geometry’ menu and then reloading the model by pressing ‘Reload’. For example, it is often faster to define variables and points directly in the script file, and then use the GUI to define the lines, the surfaces and the volumes interactively.

Several files can be loaded simultaneously in Gmsh. When specified on the command line, the first one defines the active model and the others are ‘merged’ into this model. You can merge such files with the ‘File->Merge’ menu. For example, to merge the post-processing views contained in the files ‘view1.pos’ and ‘view5.msh’ together with the geometry of the first tutorial ‘t1.geo’, you can type the following command:

> gmsh t1.geo view1.pos view5.msh

In the Post-Processing module (select ‘Post-Processing’ in the tree), three items will appear, respectively labeled ‘A scalar map’, ‘Nodal scalar map’ and ‘Element 1 vector’. In this example the views contain several time steps: you can loop through them with the small “remote-control” icons in the status bar. A mouse click on the view name will toggle the visibility of the selected view, while a click on the arrow button on the right will provide access to the view’s options.

Note that all the options specified interactively can also be directly specified in the script files. You can save the current options of the current active model with the ‘File->Save Model Options’. This will create a new option file with the same filename as the active model, but with an extra ‘.opt’ extension added. The next time you open this model, the associated options will be automatically loaded, too. To save the current options as your default preferences for all future Gmsh sessions, use the ‘File->Save Options As Default’ menu instead. Finally, you can also save the current options in an arbitrary file by choosing the ‘Gmsh options’ format in ‘File->Save As’.

For more information about available options (and how to reset them to their default values), see Options. A full list of options with their current values is also available in the ‘Help->Current Options’ menu.


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

This document was generated on February 9, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.