How to use gmsh api from fortran : t1 example
Here is a t1 api example of gmsh prepared for fortran. Even Fortran is not too popular (14th place in July'21 TIOBE index) it is widely used for HPC applications. The t1 example is prepared as an exercise. Only limited number of interfaces for gmsh functions are included in header file for fortran gmsh.f. Tested for Win'10, Intel fortran, gmsh api 4.8.4. t1.f gmshf.h
ifort /heap-arrays /names:as_is t1.f gmsh.lib t1.exe Info : Meshing 1D... Info : [ 0%] Meshing curve 1 (Line) Info : [ 30%] Meshing curve 2 (Line) Info : [ 50%] Meshing curve 3 (Line) Info : [ 80%] Meshing curve 4 (Line) Info : Done meshing 1D (Wall 0s, CPU 0s) Info : Meshing 2D... Info : Meshing surface 1 (Plane, Frontal-Delaunay) Info : Done meshing 2D (Wall 0s, CPU 0s) Info : 4 nodes 10 elements Info : Writing 't1.msh'... Info : Done writing 't1.msh' t1.msh