Gmsh

From ScientificComputing
Revision as of 11:50, 27 January 2017 by Sfux (talk | contribs) (Created page with "{{Application}}")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Category

Meshing, Grid generator

Description

Gmsh is a free 3D finite element grid generator with a build-in CAD engine and post-processor. Its design goal is to provide a fast, light and user-friendly meshing tool with parametric input and advanced visualization capabilities. Gmsh is built around four modules: geometry, mesh, solver and post-processing. The specification of any input to these modules is done either interactively using the graphical user interface or in ASCII text files using Gmsh's own scripting language.

Available versions (Euler, old software stack)

Legacy versions Supported versions New versions
2.12

Please note that this page refers to installations from the old software stack. There are two software stacks on Euler. Newer versions of software are found in the new software stack.

Environment modules (Euler, old software stack)

Version Module load command Additional modules loaded automatically
2.12 module load gcc/4.8.2 python/2.7.6 gmsh/2.12 openblas/0.2.13_seq

Please note that this page refers to installations from the old software stack. There are two software stacks on Euler. Newer versions of software are found in the new software stack.

How to submit a job

You can submit a gmsh job in batch mode with the following command:
sbatch [Slurm options] --wrap="gmsh [gmsh options]"
Here you need to replace [gmsh options] with gmsh command line options (please run gmsh -h for getting a list of all command line options) and [Slurm options] with Slurm parameters for the resource requirements of the job. Please find a documentation about the parameters of sbatch on the wiki page about the batch system.

Example

LSF examples are obsolete. They will soon be replaced with Slurm examples.
As an example for using gmsh, we are going to create a simple two-dimensional mesh.
[leonhard@euler09 ~]$ cat t1.geo
lc = 1e-2;
Point(1) = {0, 0, 0, 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} ;
Line Loop(1) = {4,1,-2,3} ;
Plane Surface(1) = {1} ;
Physical Point(1) = {1,2} ;
MY_LINE = 2;
Physical Line(MY_LINE) = {1,2} ;
Physical Line("My second line (automatic physical id)") = {3} ;
Physical Line("My third line (physical id 5)", 5) = {4} ;
Physical Surface("My surface") = {1} ;
[leonhard@euler09 ~]$ module load gcc/4.8.2 python/2.7.6 gmsh/2.12
Autoloading openblas/0.2.13_seq
[leonhard@euler09 ~]$ bsub -n 1 -W 0:10 -R "rusage[mem=100]" "gmsh t1.geo -2"
Generic job.
Job <36396680> is submitted to queue <normal.4h>.
[leonhard@euler09 ~]$ bjobs
JOBID      USER       STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME
36396680   leonhard   PEND  normal.4h  euler09
[leonhard@euler09 ~]$ bjobs
JOBID      USER       STAT  QUEUE      FROM_HOST   EXEC_HOST   JOB_NAME   SUBMIT_TIME
36396680   leonhard   RUN   normal.4h  euler09     e1047       *gmesh.pos Jan 27 15:33
[leonhard@euler09 ~]$ bjobs
No unfinished job found
[leonhard@euler09 ~]$ grep Done lsf.o36396680 
Info    : Done reading 't1.geo'
Info    : Done meshing 1D (0.001 s)
Info    : Done meshing 2D (0.0190279 s)
Info    : Done writing 't1.msh'
[leonhard@euler09 ~]$
The resource usage summary for the job can be found in the LSF log file.

License information

GPLv2 or later

Links

http://gmsh.info

https://en.wikipedia.org/wiki/Gmsh
https://people.sc.fsu.edu/~jburkardt/examples/gmsh/gmsh.html