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

8.1 Interactive mode

Gmsh's first operating mode is the `interactive graphical mode'. To launch Gmsh in interactive mode, just click or double-click on the Gmsh icon (Windows and Mac), or type

 
> gmsh

at your shell prompt in a terminal (Unix). This will open two windows: the graphic window (with a status bar at the bottom) and the menu window (with a menu bar and some context-dependent buttons).

To open the first tutorial file (see section Tutorial), select the `File->Open' menu, and choose ‘t1.geo’ in the input field. When using a terminal, you can also 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 module menu) and choose the required dimension in the context-dependent buttons (`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, choose `Save' in the context-dependent buttons, or select the appropriate format with the `File->Save As' menu. The default mesh file name is based on the name of the first input file on the command line (or ‘untitled’ if there wasn't any input file given), with an appended extension depending on the mesh format(7).

To create a new geometry or to modify an existing geometry, select 'Geometry' in the module menu, and follow the context-dependent buttons. 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 project file. You can edit this project file by hand at any time by pressing the `Edit' button in the `Geometry' menu and then reloading the project by pressing `Reload'. For example, it is often faster to define variables and points directly in the project file, and then use the graphical user interface to define the lines, the surfaces and the volumes interactively.

Several files can be loaded simultaneously in Gmsh. The first one defines the project, while the others are appended (`merged') to this project. You can merge such files with the `File->Merge' menu, or by directly specifying the names of the files on the command line. For example, to merge the post-processing views contained in the files ‘view1.pos’ and ‘view2.pos’ together with the geometry of the first tutorial ‘t1.geo’, you can type the following command:

 
> gmsh t1.geo view1.pos view2.pos

In the Post-Processing module (select `Post-Processing' in the module menu), two view buttons will appear, respectively labeled `a scalar map' and `a vector map'. A mouse click on the 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. If you want the modifications made to one view to affect also all the other views, select the `Apply next changes to all views' or `Force same options for all views' option in the `Tools->Options->Post-processing' menu.

Note that all the options specified interactively can also be directly specified in the ASCII input files. All available options, with their current values, can be saved into a file by selecting `File->Save As->Gmsh options', or simply viewed by pressing the `?' button in the status bar. To save the current options as your default preferences for all future Gmsh sessions, use the `Tools->Options->Save as defaults' button.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.