# Gmsh .geo file inspection

**URL:** <https://prepomax.discourse.group/t/gmsh-geo-file-inspection/1993>\
**Category:** General Questions\
**Created:** [September 10, 2024, 9:05am UTC](https://prepomax.discourse.group/t/gmsh-geo-file-inspection/1993 "2024-09-10T09:05:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ANYS](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/anys/32/7737_2.png) [@ANYS](https://prepomax.discourse.group/u/ANYS)\
**Post date:** [September 10, 2024, 9:05am UTC](https://prepomax.discourse.group/t/gmsh-geo-file-inspection/1993/1 "2024-09-10T09:05:53Z")

</div>

Hi,

Is there a chance to find or see the .geo file sent to gmsh for the meshing process?  
Or maybe kind of save as .geo for the actual meshing set up?

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [September 11, 2024, 6:21pm UTC](https://prepomax.discourse.group/t/gmsh-geo-file-inspection/1993/2 "2024-09-11T18:21:07Z")

</div>

No. There is no .geo file. PrePoMax can communicate with Gmsh directly through API wrapper. But the problem with this method is that any exception in Gmsh that terminates it, terminates PrePoMax. So PrePoMax communicates with the wrapper using files. But these files are not .geo instructions, only data that needs to be exchanged.

---

<div class="post-metadata">

**Author:** ![synt](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/synt/32/4658_2.png) [@synt](https://prepomax.discourse.group/u/synt)\
**Post date:** [September 12, 2024, 5:52am UTC](https://prepomax.discourse.group/t/gmsh-geo-file-inspection/1993/3 "2024-09-12T05:52:08Z")

</div>

i miss some setting also, a hex-dominant setup in PrePoMax but i’m not sure if it can be accused trough API library. Setup for 2D meshing algorithm (R Tree) and recombine (3D all).

 ![2024-09-12 12_33_11-Edit Mesh Setup Item_ Tetrahedral_Gmsh-1](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/d/d43c96cf79bf220499a69d796a0abec719dca692.png)

an example below shown almost done, only missing at recombination. 2D meshing algorithm can be replaced by Delaunay for quads.

 ![2024-09-12 12_31_47-](https://global.discourse-cdn.com/free1/uploads/prepomax/original/2X/9/980b7e83776c02d5c6f45596ea825196b3c4ace5.png)

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [September 12, 2024, 8:21am UTC](https://prepomax.discourse.group/t/gmsh-geo-file-inspection/1993/4 "2024-09-12T08:21:22Z")

</div>

The online documentation [Gmsh 4.13.1](https://gmsh.info/doc/texinfo/gmsh.html) states:

```auto
`Mesh.Algorithm`
2D mesh algorithm (1: MeshAdapt, 2: Automatic, 3: Initial mesh only, 5: Delaunay, 6: Frontal-Delaunay, 7: BAMG, 8: Frontal-Delaunay for Quads, 9: Packing of Parallelograms, 11: Quasi-structured Quad)
Default value: `6`
Saved in: `General.OptionsFileName`

`Mesh.Algorithm3D`
3D mesh algorithm (1: Delaunay, 3: Initial mesh only, 4: Frontal, 7: MMG3D, 9: R-tree, 10: HXT)
Default value: `1`
Saved in: `General.OptionsFileName`

Mesh.RecombinationAlgorithm
Mesh recombination algorithm (0: simple, 1: blossom, 2: simple full-quad, 3: blossom full-quad)
Default value: 1
Saved in: General.OptionsFileName

```

I am only using the algorithms in the documentation.

---

<div class="post-metadata">

**Author:** ![synt](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/synt/32/4658_2.png) [@synt](https://prepomax.discourse.group/u/synt)\
**Post date:** [September 12, 2024, 9:07am UTC](https://prepomax.discourse.group/t/gmsh-geo-file-inspection/1993/5 "2024-09-12T09:07:38Z")

</div>

thanks for hint. 2D meshing algorithm is already there, both Delaunay for quads (8) and R Tree/Packing of parallelogram (9). Only another recombine setting is not yet available, hopefully it will be possible by API and GUI in PrePoMax. Default value is ‘0’ thus make it inactive, required to activate by setting the value to be ‘1’ in generating hex-dominant mesh.

```auto
`Mesh.Recombine3DAll`

Apply recombination3D algorithm to all volumes, ignoring per-volume spec (experimental)
Default value: `0`
Saved in: `General.OptionsFileName`

```

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [September 12, 2024, 9:44am UTC](https://prepomax.discourse.group/t/gmsh-geo-file-inspection/1993/6 "2024-09-12T09:44:32Z")

</div>

> [@synt](#):
>
> tting the value to be ‘1’ in generating hex-dominant

I am not sure this will work, but can I try to add this option as another 3D algorithm?

---

<div class="post-metadata">

**Author:** ![ANYS](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/anys/32/7737_2.png) [@ANYS](https://prepomax.discourse.group/u/ANYS)\
**Post date:** [September 12, 2024, 10:25am UTC](https://prepomax.discourse.group/t/gmsh-geo-file-inspection/1993/7 "2024-09-12T10:25:21Z")

</div>

There is another option regarding the meshing speed wich I’m not sure which one is using now.  
Default value: 1 so it seems it would only be using 1 thread no matter the system default or value defined at variable OMP NUM THREADS

```auto

```

General.NumThreads  
Maximum number of threads used by Gmsh when compiled with OpenMP support  
(0: use system default, i.e. OMP NUM THREADS)  
Default value: 1  
Saved in: General.OptionsFileName

```auto

```

---

<div class="post-metadata">

**Author:** ![synt](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/synt/32/4658_2.png) [@synt](https://prepomax.discourse.group/u/synt)\
**Post date:** [September 12, 2024, 11:19am UTC](https://prepomax.discourse.group/t/gmsh-geo-file-inspection/1993/8 "2024-09-12T11:19:44Z")

</div>

these setting work with geo files, probably in API whenever defined also.

another setting to generates hex-dominant mesh may be required instead of default values.

```auto

`Mesh.Smoothing`

Number of smoothing steps applied to the final mesh
Default value: `1`
Saved in: `General.OptionsFileName`

```

---

<div class="post-metadata">

**Author:** ![Matej](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@Matej](https://prepomax.discourse.group/u/Matej)\
**Post date:** [September 13, 2024, 5:43am UTC](https://prepomax.discourse.group/t/gmsh-geo-file-inspection/1993/9 "2024-09-13T05:43:52Z")

</div>

Does mesh smooting help for all meshes? 2D, 3D and all element types?

---

<div class="post-metadata">

**Author:** ![synt](https://yyz2.discourse-cdn.com/free1/user_avatar/prepomax.discourse.group/synt/32/4658_2.png) [@synt](https://prepomax.discourse.group/u/synt)\
**Post date:** [September 13, 2024, 7:46am UTC](https://prepomax.discourse.group/t/gmsh-geo-file-inspection/1993/10 "2024-09-13T07:46:12Z")

</div>

it seems to be work on 2D and 3D mesh of all element types, user can set any value to get desired final results. However, a hex-dominant usually set these value to zero for disabling.
