gmsh issueshttps://gitlab.onelab.info/gmsh/gmsh/-/issues2022-04-01T07:19:55Zhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/22Improve 1D transfinite algorithm2022-04-01T07:19:55ZChristophe GeuzaineImprove 1D transfinite algorithm** Add linear lc progression in 1D transfinite generator
* Implement easier to understand "bump" function (double progression?)** Add linear lc progression in 1D transfinite generator
* Implement easier to understand "bump" function (double progression?)https://gitlab.onelab.info/gmsh/gmsh/-/issues/24Improvements to extrusion algorithms2023-10-09T19:19:02ZChristophe GeuzaineImprovements to extrusion algorithmsThis issue tracks some ideas about generalizations of the extrusion algorithms:
* It would be nice to be able to create extruded meshes for OCC pipes
* not clear how to do this in all cases (cf. all the possible `trihedron` values: ...This issue tracks some ideas about generalizations of the extrusion algorithms:
* It would be nice to be able to create extruded meshes for OCC pipes
* not clear how to do this in all cases (cf. all the possible `trihedron` values: "DiscreteTrihedron", "CorrectedFrenet", "Fixed", ...); maybe just for the simplest case where we would evaluate the "guiding" curve?
* It would be nice to be able to provide a scaling function - see e.g. #1991
* It could be useful to introduce Right/Left/Alternate for extruded meshes, as for transfinite meshes
* We could fill transfinite_vertices in meshG{Face,Region}Extrude when it makes sense (so that we can use extruded+recombined surfaces to create Transfinite Volumes, or use the P3D or structured CGNS output format)
* It could be useful to define some templates to extrude + refine in order to generate "structured refinements"
* in 2D: from 1 curve to 3, or from 1 curve to 2 (left and right)
* in 3D: the usual patterns...https://gitlab.onelab.info/gmsh/gmsh/-/issues/29Mesh/view capping2023-07-27T12:31:09ZChristophe GeuzaineMesh/view cappingAdd new visu option to cap the mesh instead of displaying "whole"
elementsAdd new visu option to cap the mesh instead of displaying "whole"
elementshttps://gitlab.onelab.info/gmsh/gmsh/-/issues/33Problem with datasets with bounding box < 1e-6 on Mac OS X2023-07-27T12:34:34ZChristophe GeuzaineProblem with datasets with bounding box < 1e-6 on Mac OS XOn Mac OS X, datasets with a bounding box < 1.e-06 don't display
properly (probably because all the OpenGL stuff is done internally in
single precision...). Should we rescale?On Mac OS X, datasets with a bounding box < 1.e-06 don't display
properly (probably because all the OpenGL stuff is done internally in
single precision...). Should we rescale?https://gitlab.onelab.info/gmsh/gmsh/-/issues/63add ability to pick/select mesh vertices in GUI2023-07-27T12:34:49ZChristophe Geuzaineadd ability to pick/select mesh vertices in GUIWe should draw mesh vertices using vertex arrays and add the ability to select them.
This requires some changes
* in the VertexArray class to store vertex pointers if necessary
* in drawMesh to not use immediate drawing mode for ve...We should draw mesh vertices using vertex arrays and add the ability to select them.
This requires some changes
* in the VertexArray class to store vertex pointers if necessary
* in drawMesh to not use immediate drawing mode for verticeshttps://gitlab.onelab.info/gmsh/gmsh/-/issues/75Tensorial fields visualization enhancements2018-08-21T10:17:59ZChristophe GeuzaineTensorial fields visualization enhancementsMay I suggest two enhancements for better tensorial fields visualization:
- In Node data or Elmt data section of .msh2 file format, the second int tag corresponds to the number of values defined by node/element. For the visualization, ...May I suggest two enhancements for better tensorial fields visualization:
- In Node data or Elmt data section of .msh2 file format, the second int tag corresponds to the number of values defined by node/element. For the visualization, it automatically recognizes the values 1 (scalar), 3 (norm of vector) and 9 (von Mises equivalent value). It would be useful to recognize 6 as well to reduce amount of data in result file (symmetric tensor as for strain/stress under SPH).
For this, a convention has to be adopted for:
- The way values are listed (v0-v4-v8-v1-v5-v2 or v0-v4-v8-v5-v2-v1 or v0-v1-v2-v4-v5-v8)
- Multiplicative factor for shear values - classically, a '2' is used for strain, and '1' for stress; other approach is to use sqrt(2) for all fields; maybe for coherence with the other fields type in gmsh, better to always keep '1'.
- In the 'Extract' plugin, if dealing with a tensorial field and von-Mises stress is illustrated, it would be logical to have the corresponding von Mises formula instead of sqrt(v0*v0 + v1*v1 + v2*v2), which is valid for vectors.https://gitlab.onelab.info/gmsh/gmsh/-/issues/78deal with relative paths with -watch option2017-08-05T11:31:52ZChristophe Geuzainedeal with relative paths with -watch option-watch works well with absolute paths -- check what's going on with reltive paths-watch works well with absolute paths -- check what's going on with reltive pathshttps://gitlab.onelab.info/gmsh/gmsh/-/issues/125Transfinite Volume does not accept a surface which has not been explicitly 'T...2017-08-06T06:54:09ZChristophe GeuzaineTransfinite Volume does not accept a surface which has not been explicitly 'Transfinite(d)'Transfinite Volume doesn't accept a surface which has not been explicitly 'Transfinite(d)' : for example it does not accept surface whose mesh was obtained using Periodic Surface with a master Surface 'transfinited' (and recombined).
The...Transfinite Volume doesn't accept a surface which has not been explicitly 'Transfinite(d)' : for example it does not accept surface whose mesh was obtained using Periodic Surface with a master Surface 'transfinited' (and recombined).
The same problem occurs if we try to transfinite a volume containing a new "top" surface num[0] obtained by extruding a 'transfinited' surface (or all other surfaces that are created during the extrusion)
[test_periodic_surface.geo](/uploads/194f0c158b86634e4416e94ab7ad1ebc/test_periodic_surface.geo)https://gitlab.onelab.info/gmsh/gmsh/-/issues/136enhance Plugin(MathEval)2018-08-25T06:48:43ZChristophe Geuzaineenhance Plugin(MathEval)It would be nice to enhance MathEval to handle:
- vector operations (dotProd, crossProd, grad, div, curl)
- operations on complex numbers
- any number of views (and not only current+other)It would be nice to enhance MathEval to handle:
- vector operations (dotProd, crossProd, grad, div, curl)
- operations on complex numbers
- any number of views (and not only current+other)https://gitlab.onelab.info/gmsh/gmsh/-/issues/175"Adapt Visualization Grid" hides complete result of med library result2017-08-06T06:59:52ZChristophe Geuzaine"Adapt Visualization Grid" hides complete result of med library resultI’m loading a file in gmsh which was created by code_aster (a “med” format). It is easy to visualize the results on second order displacements:
1. Switching on “Adapt visualization grid”
2. Maximum recursion level = “1”
3. Target visual...I’m loading a file in gmsh which was created by code_aster (a “med” format). It is easy to visualize the results on second order displacements:
1. Switching on “Adapt visualization grid”
2. Maximum recursion level = “1”
3. Target visualization error = “-0.0001”
The gmsh debug info about this field is
```
Info : Reading 2-component field <<&RESUR1_DEPL>>
Debug : MED: eletyp=0 entity=3 (0:cell, 3:node, 4:elenode) ngauss=1 localizationName= profileName= -- stepDataType=1
```
However, when visualizing another field (here a nodal stress field"), pressing the "Adapt visualization grid" button will hide the entire result!. I found no options for "recursion level" or "target visualization error" which allows me to restore the result.
For example a result from a plain strain analysis:
```
Info : Reading 4-component field <<&RESUR1_SIGM_NOEU>>
Debug : MED: eletyp=0 entity=3 (0:cell, 3:node, 4:elenode) ngauss=1 localizationName= profileName= -- stepDataType=1
```
I'm attaching the file which contains both fields in order to let you reproduce this. The best way to see it is when using "Numerical Values" as "Intervals Type" and switching on the nodes "Mesh.Nodes=1".
-SebastianChristophe GeuzaineChristophe Geuzainehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/181'Data source' in post-processing doesn't respect 'Visibility -> Force Component'2017-08-06T06:55:50ZChristophe Geuzaine'Data source' in post-processing doesn't respect 'Visibility -> Force Component'I noticed that setting the option
```
Post processing options -> Aspect -> Data Source
```
to a different view only uses the default `Visibility`. E.g. for a six component field (a stress tensor), the _Von Mises_ scalar is used as c...I noticed that setting the option
```
Post processing options -> Aspect -> Data Source
```
to a different view only uses the default `Visibility`. E.g. for a six component field (a stress tensor), the _Von Mises_ scalar is used as colour.
This is a often utilized as a way of showing stresses on a deformed structure.
When looking at the undeformed stress field view, the tab
```
Post processing options -> Visibility -> Force Scalar
```
allows one to select components of the tensor (e.g. only normal stress sigma_x). The deformed view doesn't allow this selection, as far as I can tell.
It would be best if the visibility settings of the tensor field are respected also in the 'deformed view'. Furthermore, the settings in `View[i].CustomMax` and `View[i].CustomMin` should be respected.
Steps to reproduce:
As an example, I'm attaching two files. One holds the deformation information and the other one the stress tensor
1.
```
gmsh smarter-cuboid-micro-stress.rmed smarter-cuboid-micro.rmed
```
2. Set `View[0] -> Visibility -> Force Scalar` and `View[0] - > General -> Range mode` to _Custom_. Hit the `Min`, `Max` button.
3. remember how the picture changed from Von Mises to sigma_x
4. turn off the visibility of `View[0]`
5. Set `View[1] -> Aspect -> Data Source` to `View[0]` (the Von Mises data of `View[0]` is shown).
Changes in `View[0] -> Visibility -> Force Component` and changes in `View[0].CustomMin/Max` are not affecting the current `View[1]`.
I _think_ this would be the expected behaviour. Thanks for your attention.
[smarter-cuboid-micro-stress.rmed](/uploads/64f6dd197fd400e4c40a0174bf0cbaef/smarter-cuboid-micro-stress.rmed)
[smarter-cuboid-micro.rmed](/uploads/da788ca02c496aca741b5a9b0086aa8b/smarter-cuboid-micro.rmed)
https://gitlab.onelab.info/gmsh/gmsh/-/issues/213Add support for PERMAS mesh files2017-08-06T07:10:27ZChristophe GeuzaineAdd support for PERMAS mesh filesAny patch would be welcome. Check out one of the Geo/GModelIO_*.cpp files: integrating a new mesh format is quite easy.Any patch would be welcome. Check out one of the Geo/GModelIO_*.cpp files: integrating a new mesh format is quite easy.https://gitlab.onelab.info/gmsh/gmsh/-/issues/226missing leading zeros with command Printf/Sprintf for gmsh-2.8.3-Windows642023-07-30T20:47:31ZChristophe Geuzainemissing leading zeros with command Printf/Sprintf for gmsh-2.8.3-Windows64The following commands were written in a geo script:
n=100;
Printf("n=%04g",n);
The script was tested with gmsh-2.8.3 under windows (using gmsh-2.8.3-Windows64.zip) and linux (using gmsh-2.8.3-source.tgz + own build)
Executing the s...The following commands were written in a geo script:
n=100;
Printf("n=%04g",n);
The script was tested with gmsh-2.8.3 under windows (using gmsh-2.8.3-Windows64.zip) and linux (using gmsh-2.8.3-source.tgz + own build)
Executing the script on linux lead to the expected result: n=0100
Executing the script on windows leads to n=100 instead of n=0100.
Similar behavior is observed with Sprintf command.Christophe GeuzaineChristophe Geuzainehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/232Extrusion with scaling2017-08-06T07:00:42ZChristophe GeuzaineExtrusion with scalingThe possibility to extrude mesh with simultaneous scaling, for example to create mesh in truncated cone would be very helpful.The possibility to extrude mesh with simultaneous scaling, for example to create mesh in truncated cone would be very helpful.https://gitlab.onelab.info/gmsh/gmsh/-/issues/242Suggest Copy Transfinite Properties for Periodic Slave Faces in Volumes2017-08-05T11:43:00ZChristophe GeuzaineSuggest Copy Transfinite Properties for Periodic Slave Faces in VolumesPresently when using periodic master/slave faces the master
face meshing successfully copies to the slave face for 1D and 2D
including transfinite and 'recombined' properties (i.e. generating
quadrilaterals).
However to transfinite me...Presently when using periodic master/slave faces the master
face meshing successfully copies to the slave face for 1D and 2D
including transfinite and 'recombined' properties (i.e. generating
quadrilaterals).
However to transfinite mesh a *volume(, the slave faces must be
separately re-declared as transfinite, otherwise
MeshTransfiniteVolume(GRegion*) does not recognise them as such
(face.index() remains uninitialised as -1) and rejects the volume
(it does not recognise the faces as 'all transfinite').https://gitlab.onelab.info/gmsh/gmsh/-/issues/245Ellipse arc is wrong when symmetric start-end points are provided2017-08-05T11:42:17ZChristophe GeuzaineEllipse arc is wrong when symmetric start-end points are providedConsider this example:
```
R1 = 1.0;
R2 = 2.0;
Point(1) = { 0.0, 0.0, 0.0 };
Point(2) = { R1 * Cos(0), R2 * Sin(0), 0.0 };
Point(3) = { R1 * Cos(Pi/2), R2 * Sin(Pi/2), 0.0 };
Point(4) = { R1 * Cos(Pi), R2 * Sin(Pi), 0.0 };
Point(6) = ...Consider this example:
```
R1 = 1.0;
R2 = 2.0;
Point(1) = { 0.0, 0.0, 0.0 };
Point(2) = { R1 * Cos(0), R2 * Sin(0), 0.0 };
Point(3) = { R1 * Cos(Pi/2), R2 * Sin(Pi/2), 0.0 };
Point(4) = { R1 * Cos(Pi), R2 * Sin(Pi), 0.0 };
Point(6) = { R1 * Cos(Pi/6), R2 * Sin(Pi/6), 0.0 };
Point(7) = { R1 * Cos(5*Pi/6), R2 * Sin(5*Pi/6), 0.0 };
Ellipse(1) = { 2, 1, 3, 7 }; // Ok
Ellipse(2) = { 6, 1, 3, 7 }; // Wrong
```
Ellipse 2 is wrong. It is worth noticing that a Circle arc under the same conditions works fine:
```
R = 1.0;
Point(1) = { 0.0, 0.0, 0.0 };
Point(2) = { R * Cos(Pi/6), R * Sin(Pi/6), 0.0 };
Point(3) = { R * Cos(5*Pi/6), R * Sin(5*Pi/6), 0.0 };
Circle(1) = { 2, 1, 3 };
```
A workaround is to draw the ellipse in two pieces:
```
Ellipse(4) = { 6, 1, 3, 3 };
Ellipse(5) = { 3, 1, 3, 7 };
```https://gitlab.onelab.info/gmsh/gmsh/-/issues/313"ellipse is wrong" still plagues - diagnostic and workaround2018-08-21T08:01:08ZLuís Henrique Camargo Quiroz"ellipse is wrong" still plagues - diagnostic and workaroundI noticed a problem while creating some ellipse segments within a script.
Attached is a small geo file which shows the problem, and also with a solution for my particular case, at least. As I know the radiuses of the ellipse, I could ...I noticed a problem while creating some ellipse segments within a script.
Attached is a small geo file which shows the problem, and also with a solution for my particular case, at least. As I know the radiuses of the ellipse, I could find a workaround; my ellipse is aligned with X and Y.
This is the same problem shown in http://onelab.info/pipermail/gmsh/2012/007549.html and http://onelab.info/pipermail/gmsh/2011/006322.html years ago.
Rotating the start, major axis and end points with the GUI and creating the ellipses again shows the same problem. In other words, when start and end points are simmetrical, regarding any of the axes, major or minor, the strange behavior will appear.
Here's the geometry file: [gmsh_bugs.geo](/uploads/d5f5f64eda5cd8bddec725501910ac2c/gmsh_bugs.geo)
This is how the two wrong ellipses show up:
![Gmsh_with_2_buggy_ellipses](/uploads/b2314644673b02a061b55cf0a5958bed/Gmsh_with_2_buggy_ellipses.png)
This is the desired result, here obtained subdividing the arcs, as the error message tells. In my case I know what the new points should be ;)
![Gmsh_with_buggy_ellipses_replaced](/uploads/65181f85e2a3629affa2df0410711bdd/Gmsh_with_buggy_ellipses_replaced.png)https://gitlab.onelab.info/gmsh/gmsh/-/issues/326closures not implemented for pyramids and prisms of order > 22018-07-29T11:19:22ZKoen Hillewaertclosures not implemented for pyramids and prisms of order > 2I see that the face closures are used essentially for optimizing high order meshes. Would it be possible to complete the missing functionality for the pyramid and prism up to order 4 ?I see that the face closures are used essentially for optimizing high order meshes. Would it be possible to complete the missing functionality for the pyramid and prism up to order 4 ?https://gitlab.onelab.info/gmsh/gmsh/-/issues/338Physical Groups and Periodic Implementations not Persistent2023-07-31T11:24:16ZElizabethPhysical Groups and Periodic Implementations not PersistentWhen a physical group or a periodic element is defined, an OpenCASCADE operation will remove them.
A physical line that is intersected with a boolean operation will disappear.
In the case of a cube with a periodic surface, this means...When a physical group or a periodic element is defined, an OpenCASCADE operation will remove them.
A physical line that is intersected with a boolean operation will disappear.
In the case of a cube with a periodic surface, this means that it is not possible to enforce periodicity in the mesh. In the tested scenario, the periodic cube has a single sphere intersecting the surface, therefore, it is replicated on both sides of the cube. Even if the user uses the GUI to find the new surface ID's and manually re-implements a periodic surface for the sliced surfaces, the mesh is not periodic.https://gitlab.onelab.info/gmsh/gmsh/-/issues/363Element data format can only hold displacement and not rotation2018-02-06T05:20:46ZSaeid M.Element data format can only hold displacement and not rotationDear GMSH development team,
GMSH can be very useful in post-processing DEM (Discrete Elements Method) data; where there are almost no alternative software and GMSH has the potential to fill this gap and become a popular software among r...Dear GMSH development team,
GMSH can be very useful in post-processing DEM (Discrete Elements Method) data; where there are almost no alternative software and GMSH has the potential to fill this gap and become a popular software among researchers in this field by what seems like a minor improvement.
While GMSH can save displacement data of elements and visualize them, currently there is no option to save element rotations in element data field.
Best regards,
Mehrpayhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/404When loading options from a .opt file, fails to load physical groups from .ms...2023-07-05T09:27:32ZMax OrokWhen loading options from a .opt file, fails to load physical groups from .msh file.Case 1:
Generated a .msh using the gmsh API, assigning physical groups as well as writing a .opt file. Loading the .msh file results in no physical groups being loaded from the .msh file. Exiting gmsh, deleting the .opt file, and re-ope...Case 1:
Generated a .msh using the gmsh API, assigning physical groups as well as writing a .opt file. Loading the .msh file results in no physical groups being loaded from the .msh file. Exiting gmsh, deleting the .opt file, and re-opening the .msh results in physical groups being properly loaded into gmsh, but obviously the options are not loaded.
Case 2:
Generated a .msh using the gmsh API, assigning physical groups, not writing any .opt file. Opening the .msh file in gmsh results in physical groups being loaded correctly. Opened the options menu and set all options to their desired value, and then saved those options to a .opt file from the gmsh GUI. Closing gmsh re-opening the .msh file results in all the options being loaded, but no physical groups are loaded from the .msh file. Exiting gmsh, deleting the .opt file, and re-opening the .msh results in physical groups being properly loaded into gmsh, but obviously the options are not loaded.
Case 3:
Generated a .msh using the gmsh API, assigning physical groups, not writing any .opt file. Setting options using the gmsh API, and then opening the gmsh GUI through an API call during the program. Both physical groups and options are correctly loaded, but because they are only set during runtime they do not persist beyond that run.
Here are some example files that show this behaviour:
[output.msh.opt](/uploads/231511a7189a4f1291f27861be37f923/output.msh.opt)
[output.msh](/uploads/c962aef6b78530e32982a4eedf431454/output.msh)
Thank you!https://gitlab.onelab.info/gmsh/gmsh/-/issues/413Algorithm options should be strings2018-06-27T20:01:17Zjeremy thelerAlgorithm options should be stringsJust a reminder for Gmsh 5.0: the choice of algorithms (and problably other options) should be made through strings and not through numbers. This way
1. internal changes will not break old .geo files, and
2. the code will be more compac...Just a reminder for Gmsh 5.0: the choice of algorithms (and problably other options) should be made through strings and not through numbers. This way
1. internal changes will not break old .geo files, and
2. the code will be more compact: http://www.catb.org/esr/writings/taoup/html/ch04s02.html#compactnesshttps://gitlab.onelab.info/gmsh/gmsh/-/issues/444MSH 4.x format revisions2023-03-03T10:56:41ZChristophe GeuzaineMSH 4.x format revisionsIdeas for future revisions of the MSH4 format:
MSH 4.1:
- ~~ability to use 64 bit node and element tags (see #395)~~ (done in MSH4.1)
- changes based on user feedback:
- ~~add min/max vertex/element tags in the section header (this ...Ideas for future revisions of the MSH4 format:
MSH 4.1:
- ~~ability to use 64 bit node and element tags (see #395)~~ (done in MSH4.1)
- changes based on user feedback:
- ~~add min/max vertex/element tags in the section header (this would allow to decide *beforehand* if a sparse (and slow) storage is necessary)~~ (done in MSH4.1)
- ~~switch `dim` and `tag` in Nodes/Element section to match the api and the Periodic section~~ (done in MSH4.1)
- ~~store onyly x, y, z for `$Entities` of dimension 0 (points), instead of xmin, xmax, ymin, ymax, zmin, zmax~~ (done in MSH4.1)
MSH 4.x:
- rework post-processing fields:
- ability to choose float size (this can be done without changing the format, by using one of the integer tags in the header to provide the float size)
- separate tags and values to not mix integer and floating point data
- block structure for `$ElementNodeData` (by `numcomp`), so that size is predictable
- rework `$GhostElements` section to not mix `int` and `size_t`
- additional features for high-performance parallel IO, for readers using MPI IO
- compress the binary arrays using zlib?
- store embedded entities in the brep ($Entities)
Not in the format per-se, but related:
- ~~include an option to renumber meshes *based on physical definitions*, i.e. renumber all the nodes/elements that are needed by physical groups first, followed by all the other nodes/elements? We could use something similar to `getAdditionalEntities` in the MSH4 code to sort entities.~~ (implemented in Gmsh 4.1.0)Gmsh 5.0Christophe GeuzaineChristophe Geuzainehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/455Segfault in BDS.cpp:5372018-10-27T19:21:22Zjeremy thelerSegfault in BDS.cpp:537I have a segfault (double free) when calling gmsh 4.0.5-git-ffcd149f3 to mesh this model:
```
gmsh -2 model.brep
```
[model.brep](/uploads/0a56e40286051a9f7e4c870768282f42/model.brep)
The gdb stack is:
```
(gdb) where
#0 0x00007fffe...I have a segfault (double free) when calling gmsh 4.0.5-git-ffcd149f3 to mesh this model:
```
gmsh -2 model.brep
```
[model.brep](/uploads/0a56e40286051a9f7e4c870768282f42/model.brep)
The gdb stack is:
```
(gdb) where
#0 0x00007fffebb69fff in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007fffebb6b42a in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007fffebba7c00 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007fffebbadfc6 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x00007fffebbae80e in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#5 0x00007ffff6fd1bc7 in BDS_Mesh::del_point (this=0x555555a79330, p=0x555555a75ae0)
at /home/gtheler/codigos/3ros/build/gmsh/Mesh/BDS.cpp:537
#6 0x00007ffff6b7f493 in buildConsecutiveListOfVertices (gf=gf@entry=0x555555a3b0c0, gel=..., result=..., bbox=...,
m=m@entry=0x555555a79330, recoverMap=..., count=@0x7fffffffd7b0: 16, countTot=18, tol=tol@entry=9.9767556186605115e-12,
seam_the_first=true) at /home/gtheler/codigos/3ros/build/gmsh/Mesh/meshGFace.cpp:1875
#7 0x00007ffff6b8131f in meshGeneratorPeriodic (gf=gf@entry=0x555555a3b0c0, debug=false,
repairSelfIntersecting1dMesh=<optimized out>) at /home/gtheler/codigos/3ros/build/gmsh/Mesh/meshGFace.cpp:2011
#8 0x00007ffff6ee9e44 in meshGFace::operator() (this=this@entry=0x7fffffffdcc6, gf=gf@entry=0x555555a3b0c0,
print=print@entry=true) at /home/gtheler/codigos/3ros/build/gmsh/Mesh/meshGFace.cpp:2832
#9 0x00007ffff6cf46c7 in GFace::mesh (this=0x555555a3b0c0, verbose=true)
at /home/gtheler/codigos/3ros/build/gmsh/Geo/GFace.cpp:1531
#10 0x00007ffff6ed8a0b in Mesh2D (m=0x5555557a9800) at /home/gtheler/codigos/3ros/build/gmsh/Mesh/Generator.cpp:480
#11 GenerateMesh (m=<optimized out>, ask=ask@entry=2) at /home/gtheler/codigos/3ros/build/gmsh/Mesh/Generator.cpp:1081
#12 0x00007ffff6d2a8e9 in GModel::mesh (this=<optimized out>, dimension=dimension@entry=2)
at /home/gtheler/codigos/3ros/build/gmsh/Geo/GModel.cpp:869
#13 0x00007ffff6b92816 in GmshBatch () at /home/gtheler/codigos/3ros/build/gmsh/Common/GmshGlobal.cpp:312
#14 0x00007ffff6b9375f in GmshMainFLTK (argc=3, argv=0x7fffffffe0e8)
at /home/gtheler/codigos/3ros/build/gmsh/Common/GmshGlobal.cpp:473
#15 0x00007fffebb572e1 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#16 0x0000555555554aaa in _start ()
(gdb)
```
Source `BDS.cpp` reads
```
void BDS_Mesh::del_point(BDS_Point *p)
{
points.erase(p);
delete p;
}
```
Line 537 is the `delete` instruction.https://gitlab.onelab.info/gmsh/gmsh/-/issues/481Rename internal classes to match documented terminology2019-04-09T12:11:28ZChristophe GeuzaineRename internal classes to match documented terminologyWe settled on the following names in the public API:
* geometry: points, curves, surfaces and volumes
* mesh: nodes and elements
We should refactor the internal classes to match those names:
* `GPoint` -> `GVertex`
* `GVertex` -> `G...We settled on the following names in the public API:
* geometry: points, curves, surfaces and volumes
* mesh: nodes and elements
We should refactor the internal classes to match those names:
* `GPoint` -> `GVertex`
* `GVertex` -> `GPoint`
* `GEdge` -> `GCurve`
* `GFace` -> `GSurface`
* `GRegion` -> `GVolume`
* `MVertex` -> `MNode`Gmsh 5.0Christophe GeuzaineChristophe Geuzainehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/547Remeshing STL2023-07-27T12:34:14ZBrunoRemeshing STLHello Christophe...
I'm trying to use gmsh to remesh a stl via Python API using the code bellow:
import sys, gmsh
gmsh.initialize(sys.argv)
gmsh.option.setNumber("General.Terminal", 1)
gmsh.model.add('Remesh_stl')
gmsh.merge("Mesh2.st...Hello Christophe...
I'm trying to use gmsh to remesh a stl via Python API using the code bellow:
import sys, gmsh
gmsh.initialize(sys.argv)
gmsh.option.setNumber("General.Terminal", 1)
gmsh.model.add('Remesh_stl')
gmsh.merge("Mesh2.stl")
gmsh.model.mesh.createGeometry()
gmsh.model.geo.synchronize()
gmsh.model.mesh.generate(2)
gmsh.write("remeshed_mesh.stl")
but my stl files comes from smoothing algorithms and at some point some edges of mesh might have overlapped edges and therefore gmsh fails due Unconsistent orientation. Can i tell gmsh to ignore this elements or there is any other work around?
Sorry to bother any feedback would be most welcome
Regardshttps://gitlab.onelab.info/gmsh/gmsh/-/issues/577segfault in meshGFaceBDS.cpp:9492019-11-13T20:55:54Zjeremy thelersegfault in meshGFaceBDS.cpp:949I get the following segfault
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7335770 in refineMeshBDS (gf=gf@entry=0x5555561df9a0, m=..., NIT=10,
computeNodalSizeField=computeNodalSizeField@entry=true, recoverMa...I get the following segfault
```
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7335770 in refineMeshBDS (gf=gf@entry=0x5555561df9a0, m=..., NIT=10,
computeNodalSizeField=computeNodalSizeField@entry=true, recoverMapInv=recoverMapInv@entry=0x0,
recoverMap=recoverMap@entry=0x7fffffffba30, true_boundary=0x7fffffffb990)
at /home/gtheler/codigos/3ros/build/gmsh/Mesh/meshGFaceBDS.cpp:949
949 pts[0]->config_modified = false;
```
when running this .geo file
```
Merge "model.brep";
Mesh.CharacteristicLengthMax = 9.3;
Mesh.CharacteristicLengthExtendFromBoundary = 0;
Mesh.ElementOrder = 2;
```
with this brep file [model.brep.gz](/uploads/cf8eeffd55927654af0c22ff8ce0a978/model.brep.gz)
Note that setting `CharacteristicLengthMax` to for example 9 or `CharacteristicLengthExtendFromBoundary` to 1 does not give the segfault.Jean-François RemacleJean-François Remaclehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/585User given Id for Duplicata{...} command2019-06-28T05:38:43ZSehlingdorfUser given Id for Duplicata{...} commandHi people of gmsh :),
This is more of a question than an issue, but after reading FAQ, tutorials, googleing and just trial and erroring I thought I might ask here.
In the 2nd tutorial t2.geo we have:
```
Translate {0, 0.1, 0} { Dupli...Hi people of gmsh :),
This is more of a question than an issue, but after reading FAQ, tutorials, googleing and just trial and erroring I thought I might ask here.
In the 2nd tutorial t2.geo we have:
```
Translate {0, 0.1, 0} { Duplicata{ Point{3}; } }
// This command created a new point with an automatically assigned id. This id
```
The important bit here is `automatically assigned id`. The duplicated and translated Point id will be `<highest Point id so far>+1`. So pretty much what the `newp` command is doing.
Is there a way to prescribe the fresh id which also works for multiple entries. To give a working example:
```
gs = 1;
Point(1) = {0,0,0,gs};
Point(2) = {1,0,0,gs};
p[] = Translate {0, 1, 0} {
Duplicata { Point{1,2}; }
};
Printf("Point ids: %g, %g",p[]); // -> Point ids: 3, 4
```
Now I would like to use something like this (syntax `Duplicata{existing entities}{new user given ids}`is made up by me):
```
gs = 1;
Point(1) = {0,0,0,gs};
Point(2) = {1,0,0,gs};
p[] = Translate {0, 1, 0} {
Duplicata { Point{1,2}; } {42,43}
};
Printf("Point ids: %g, %g",p[]); // -> Point ids: 42, 43
```
Is there a way to achieve this? If there is a more verbose way around to achieve this I am fine as well.
Thanks for the answer,
Tobihttps://gitlab.onelab.info/gmsh/gmsh/-/issues/592Surface tags of OCC volume reassigned after transformation2023-07-31T11:27:32ZDuncan HunterSurface tags of OCC volume reassigned after transformationHi,
I'm rotating/translating OpenCASCADE volumes, suing the python api, and trying to keep track of the surfaces so they can be used in Physical Groups. When I transform a single volume and it is the only volume in the model, the surfac...Hi,
I'm rotating/translating OpenCASCADE volumes, suing the python api, and trying to keep track of the surfaces so they can be used in Physical Groups. When I transform a single volume and it is the only volume in the model, the surface tags in the model remain unchanged. When I transform a single volume but there are other volumes in the model, the surface tags are reassigned (in the same order as they were assigned) to the next values above the surface tags in the second volume. For example:
```python
import gmsh
model = gmsh.model
factory = model.occ
mesh = model.mesh
gmsh.initialize()
gmsh.option.setNumber("Mesh.CharacteristicLengthMax", 0.2)
gmsh.model.add("Example")
vol = factory.addCylinder(0,0,0,0,0,1,0.5,tag=-1) # create volumes
vol2 = factory.addCylinder(0,0,1,0,0,1,0.5,tag=-1)
factory.synchronize()
print(model.getEntities(2)) # get the tags of the surfaces
factory.translate([(3, vol)], 2, 0, 0) # translate one volume
factory.synchronize()
print(model.getEntities(2)) # get the new tags of the surfaces
gmsh.finalize()
```
This outputs
```
[(2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6)]
[(2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 9)]
```
where the first volume's surface tags have been increased to 7, 8, 9.
Is this intended, and if so is there a suggested workaround?
Apologies if this has been answered or is clear in the documentation.https://gitlab.onelab.info/gmsh/gmsh/-/issues/595Assign Physical Name to an Open Boundary Physical Point after Plugin Crack2022-05-13T07:08:55ZBruno AlvesAssign Physical Name to an Open Boundary Physical Point after Plugin CrackDear all,
I hope this is the correct place to post a question or maybe a proposal for a new feature.
I’m using the “Crack” plugin in Gmsh to duplicate a line inside a 2D domain and I’d like to know if it is possible to define the dupli...Dear all,
I hope this is the correct place to post a question or maybe a proposal for a new feature.
I’m using the “Crack” plugin in Gmsh to duplicate a line inside a 2D domain and I’d like to know if it is possible to define the duplicated vertices and curves as new “Physical Entities”.
For example, let’s say that I have a simple line embedded on a 2D surface. I define this line as a “Physical Line” called “Thin” and its boundaries as “Physical Points” called “Left” and “Right”, respectively. Then, after meshing, I can duplicate the “Right” vertices and keep the “Left” side sealed. For that, the plugin “Crack” is applied as
``Plugin(Crack).Dimension =1;``
``Plugin(Crack).PhysicalGroup =”Thin”;``
``Plugin(Crack).OpenBoundaryPhysicalGroup = “Right”;``
``Plugin(Crack).Run;``
After the application of the plugin, I’m able to create a new “Physical Line” for the “negative” side of the crack and it works fine (the plugin creates a new entity on the .msh file). I called this new line “Thin-” and the old I called “Thin+” as presented on the image below.
![Crack](/uploads/541fd68288a2dcccc2cc39a0d56c969b/Crack.jpg)
However, I was wondering if it’s possible to define a new “Physical Point” for the “Right” boundary on the “negative” side of the crack (“Right-“), so that I have two different “Physical Points” on the right side. It will allow me to impose different boundaries conditions for each point later in GetDP.
Thanks in advance,
Bruno Alveshttps://gitlab.onelab.info/gmsh/gmsh/-/issues/598Problem with fast curving algorithm2020-12-16T20:09:22ZKoen HillewaertProblem with fast curving algorithmHi,
we have some issues with the fast curving (and ho optimization) on this simple case :
[cylinder_cartesian2018.geo](/uploads/04c85f470060497e6a5559da78b23afe/cylinder_cartesian2018.geo)
could you have a look ?
Best,
KoenHi,
we have some issues with the fast curving (and ho optimization) on this simple case :
[cylinder_cartesian2018.geo](/uploads/04c85f470060497e6a5559da78b23afe/cylinder_cartesian2018.geo)
could you have a look ?
Best,
KoenThomas ToulorgeThomas Toulorgehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/620Core dumped when using MMG3D with Coherence2019-08-19T18:17:34ZJulien HessCore dumped when using MMG3D with CoherenceDear gmsh support,
I get the following error
```
## memory alloc problem (hash)
*** Error in `gmsh': free(): invalid next size (normal): 0x00000000073b61d0 ***
## ABNORMAL END. STOP
*** Error in `gmsh': free(): corrupted unsorted ch...Dear gmsh support,
I get the following error
```
## memory alloc problem (hash)
*** Error in `gmsh': free(): invalid next size (normal): 0x00000000073b61d0 ***
## ABNORMAL END. STOP
*** Error in `gmsh': free(): corrupted unsorted chunks: 0x0000000007010990 ***
Aborted (core dumped)
```
when 3d-meshing this .geo file
```
SetFactory("OpenCASCADE");
Mesh.Algorithm = 7; // BAMG
Mesh.Algorithm3D = 7; // MMG3D
Box(1) = {0.0, 0.0, 0.0, 0.5, 1.0, 1.0};
Box(2) = {0.5, 0.5, 0.0, 0.5, 1.0, 1.0};
Coherence;
Field[1] = MathEvalAniso;
Field[1].m11 = "1.0/(0.05)^2";
Field[1].m12 = "0.0";
Field[1].m13 = "0.0";
Field[1].m22 = "1.0/(0.2)^2";
Field[1].m23 = "0.0";
Field[1].m33 = "1.0/(0.2)^2";
Background Field = 1;
```
However, everything goes fine if I remove/comment the `Coherence` or one of the `Box`es.
Best regardsJean-François RemacleJean-François Remaclehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/625Geometry properties get lost after translation or rotation2019-08-21T08:50:47Zsamy mukadiGeometry properties get lost after translation or rotationWhen you set properties such as transfinite points, they get lost after operation such as translation or rotation.
These properties should belong to the geometry and prevail even after any translation or rotation. The _transform() or syn...When you set properties such as transfinite points, they get lost after operation such as translation or rotation.
These properties should belong to the geometry and prevail even after any translation or rotation. The _transform() or synchronize() function seem to lose those properties. I think GEdge, GFace, GRegion should stay the same after transformation, they should store those transfinite properties, however, they are changed within _transform() or synchronize() function, which seem to cause the problem. I think only the geometric representation such as TopoDS_Shape would change but not the rest. It seems that unbind/bind is a problem. I made some changes and it works.https://gitlab.onelab.info/gmsh/gmsh/-/issues/626Selecting geometry from Visibility window2019-08-21T08:53:00Zsamy mukadiSelecting geometry from Visibility windowThe visibility window displays all the geometries. Hence geometry could also be selected from that window as well. It would be convenient for selecting nested/Hidden 3D geometries. In the example below we clicked on surface(1) and it is ...The visibility window displays all the geometries. Hence geometry could also be selected from that window as well. It would be convenient for selecting nested/Hidden 3D geometries. In the example below we clicked on surface(1) and it is selected in red. That is a window with appropriate geometry 0D/1D/2D/3D would popup to present the selection to be made. ![visibility3D](/uploads/ccad8ea453e39ca1fdea0502d6047288/visibility3D.png)https://gitlab.onelab.info/gmsh/gmsh/-/issues/632Question on partitioning and periodic boundaries2019-10-18T16:36:29ZThomas ToulorgeQuestion on partitioning and periodic boundariesWhen partitioning the mesh, it seems that the information on the periodic node correspondence (`GEntity::correspondingVertices`) is not passed to the partitioned entities.
Is this behaviour intended (then I guess the information should ...When partitioning the mesh, it seems that the information on the periodic node correspondence (`GEntity::correspondingVertices`) is not passed to the partitioned entities.
Is this behaviour intended (then I guess the information should be retrieved from the parent entity when needed), or will the periodic information be passed to the partitioned entities in the future?
Thank you in advance.https://gitlab.onelab.info/gmsh/gmsh/-/issues/634The EXOR Boolean operation2019-09-05T19:12:38Zsamy mukadiThe EXOR Boolean operationThe present Boolean operation implements the Cut. I suggest to implement the EXOR as follow : to exclude the union from the result.
![image](/uploads/5b9dcab46aa793b710df414542a5c52e/image.png)
it produces the following :
![image](/upl...The present Boolean operation implements the Cut. I suggest to implement the EXOR as follow : to exclude the union from the result.
![image](/uploads/5b9dcab46aa793b710df414542a5c52e/image.png)
it produces the following :
![image](/uploads/6ebc7d04d20eaa3cd084af57fea2fd92/image.png)
//+
Disk(1) = {0, 0, 1, 0.25, 0.25};
Disk(2) = {0.1, 0, 1, 0.25, 0.25};
//BooleanEXOR{ Surface{1}; Delete; }{ Surface{2}; Delete; }
https://gitlab.onelab.info/gmsh/gmsh/-/issues/641Remeshing an stl file --> Unable to recover the edge 1261 (1/7)2023-07-27T12:33:45ZNils WagnerRemeshing an stl file --> Unable to recover the edge 1261 (1/7)I tried to remesh an stl file using gmsh4.4.1 [nils.stl](/uploads/301874b27246d1f6b5f14c6c84c00f9c/nils.stl)
[remesh.geo](/uploads/35cb68ef8bc51646aebbb644d424ab13/remesh.geo). How can I fix the problem?I tried to remesh an stl file using gmsh4.4.1 [nils.stl](/uploads/301874b27246d1f6b5f14c6c84c00f9c/nils.stl)
[remesh.geo](/uploads/35cb68ef8bc51646aebbb644d424ab13/remesh.geo). How can I fix the problem?https://gitlab.onelab.info/gmsh/gmsh/-/issues/653Unable to redirect CLI terminal output (Win)2019-10-28T11:31:15ZRickUnable to redirect CLI terminal output (Win)Using Gmsh (v4.3.0) in CLI mode with Windows 10 no matter how I've tried I have been unable to capture and redirect terminal output to file, for example
`gmsh test.geo - > myfile.txt`
would typically redirect the output to myfile.txt. ...Using Gmsh (v4.3.0) in CLI mode with Windows 10 no matter how I've tried I have been unable to capture and redirect terminal output to file, for example
`gmsh test.geo - > myfile.txt`
would typically redirect the output to myfile.txt. My suspicion is that output is not printed to STDOUT/STDERR but it could be something else too. (I know the -log option is available now but I'm embedding the gmsh call in a bat script and wanted to capture all output in the same file.)https://gitlab.onelab.info/gmsh/gmsh/-/issues/693How to Read Colors in STEP Files2023-07-27T12:07:05ZAlessandro BanducciHow to Read Colors in STEP FilesHi,
I would like to specify physical groups based on the colors of faces in an imported STEP file.
The idea is that I can specify boundary conditions in my CAD program by coloring faces and then exporting the geometry as a STEP file, w...Hi,
I would like to specify physical groups based on the colors of faces in an imported STEP file.
The idea is that I can specify boundary conditions in my CAD program by coloring faces and then exporting the geometry as a STEP file, which can then be read and meshed by gmsh.
The issues is I can't figure out how to get gmsh to read the colors off the face entities.
When I load a colored STEP file into the GUI the faces are not colored.
Also using the python sdk on gmsh 4.4.1 running:
```
import gmsh
gmsh.initialize()
gmsh.option.setNumber("General.Terminal", 1)
gmsh.option.setNumber("Mesh.Algorithm", 3) # Frontal-Delaunay
gmsh.option.setNumber("Geometry.OCCImportLabels", 1) # import colors from STEP
fname = r'cubez.stp'
#gmsh.merge(fname)
gmsh.model.occ.importShapes(fname,format="step")
gmsh.model.occ.synchronize()
gmsh.model.mesh.generate(2)
print([gmsh.model.getColor(*tag) for tag in gmsh.model.getEntities()])
print([gmsh.model.getEntityName(*tag) for tag in gmsh.model.getEntities()])
[gmsh.model.getColor(*tag) for tag in gmsh.model.getEntities()]
```
returns `(0, 0, 255, 0)` for all entities, rather than showing that 3 of the faces are red green and blue.
I'm not sure if gmsh.model.getColor() is actually the appropriate function to use though.
The test file, a cube with 3 faces colored:
[cubez.stp](/uploads/4fa66c1330e8b68660c97b55e685c935/cubez.stp)
Thank you!https://gitlab.onelab.info/gmsh/gmsh/-/issues/6952D mesh BoundaryLayer fails in xz-plane2023-07-27T12:18:29ZShy-Yea Lin2D mesh BoundaryLayer fails in xz-planeHi,
I recently use gmsh python API to create 2D mesh grids of some airfoils for cfd simulations. The 2D mesh grids were successfully generated in xy-plane with nice BoundaryLayer grids. However, because of some reasons the 2D mesh grids...Hi,
I recently use gmsh python API to create 2D mesh grids of some airfoils for cfd simulations. The 2D mesh grids were successfully generated in xy-plane with nice BoundaryLayer grids. However, because of some reasons the 2D mesh grids have to be in xz-plane. So I made some changes in my codes, simply exchanging the y-z-coordinates of points and the rest remaining the same. The BoundaryLayer works well in xy-plane but fails in xz-plane. In order to reproduce this issue, I created relative simple cases (*.geo) with only few points in xy- and xz-plane, respectively. As shown in the figures below, BoundaryLayer fails in xz-plane (marked by a red circle). So, is there any tips or short-term solutions to this?
[test_xy.geo](/uploads/a9dc580384f2f693ef721e04eba71f7b/test_xy.geo)[test_xz.geo](/uploads/07a4b88a4b64fe4e8a5b3a54eab2c4f7/test_xz.geo)
![xy](/uploads/580a8988140a019b24381f7b50f77e52/xy.png)![xz](/uploads/f7b9f4120d6b18ed987cc3d0e26f98e8/xz.png)
Shy-YeaJean-François RemacleJean-François Remaclehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/706Fillet function changes volume tag2019-12-12T12:59:12ZFabian LothFillet function changes volume tagI construct a volume (here a cylinder) with some volume tag (here 42) and apply the Fillet function. That changes the volume tag (here from 42 to 1). I think it is set to smallest free volume tag. Is this behavior on purpose? If yes, why...I construct a volume (here a cylinder) with some volume tag (here 42) and apply the Fillet function. That changes the volume tag (here from 42 to 1). I think it is set to smallest free volume tag. Is this behavior on purpose? If yes, why? In my opinion this can become problematic if one wants to work on this volume later (for example assigning it to a physical volume).
Thank you in advance:-)
Fabian
[fillet_function_changes_volume_tag.geo](/uploads/d7a7372590ae95acc8a82b3f8fe41b33/fillet_function_changes_volume_tag.geo)https://gitlab.onelab.info/gmsh/gmsh/-/issues/722Feature request: Piecewise Cubic Hermite Interpolating Polynomial (PCHIP)2020-01-15T08:30:51ZDener Augusto IorioFeature request: Piecewise Cubic Hermite Interpolating Polynomial (PCHIP)Hello,
I would like to suggest the implementation of the PCHIP interpolation method for curve generation. In this method, the source points belong to the generated curve, similar with the Spline curves and differently from the Bezier an...Hello,
I would like to suggest the implementation of the PCHIP interpolation method for curve generation. In this method, the source points belong to the generated curve, similar with the Spline curves and differently from the Bezier and B-spline methods. This property is desired in some cases, such as in some shape optimization problems. In comparison with Splines, PCHIP has no overshoots, less oscillation if the data is not smooth and can accurately connect the flat regions in the interpolation.
Original Author:
Fritsch, F. N. and R. E. Carlson. "Monotone Piecewise Cubic Interpolation." SIAM Journal on Numerical Analysis. Vol. 17, 1980, pp.238–246.
References:
https://www.mathworks.com/help/matlab/ref/pchip.html
https://en.wikipedia.org/wiki/Monotone_cubic_interpolationhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/723Blossom Full-Quad Transfinite Connectivities2020-01-15T08:29:20ZSeth PembertonBlossom Full-Quad Transfinite ConnectivitiesWhen meshing transfinite surfaces that surround (enclose) another surface, and the RecombinationAlgorithm is set to Blossom Full-Quad, it appears the transfinite connectivites get tangled. Reference the attached image. This has been the ...When meshing transfinite surfaces that surround (enclose) another surface, and the RecombinationAlgorithm is set to Blossom Full-Quad, it appears the transfinite connectivites get tangled. Reference the attached image. This has been the case for built-in and OCC kernel in Gmsh 4.4.X and 4.5.X.
![gmsh_mesh](/uploads/ff563dca636612cbe42405683173188e/gmsh_mesh.png)https://gitlab.onelab.info/gmsh/gmsh/-/issues/727Problem with Boolean Difference2020-01-19T08:06:05ZMoreno AdelProblem with Boolean DifferenceHi,
I have a problem with the Boolean difference of two surfaces.
Indeed, when I subtract a surface (composed of a Bspline as border) and another arbitrary surface, I noticed that this difference was not made if there were too many poin...Hi,
I have a problem with the Boolean difference of two surfaces.
Indeed, when I subtract a surface (composed of a Bspline as border) and another arbitrary surface, I noticed that this difference was not made if there were too many points on the Bspline (I have to proceed to a downsample on the coordinates of the points which define the Bspline).
The problem does not come from the definition of the surfaces (I can mesh the surfaces one by one without any problem).
Also, I was careful that the two surfaces do not overlap on one or more borders (as advised by Christophe Geuzaine in the thread **Overlaping surface problem when using BooleanDifference**)
For example, when I run the GmshBoucleMatlab5.txt, the difference between the two surfaces works well (here, I did a downsample).
On the other hand, the difference is not made in GmshBoucleMatlab4.txt (without a downsample).
[GmshBoucleMatlab5.txt](/uploads/594409355143cc6b81a985bf633baa5f/GmshBoucleMatlab5.txt)
[GmshBoucleMatlab4.txt](/uploads/0ab246ba66c4ab82f99d529a65545b9a/GmshBoucleMatlab4.txt)
Do you have an idea to solve the problem ?
Thank you,
Adelhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/730"Automatic" surface loops2020-01-21T10:39:36ZAlessandro Vicini"Automatic" surface loopsWhen using the GUI to generate a surface loop, after one surface is picked the code automatically selects all other surfaces which complete the loop (when this is univocal). It would be very useful to have this available as a command in ...When using the GUI to generate a surface loop, after one surface is picked the code automatically selects all other surfaces which complete the loop (when this is univocal). It would be very useful to have this available as a command in the geo script, so as to generate loops with the input of a single surface...
Alessandrohttps://gitlab.onelab.info/gmsh/gmsh/-/issues/737Errors with boundary layers and compound curve/surface2023-07-27T07:40:34ZRickErrors with boundary layers and compound curve/surfaceI have been experimenting with boundary layer generation and found issues when the layer is defined for a compound curve.
I have attached a test case of a unit square where the lower boundary is a compound line of 10 straight line segme...I have been experimenting with boundary layer generation and found issues when the layer is defined for a compound curve.
I have attached a test case of a unit square where the lower boundary is a compound line of 10 straight line segments. Everything works fine if the boundary layer is on the top boundary (which is not a compound curve). If the boundary for defined for the compound curve then the errors "Boundary layer end point # should lie on a straigt line". It meshes a reparametrized mesh without boundary layer. However, if the "Compound Surface {1};" (line 40) is commented out the boundary layer is meshed (but without reparametrization and still notifying about the boundary layer end point errors).
Maybe I have just misunderstood how the boundary layer definitions work. It would maybe be good if there is a bit more defined in the docs about it and the various fields and their meanings.
[working_boundary_layer_with_reparametrization.geo](/uploads/58dc290b5d4d844082881a89105a9772/working_boundary_layer_with_reparametrization.geo)
[non_working_boundary_layer_with_compound_surface.geo](/uploads/c5deb00320b4eb0fb9b449634f8f7f85/non_working_boundary_layer_with_compound_surface.geo)Jean-François RemacleJean-François Remaclehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/743Mesh saved in matlab format - No physical element info2020-02-26T10:02:56Zpatrick boucheMesh saved in matlab format - No physical element infoHi,
When i save my mesh in matlab format with Mesh.Format = 50. It did not save the physical name of each line, surface or volume.
Can you help me?
ThksHi,
When i save my mesh in matlab format with Mesh.Format = 50. It did not save the physical name of each line, surface or volume.
Can you help me?
Thkshttps://gitlab.onelab.info/gmsh/gmsh/-/issues/795Helping new users2023-02-13T06:34:33ZMax OrokHelping new usersTracking issue for usability, helping out new users, making `Gmsh` features more discoverable.
We get a lot of repeated questions on the mailing list.
Maybe there are some things we can do to make the site more accessible.
Some ide...Tracking issue for usability, helping out new users, making `Gmsh` features more discoverable.
We get a lot of repeated questions on the mailing list.
Maybe there are some things we can do to make the site more accessible.
Some ideas:
* Guided walkthrough programs for the API and geo files, in the style of blog posts.
* A Gmsh whirlwind tour, the reference manual is quite imposing for a newcomer.
* Go through the common mailing list issues (STL topography comes to mind) and make dedicated tutorials for them?
I know there's a lot going for the more technical issues, I'd be happy to try and help with these!
Please feel free to add your own ideas to the list.Max OrokMax Orokhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/8113D boundary layer mesh2023-07-27T07:35:56ZLucas Gasparino3D boundary layer meshGreetings,
Is it possible to generate 3D boundary layer meshes in any version of gmsh? I know that using a BoundaryLayerField in 2D and extruding the mesh works for some cases like an extruded circle to cylinder, but I´m interested in m...Greetings,
Is it possible to generate 3D boundary layer meshes in any version of gmsh? I know that using a BoundaryLayerField in 2D and extruding the mesh works for some cases like an extruded circle to cylinder, but I´m interested in more complex geometries (like a sphere or ahmed body).
Thank you!Jean-François RemacleJean-François Remaclehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/862BoundaryBox, Field[1].Box only possible in global coordinatesystem2020-05-15T06:47:06ZJulian HennebergBoundaryBox, Field[1].Box only possible in global coordinatesystemIs it possible to rotate a `BoundaryBox` or `Field[1].Box`. If not, is a feature like this planed?Is it possible to rotate a `BoundaryBox` or `Field[1].Box`. If not, is a feature like this planed?https://gitlab.onelab.info/gmsh/gmsh/-/issues/890Remeshing workflow for deformed FEM meshes.2022-05-11T05:38:49ZTim FurlanRemeshing workflow for deformed FEM meshes.As suggested in the mailing list, i open this issue on here, even though it is probably an issue I have rather than one gmsh has.
## What i want to do:
I perform 2d and 3d mechanical simulations using Abaqus (although i think most othe...As suggested in the mailing list, i open this issue on here, even though it is probably an issue I have rather than one gmsh has.
## What i want to do:
I perform 2d and 3d mechanical simulations using Abaqus (although i think most other FEM software will probably behave similarly). At some point (when the mesh degrades too much) i would like to stop the simulation, export the "final" shape of the body to gmsh, remesh the body, and continue with a new simulation.
## What i tried:
I explicitly created points, lines and surfaces for every element on the boundary of the body. I then compounded boundary segments (depending on boundary conditions or geometrical features i would like to retain) and created physical groups accordingly.
- When the surface of a 3d body is split into multiple subsurfaces, this means having to track segments of the lines separating these subsurfaces, since the compounded lines can not extend past te surfaces enclosed by them.
- Compounding is necessary to allow for mesh coarsening (which i need).
- I read about discrete entities, but i am unsure how i would incorporate them into my workflow (especially w.r.t. compounding).
## Key problems
### Mesh Definitions Gmsh vs Abaqus
One problem the i consistently run into is the different meshes used by gmsh (including line- and surface elements even in 3d meshes) and abaqus (using only volume elements for 3d). For example, to apply boundary conditions i have to search the 3d elements containing the 2d elements in a physical group as faces. Is there a way to get this information in gmsh directly, i.e. build a new physical group with all 3d elements which have at least one of the 2d elements as a face?
In Abaqus, on the mesh level the equivalent of a physical group is called a set. Sets contain elements and/or nodes - for a surface of a 3d body, the set would contain all nodes on that surface as well as all elements that have at least one face on it.
If the original mesh was created in gmsh, i could load/keep the information about that mesh and only change the node coordinates (instead of reconstructing the complete mesh from the abaqus output). However, i would prefer to have a workflow that is independent from this if it is possible without high additional runtimes and/or coding effort.
### 2nd order elements
I would love to use gmsh's functionality for 2nd order elements. I would really appreciate it if there was a possibility to incorporate those (maybe at least quadratic triangles/tets for now?) into the workflow without a lot of extra work (like breaking up element faces into triangles manually). I am not sure if there is an easy way to create e.g. the surface given by the 6 nodes of a quadratic triangle element in gmsh (ideally using the actual parametrization).
### Reconstruction of CAD model or new CAD from mesh?
I think reconstruction and remeshing of the original geometry (or a changed version of that) is infeasible for most of the problems i am trying to solve. I am fine with accepting that i lose some information about the shape of the domain when accepting a converged FEM solution as the new shape. As described above, quadratic elements would be an advantage in that regard. To keep certain geometric features intact, compounds can be used (and maybe embedded entities, although i did not try that yet).
## Example Problem
To demonstrate the workflow i have in mind, i created a simple cube in gmsh and meshed it with quadratic tet elements. I created 3 physical surfaces (front, back, and all sides). The output contains triangle elements for the surface and tets for the volume - i think the first step for me would be to know if there is an easy way to tag the tets including one of the triangles as a face. I attached the python script i used to create the example as well as the resulting .msh file.
Geometry of the example problem:
![cube_geometry](/uploads/36f504ce322282e14f7c7f2eb1b61222/cube_geometry.png)
Python script: [example_cube.py](/uploads/12a542297e57b8dffbfc367d96a21e93/example_cube.py)
Resulting .mesh file: [zonedCube.msh](/uploads/de4841c00cbae3255543cc7e8fa47ce7/zonedCube.msh)
In a second step, i would then change the coordinates of the nodes and re-import a mesh that only contains the tets (without any information about the underlying geometry).
Kind regard and thank you in advance for any help on the matter
Timhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/906Duplicated entities in STEP output with gmsh-4.6.02023-10-27T06:54:22ZChristophe FriebelDuplicated entities in STEP output with gmsh-4.6.0I tried STEP output with gmsh-4.6.0 on the attached geo file and duplicated entities are still present in the exported STEP file although Coherence is applied.[DupEntitiesSTEP.geo](/uploads/27bcd274f6770e3118231097c66c101c/DupEntitiesSTE...I tried STEP output with gmsh-4.6.0 on the attached geo file and duplicated entities are still present in the exported STEP file although Coherence is applied.[DupEntitiesSTEP.geo](/uploads/27bcd274f6770e3118231097c66c101c/DupEntitiesSTEP.geo)https://gitlab.onelab.info/gmsh/gmsh/-/issues/919How to eliminate the obtuse triangles.2020-07-04T11:36:47ZQiusong ChenHow to eliminate the obtuse triangles.I'm a newer for gmsh and using it to generate mesh for semiconductor simulation. But there are some obtuse triangles in the mesh file. But these obtuse triangles will lead to failure of convergence and induce fluctuation of physical para...I'm a newer for gmsh and using it to generate mesh for semiconductor simulation. But there are some obtuse triangles in the mesh file. But these obtuse triangles will lead to failure of convergence and induce fluctuation of physical parameters. So I need a method to avoid these obtuse triangles. There are some non-physical arrows located at the obtuse triangles. In order to get more realistic results, I have to find an approach to refine the mesh. Can anyone tell me how to avoid such obtuse triangles?
![76759941_757606368051964_5492148064929972224_n](/uploads/c724036a521848f8475951f9d69eee88/76759941_757606368051964_5492148064929972224_n.png)
![78400489_2545196738935004_5959660323160981504_n](/uploads/87f25b2337421345ad34dbeadaba8270/78400489_2545196738935004_5959660323160981504_n.png)https://gitlab.onelab.info/gmsh/gmsh/-/issues/920High order optimization of hexahedral mesh takes forever2020-07-06T17:33:38ZReinhardHigh order optimization of hexahedral mesh takes foreverDear Gmsh developers,
If I execute the command
`gmsh -3 -order 2 -optimize_ho gmsh-opt.geo`
using the attached file, I get the following output:
```
Info : Running 'gmsh -3 -order 2 -optimize_ho gmsh-opt.geo' [Gmsh 4.6.0, 1 node,
....Dear Gmsh developers,
If I execute the command
`gmsh -3 -order 2 -optimize_ho gmsh-opt.geo`
using the attached file, I get the following output:
```
Info : Running 'gmsh -3 -order 2 -optimize_ho gmsh-opt.geo' [Gmsh 4.6.0, 1 node,
...
Info : Smoothing surface 12 (276 elements considered in elastic analogy, worst mapping 5.30833E-03, 69 bad elements)
Info : Smoothing surface 17 (276 elements considered in elastic analogy, worst mapping 5.30833E-03, 69 bad elements)
Info : Generating elastic system...
```
After that message Gmsh runs forever at 100% CPU usage.
If I run Gmsh with gdb, I get the following backtrace:
```
#0 __memmove_sse2_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:506
#1 0x00000000024835a5 in ?? ()
#2 0x0000000002487c76 in MatSetValues_SeqAIJ ()
#3 0x0000000002222f6e in MatSetValues ()
#4 0x00000000014956e9 in linearSystemPETSc<double>::addToMatrix(int, int, double const&) ()
#5 0x0000000001847bc5 in ?? ()
#6 0x000000000184b330 in highOrderTools::_applyIncrementalDisplacement(double, std::vector<MElement*, std::allocator<MElement*> >&, bool, double, char*, std::vector<MElement*, std::allocator<MElement*> >&) ()
#7 0x000000000184b642 in highOrderTools::applySmoothingTo(std::vector<MElement*, std::allocator<MElement*> >&, double, bool) ()
#8 0x000000000184b965 in HighOrderMeshElasticAnalogy(GModel*, bool) ()
#9 0x00000000012c92d5 in OptimizeMesh(GModel*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int) ()
#10 0x00000000012cf943 in GenerateMesh(GModel*, int) ()
#11 0x000000000110f0e9 in GModel::mesh(int) ()
#12 0x0000000000ef1b06 in GmshBatch() ()
#13 0x0000000000ef2b8f in GmshMainFLTK(int, char**) ()
#14 0x00007ffff75760b3 in __libc_start_main (main=0xea6840 <main>, argc=6, argv=0x7fffffffe538, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe528) at ../csu/libc-start.c:308
self = <optimized out>
result = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {79042048, 2685950806320502189, 15666448, 140737488348464, 0, 0, -2685950807038732883, -2685969837906831955}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x6, 0x7fffffffe538}, data = {prev = 0x0, cleanup = 0x0, canceltype = 6}}}
not_first_call = <optimized out>
#15 0x0000000000ef0d39 in _start ()
```
[gmsh-opt.geo](/uploads/fbfc9f9e98ddcf98f6db6a77a0086370/gmsh-opt.geo)
Best regards,
Reinhardhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/922Export periodic node correspondence to Matlab2020-07-08T19:06:43ZMarius MellmannExport periodic node correspondence to MatlabDear Gmsh developers,
thank you for developing gmsh, it's a very useful tool for me!
I'd like to know if there is a simple way to export the periodic node correspondence to Matlab. I am calling gmsh inside a Matlab routine, which automa...Dear Gmsh developers,
thank you for developing gmsh, it's a very useful tool for me!
I'd like to know if there is a simple way to export the periodic node correspondence to Matlab. I am calling gmsh inside a Matlab routine, which automatically meshes my geometry, saves the mesh as a .m-file and finally imports the nodes and element connectivity to the Matlab workspace for FEM calculations. My problem is that the .m-file does not contain the periodic node correspondence, in contrast, if I save the mesh as .msh-file the periodic node correspondence is included. Is there a way to include the periodic node correspondence in the .m-file mesh?
Thank you very much!
Mariushttps://gitlab.onelab.info/gmsh/gmsh/-/issues/929Extruded mesh in available volume2021-02-18T15:23:13ZAlexandruExtruded mesh in available volumeIn the day to day usage I see a lot of volumes that represent some laser cut metal sheets:
![temp](/uploads/392094efbf229f7ceb1d7562cd162e90/temp.png)).
It’s a pitty to create a tet mesh since a 2D mesh could be extruded to create a hex...In the day to day usage I see a lot of volumes that represent some laser cut metal sheets:
![temp](/uploads/392094efbf229f7ceb1d7562cd162e90/temp.png)).
It’s a pitty to create a tet mesh since a 2D mesh could be extruded to create a hex mesh.
What would be the way to script this for the general case of a metal sheet with any contour?
From the manual, I understand that one starts with a 2D mesh and then extrudes it to a 3D hex mesh. So the volume is created after mesh extrusion.
But what if the volume is already there?
1. Can I specify the starting and ending surfaces and let GMSH extrude the mesh?
2. Or maybe 2D mesh both starting and ending surfaces and tell GMSH to map the 3D mesh between the 2D meshes?
The second case would be more general I think, since it could be that the extrusion direction is not always perpendicular to the starting an ending surfaces.https://gitlab.onelab.info/gmsh/gmsh/-/issues/961creating Quad or Hex starting with the initial mesh feature2020-09-02T09:36:13Zsamy mukadicreating Quad or Hex starting with the initial mesh featureThe new option for getting initial mesh without node insertion seems to be a good approach for generating Quad or Hex on a general shape. (1) Create minimal nodes on the lines, mostly using endpoints or 2-3 points on the lines (2) create...The new option for getting initial mesh without node insertion seems to be a good approach for generating Quad or Hex on a general shape. (1) Create minimal nodes on the lines, mostly using endpoints or 2-3 points on the lines (2) create Triangles or Tets without node insertion. (3.1) For Triangle try to recombine into quad, use those cells as initial zones to be refined into quad (3.2) For Tetrahedral (try recombine into Hex), then re-mesh into Hex.
The idea is to start with very coarse mesh, as an initial decomposition of the geometry. Then split each zone into Quad/Hex with midpoint rule. Then apply transfinite meshing on each of the zones.
The resulting mesh still has good quality. That new feature looks very good.
A test with a box and each segment starting with 2 endpoints, refining with midpoint rule from gmsh.
![image](/uploads/494bc4eb739b6c0cd678ebb76f7824e7/image.png)
Another with initial 2 endpoints on each curve.
![image](/uploads/c41297598c2cff36701eb9a4c6384026/image.png)
Refining with gmsh mid points rule
![image](/uploads/d0da6710beff4b82b8231c3bb918be5f/image.png)https://gitlab.onelab.info/gmsh/gmsh/-/issues/963Identifying elements which include lower-dimensional elements as faces, edges...2020-10-20T08:13:17ZTim FurlanIdentifying elements which include lower-dimensional elements as faces, edges etcI am trying to use meshes created by gmsh in the FEM software abaqus. However, i have some troubles with the way both programs handle boundaries.
* Gmsh generally creates elements of dimension 0, 1, 2, 3 in that order. A 2d surface of a...I am trying to use meshes created by gmsh in the FEM software abaqus. However, i have some troubles with the way both programs handle boundaries.
* Gmsh generally creates elements of dimension 0, 1, 2, 3 in that order. A 2d surface of a volume that has some boundary conditions is then handled as a set of 2d elements.
* Abaqus only uses 3d elements for the volume - The surface is characterised by a set of nodes and 3d elements.
To transfer the information about the area the boundary condition is applied to, i need to identify the 3d elements that include the boundary elements (2d) as faces. To transfer information about an edge of the 3d volume, i would need to identify elements that include 1d elements as edges, and so forth.
While this is certainly possible using the API, i am wondering if this information is maybe already accessible in gmsh.
Kind regards
TimChristophe GeuzaineChristophe Geuzainehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/967liburing support2020-09-04T17:28:49ZMax Orokliburing supportWould you be interested in reviewing PRs about adding io_uring/liburing support to Gmsh?
`io_uring` is a new Linux kernel interface for general async IO https://kernel.dk/io_uring.pdf
`liburing` is an application-level library built on...Would you be interested in reviewing PRs about adding io_uring/liburing support to Gmsh?
`io_uring` is a new Linux kernel interface for general async IO https://kernel.dk/io_uring.pdf
`liburing` is an application-level library built on top of `io_uring` that removes some of the sharp edges (`mmap` calls, memory barriers).
For Gmsh, I would propose it as a threadpool alternative for parallel file IO.
There have been some interesting performance results for a large number of reads on a single file for SSDs https://github.com/root-project/root/pull/6162 (early days yet). The actual implementation is about ~150 lines. Do you think this is something Gmsh could take advantage of? I do not really know what happens during file reading.
Thank you,
Maxhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1002Geo file transpiler2020-09-25T14:31:01ZMax OrokGeo file transpilerTracking issue for a possible `geo` file transpiler (see motivating discussion at https://gitlab.onelab.info/gmsh/gmsh/-/issues/994#note_11272)
The idea is to translate existing `geo` files to standalone programs that use the Gmsh API. ...Tracking issue for a possible `geo` file transpiler (see motivating discussion at https://gitlab.onelab.info/gmsh/gmsh/-/issues/994#note_11272)
The idea is to translate existing `geo` files to standalone programs that use the Gmsh API.
The most important output language is probably Python, and then C++.https://gitlab.onelab.info/gmsh/gmsh/-/issues/1022Can Gmsh create deformed prism? and how to? and partially hexahedralize?2020-10-12T01:37:01ZJunyeong HeoCan Gmsh create deformed prism? and how to? and partially hexahedralize?Hello,
first, I'm really appreciated for this wonderful program.
I'm Doctor's degree student working on magnetotelluric survey modeling.
So, what I'm doing is making local earth model and modeling Maxwell's equations by FEM.
Recently,...Hello,
first, I'm really appreciated for this wonderful program.
I'm Doctor's degree student working on magnetotelluric survey modeling.
So, what I'm doing is making local earth model and modeling Maxwell's equations by FEM.
Recently, my studying area contains very shallow sea, compared to its total area.
I attached simple model for test.
In the model, volume2 is the sea.
As mentioned, this is just simple test model.
The final model will be larger and contain shallower sea.
If I tetrahedralize the model, it will contain huge amount of tetrahedron in order to preserve mesh quality.
So I think prism element is the best choice for the sea part (than hexahedral)
because I have to apply sea bottom topography from DEM data
and triangles are better than quadrangles (all nodes are co-planer automatically).
However, when I tested the simple model, the mesh contains only the ill-shaped tetrahedron and pyramids.
(also, error messages are printed)
In my case, I can't use extrusion method because of the complex topography.
I can't figure out how to make prisms without using extrusion. (not the regular one, deformed-shape prisms)
Also, it would be best if I can discretize some part of the model that I want into tetrahedron (+pyramid, prisms)
and other into hexahedron
So I wonder that
1) can Gmsh create irregular prisms
2) can Gmsh recombine specified volume (not total model)
[test.geo](/uploads/2abea9a6adcfce852d59239e8baf0cff/test.geo)https://gitlab.onelab.info/gmsh/gmsh/-/issues/1047Using scroll wheel to zoom on a monitor that isn't the primary monitor has in...2023-07-27T12:33:29ZMike SeeseUsing scroll wheel to zoom on a monitor that isn't the primary monitor has incorrect pivot pointThis is the same issue as #304, but I figured I'd open a new issue since that one is very stale.
I'm using Gmsh v4.6.0 on Windows 10 64bit.
If I move the Gmsh GUI to a non-primary monitor, the scroll wheel zoom function does not zoom o...This is the same issue as #304, but I figured I'd open a new issue since that one is very stale.
I'm using Gmsh v4.6.0 on Windows 10 64bit.
If I move the Gmsh GUI to a non-primary monitor, the scroll wheel zoom function does not zoom onto where the cursor location is.
Here is me simply zooming out and in using my scroll on my secondary monitor
![gmsh-scroll](/uploads/18adad054654316b1f6a59adb8a61778/gmsh-scroll.gif)
Here it is on my primary screen working as expected:
![gmsh-scroll2](/uploads/2b05bc83902ef0efd859e549306d5296/gmsh-scroll2.gif)https://gitlab.onelab.info/gmsh/gmsh/-/issues/1088Alpha-shape algorithm in gmsh ?2020-12-18T16:32:07ZSimon FévrierAlpha-shape algorithm in gmsh ?Following issue #1084 about the delaunay traingulation it would be really great to have a way to obtain elements, facets from gmsh using the alpha-shape algorithm (which is based on a delaunay triangulation).
The alpha-shape algorithm ...Following issue #1084 about the delaunay traingulation it would be really great to have a way to obtain elements, facets from gmsh using the alpha-shape algorithm (which is based on a delaunay triangulation).
The alpha-shape algorithm is really simple: a simplex is kept in the alpha-complex if there exists a cirlce or radius sqrt(alpha), passing by all points of the simplex, which does not contain any other points of the set.
It would be really great to have a prototype of the form:
```c++
GMSH_API void alphaShape(const std::vector<double> & coord, double alpha
std::vector<std::size_t> & nodesInTetra,
std::vector<std::size_t> & nodesInBoundaryFacet);
```https://gitlab.onelab.info/gmsh/gmsh/-/issues/1134Calling the general Boolean Function << BooleanOperator (...) >> from geo-file2021-01-01T01:20:49Zsamy mukadiCalling the general Boolean Function << BooleanOperator (...) >> from geo-fileIs it possible to call the general Boolean function from the geo-file?
i.e. <br><br> <b>
BooleanOperator {CustomBoolean}{ Surface{1}; }{ Surface{2};};</b><br>
I want to introduce a customBoolean Method. Not part of the 4.Is it possible to call the general Boolean function from the geo-file?
i.e. <br><br> <b>
BooleanOperator {CustomBoolean}{ Surface{1}; }{ Surface{2};};</b><br>
I want to introduce a customBoolean Method. Not part of the 4.https://gitlab.onelab.info/gmsh/gmsh/-/issues/1154Call to gmsh/model/occ/fragment only returns highest dimensional resulting en...2021-04-26T03:01:24ZStephen BanksCall to gmsh/model/occ/fragment only returns highest dimensional resulting entities if tag >= 0 || !preserveNumberingThe returned outDimTags from calling gmsh/model/occ/fragments only includes the highest dimensional new shapes if tag > 0 or Geometry.OCCBooleanPreserveNumbering = 0, otherwise it includes all dimensional shapes. I think it is probably m...The returned outDimTags from calling gmsh/model/occ/fragments only includes the highest dimensional new shapes if tag > 0 or Geometry.OCCBooleanPreserveNumbering = 0, otherwise it includes all dimensional shapes. I think it is probably meant to always include all resulting entities.
This is due to the source code for OCC_Internals::booleanOperator (GModelIO_OCC.cpp) being as follows (I've used ellipsis to indicate irrelevant code to this discussion):
`if(tag >= 0 || !preserveNumbering) {
...
_multiBind(result, tag, outDimTags, true, true);
...
}
else {
...
_multiBind(result, -1, outDimTags, false, true, true);
...
}`
I suspect both calls to _multiBind should have highestDimOnly = false, however it is only false in the else branch. I believe this is why the outDimTags only contains the highest dimensional entities in the (tag >= 0 || !preserveNumbering) branch. I'm not sure if this is intentional or not.https://gitlab.onelab.info/gmsh/gmsh/-/issues/1164Specific surface information extraction using gmsh2021-01-26T11:03:37ZMikhail BasanetsSpecific surface information extraction using gmsh
I have a **OCC brep** file and the tags of some surfaces in this file.
I want to extract enough information in order to be able to determine if the point lies on the surface or not. (to determine if the triangle lies on the surface)
U...
I have a **OCC brep** file and the tags of some surfaces in this file.
I want to extract enough information in order to be able to determine if the point lies on the surface or not. (to determine if the triangle lies on the surface)
Unfortunately, we are only able to do this for the Plane surface type, using _**gmsh/model/getNormal**_ and _**gmsh/model/getValue**_, but we are not sure how do we extract information about more complex types like spheres and cylinders.
1. How can we get information about center, direction, radius?
Another way to do it is by directly parsing the **OCC brep** file, but the order of the surfaces in the file doesn't correspond to the order of tags when we import same file in gmsh.
2. Is there any way to determine what the surface tag will be just having a file, without importing it?https://gitlab.onelab.info/gmsh/gmsh/-/issues/1170https automatic forwarding not working2021-01-26T21:10:17ZUser_Nhttps automatic forwarding not workingWhen visiting onelab.info, there is no automatic forwarding to https-version. This should be fixed, the certificate is already available.When visiting onelab.info, there is no automatic forwarding to https-version. This should be fixed, the certificate is already available.https://gitlab.onelab.info/gmsh/gmsh/-/issues/1199Failed Frontal 3D mesh; Edge multiple times in surface2021-02-11T22:35:01ZMichael BarbourFailed Frontal 3D mesh; Edge multiple times in surfaceI'm attempting to create a volume mesh with multiple internal nested volumes. I perform a segmentation and volume meshing in Amira, and export that mesh as Nastran to read the volume mesh into GMSH. I have a separate stl surface that wra...I'm attempting to create a volume mesh with multiple internal nested volumes. I perform a segmentation and volume meshing in Amira, and export that mesh as Nastran to read the volume mesh into GMSH. I have a separate stl surface that wraps around the entire imported volume, and I'm creating a 3D mesh in the void between the exterior surface and interior volume meshes. When attempting a frontal 3D mesh, I get the following error:
Error : ERROR: Edge 4 - 9 multiple times in surface mesh
Meshing with the Deluanay algorithm, however, works. I assume that this error is due to duplicate nodes, but I've tried cleaning up the merged volume mesh using removeDuplicateNodes() but that doesn't seem to work.
Is this error due to duplicate nodes and any suggestions for fixing the issue? I'd at least like to understand why the Frontal algorithm is failing. The volume mesh from Amira is too large to drop here, but I've included the python script so you can see my steps and a zip file of the .msh. Thanks!
[full_model_attempt4.tetra.msh.zip](/uploads/e9c949422d2c8dcf83c26366dd86ca5c/full_model_attempt4.tetra.msh.zip).
[gmsh_amira_test.py](/uploads/3d6f89549137ba803c647b67958e1ec1/gmsh_amira_test.py)https://gitlab.onelab.info/gmsh/gmsh/-/issues/1208Splitting of specific elements2021-03-30T11:51:53ZDaniel VestergaardSplitting of specific elementsHi,
Does Gmsh provide a direct way of splitting specific elements of a mesh, e.g., as illustrated below? Alternatively, it is possible to specify a rule that all element angles must be less than 90 degrees? Thanks!
![image](/uploads/d1...Hi,
Does Gmsh provide a direct way of splitting specific elements of a mesh, e.g., as illustrated below? Alternatively, it is possible to specify a rule that all element angles must be less than 90 degrees? Thanks!
![image](/uploads/d15f83da2f0ae3d514054d22cb3196d6/image.png)https://gitlab.onelab.info/gmsh/gmsh/-/issues/1209Boundary physical curves disappear after BooleanFragments2021-02-19T08:51:55ZAris TheophilouBoundary physical curves disappear after BooleanFragmentsI am modelling a surface, assumed to represent the semi-infinite space for the ground. The edges (left, right, bottom) are marked as Physical Curves, so as to identify them later and assign boundary conditions. The surface may consist of...I am modelling a surface, assumed to represent the semi-infinite space for the ground. The edges (left, right, bottom) are marked as Physical Curves, so as to identify them later and assign boundary conditions. The surface may consist of more than one medium (Physical Surface). Within the surface there is a Line element. The mesh is obtained using BooleanFragments, so as to ensure compatibility of the Line element with the surface elements. Unfortunately, after using BooleanFragments the Physical Curves assumed to represent the boundaries disappear. How can I keep them?https://gitlab.onelab.info/gmsh/gmsh/-/issues/1216Hobeycomb mesh2021-02-24T22:36:53ZHamidHobeycomb meshHello,
It's not an issue but just a basic question. Does anybody knows the interests/cases of honeycomb type meshes compared to "classical" meshes ?
Best regards.Hello,
It's not an issue but just a basic question. Does anybody knows the interests/cases of honeycomb type meshes compared to "classical" meshes ?
Best regards.https://gitlab.onelab.info/gmsh/gmsh/-/issues/1220Update vtk datafile version to 5.x ?2021-03-02T12:18:28ZGuillaume DolléUpdate vtk datafile version to 5.x ?Hi everyone,
It seems that GMSH currently only support VTK format version 2.0 ?
It would be nice to update the reader/writer to the last VTK version, for datafile version 5.x
For example, Paraview v5.9.0 export to VTK datafile version...Hi everyone,
It seems that GMSH currently only support VTK format version 2.0 ?
It would be nice to update the reader/writer to the last VTK version, for datafile version 5.x
For example, Paraview v5.9.0 export to VTK datafile version 5.1 which can't be read by gmsh 4.7.1.
Best regards
G.https://gitlab.onelab.info/gmsh/gmsh/-/issues/1261Improving mesh quality near sphere/sphere and sphere/wall contact points2021-03-19T05:52:55ZAdam KImproving mesh quality near sphere/sphere and sphere/wall contact pointsI would like to study the diffusion across the porous surface that results from the Boolean subtraction of a set of spheres from a box. At the contact points of the spheres, there are very highly skewed mesh elements. Dixon, in "Systemat...I would like to study the diffusion across the porous surface that results from the Boolean subtraction of a set of spheres from a box. At the contact points of the spheres, there are very highly skewed mesh elements. Dixon, in "Systematic mesh development for 3D CFD simulation of fixed beds: Contact points study" (https://doi.org/10.1016/j.compchemeng.2012.08.011) talked about four options:
1) shrinking particles
2) enlarging particles
3) locally removing a spherical cap near the contact points
4) locally forming a cylindrical bridge
The first two are pretty easy to implement but reduce the accuracy of the final results. The third and fourth are more accurate but require detecting where 2D surfaces are within a certain tolerance and then locally modifying the surfaces.
Does gmsh include any options that force these types of mesh refinements?https://gitlab.onelab.info/gmsh/gmsh/-/issues/1262Discord channel for Gmsh2021-03-18T14:54:00ZFoad S. FarimaniDiscord channel for GmshDear all,
I just wanted to let you know that we have a [#gmsh channel on Elmer's Discord server](https://discord.gg/SXxvTqg). It would be great to have more of you folks over there.
Best,
F.Dear all,
I just wanted to let you know that we have a [#gmsh channel on Elmer's Discord server](https://discord.gg/SXxvTqg). It would be great to have more of you folks over there.
Best,
F.https://gitlab.onelab.info/gmsh/gmsh/-/issues/1267stl file: decrease mesh density?2023-07-27T12:33:06ZClaire Schraenstl file: decrease mesh density?I have a mesh file which size is too important for my solvers. So I would like to decrease the mesh density. I cannot entirely redraw the geometry because this represent weeks of work. So I created a .stl file with only the exterior plat...I have a mesh file which size is too important for my solvers. So I would like to decrease the mesh density. I cannot entirely redraw the geometry because this represent weeks of work. So I created a .stl file with only the exterior plates of the bricks of the previous mesh (see file attached).
- Is it possible to import this .stl file in order to remesh it with a lower density? I only found examples where the existing mesh is conserved and increased.
- Is it possible to delete the existing mesh in order to keep only the geometry and then be able to remesh it?
Thank you for your help,
CS, a beginner user[EQ_LAROCHELLE-TourSaintNicolas-Maillage-Base-V3_surface.zip](/uploads/837dfa089c1e184e14806cd012c565f1/EQ_LAROCHELLE-TourSaintNicolas-Maillage-Base-V3_surface.zip)https://gitlab.onelab.info/gmsh/gmsh/-/issues/1270Representation of scalar fields with glyph isntead of continuous maps2021-03-21T21:59:10ZRenaud SizaireRepresentation of scalar fields with glyph isntead of continuous mapsHello,
I have scalar fields associated to nodes or elements. Is it possible to represent results as glyph instead of continuous maps ? For example, I would like to repreesnt results as :
- 3D coloured sphere on each node,
- 3D coloured ...Hello,
I have scalar fields associated to nodes or elements. Is it possible to represent results as glyph instead of continuous maps ? For example, I would like to repreesnt results as :
- 3D coloured sphere on each node,
- 3D coloured sphere at element center,
- 3D coloured sphere at element corners or Gauss points.
- ...
Regards,
Renaudhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1274return new tags in addNodes/addElements2021-03-23T21:42:25ZJonathan Lambrechtsreturn new tags in addNodes/addElementsIt's handy to pass empty tag vector to model.mesh.addNodes/addElements api but it would be much better if it was possible to get the tags automatically assigned. (especially for addNodes if the new nodes are used to create new elements)....It's handy to pass empty tag vector to model.mesh.addNodes/addElements api but it would be much better if it was possible to get the tags automatically assigned. (especially for addNodes if the new nodes are used to create new elements).
The implementation is trivial but the problem is that it would require an additional (return) argument that would break the existing c++ api.
An option to remain compatible with the the existing api would be to allow the tag vector to be both input and output argument but that requires the introduction of a new mechanism in GenApi.py, I'm not sure it's worth it.https://gitlab.onelab.info/gmsh/gmsh/-/issues/1275MeshOnlyVisible/MeshOnlyEmpty does not protect entities of higher dimension2021-03-23T21:46:35ZJonathan LambrechtsMeshOnlyVisible/MeshOnlyEmpty does not protect entities of higher dimensionmesh.generate(d) destroys meshes of all entities with dimension > d, even if they are not visible and are not bounded by any visible entity (and MeshOnlyVisible is True).mesh.generate(d) destroys meshes of all entities with dimension > d, even if they are not visible and are not bounded by any visible entity (and MeshOnlyVisible is True).https://gitlab.onelab.info/gmsh/gmsh/-/issues/1276"vectorize" mesh size callback [was: move lcCallback from Context to GModel]2021-09-04T14:05:39ZJonathan Lambrechts"vectorize" mesh size callback [was: move lcCallback from Context to GModel]https://gitlab.onelab.info/gmsh/gmsh/-/issues/1286How to control surface mesh quality?2021-03-27T08:41:37Ztang laoyaHow to control surface mesh quality?Dear all,
I have the following code to substract a very small box from a sphere. I generated the surface mesh of the new object, however, the quality of triangles near the small box is very bad, is there any method to control the quality...Dear all,
I have the following code to substract a very small box from a sphere. I generated the surface mesh of the new object, however, the quality of triangles near the small box is very bad, is there any method to control the quality of surface mesh and could anyone help me to take a look the code?
Thanks,
Tang Laoya
```
#include <set>
#include <cmath>
#include <gmsh.h>
#include <GmshMessage.h>
int main(int argc, char **argv)
{
gmsh::initialize();
gmsh::option::setNumber("Mesh.Algorithm", 6);
gmsh::option::setNumber("Mesh.MeshSizeMin", 0.4);
gmsh::option::setNumber("Mesh.MeshSizeMax", 0.4);
double R = 1.4, Rs = R * .7, Rt = R * 1.25;
std::vector<std::pair<int, int> > ov;
std::vector<std::vector<std::pair<int, int> > > ovv;
gmsh::model::occ::addSphere(0, 0, 0, Rt, 2);
double boxwide = 1e-5, boxlen = 1e-4;
gmsh::model::occ::addBox(Rt - boxlen / 2, 0, 0, boxlen, boxwide, boxwide, 10);
gmsh::model::occ::cut({{3, 2}}, {{3, 10}}, ov, ovv, 8);
gmsh::model::geo::addPhysicalGroup(3, {8}, 1);
gmsh::model::occ::synchronize();
gmsh::model::mesh::generate(2);
gmsh::write("substract.msh");
gmsh::finalize();
return 0;
}
```
Another similar case (surface mesh failed):
```
int main(int argc, char **argv)
{
gmsh::initialize();
double R = 1.4, Rs = R * .7, Rt = R * 1.25;
std::vector<std::pair<int, int> > ov;
std::vector<std::vector<std::pair<int, int> > > ovv;
double wr1 = 0.1,wr2=0.08;
gmsh::model::occ::addCylinder(0, 0, 0, 0, 0, 100*R, wr1, 1);
gmsh::model::occ::addCylinder(0, 0, 0, 0, 0, 100 * R, wr2, 2);
gmsh::model::occ::cut({{3, 1}}, {{3, 2}}, ov, ovv, 3);
gmsh::model::geo::addPhysicalGroup(3, {3}, 1);
gmsh::model::occ::synchronize();
gmsh::model::mesh::generate(2);
gmsh::write("longtube.msh");
gmsh::finalize();
return 0;
}
```https://gitlab.onelab.info/gmsh/gmsh/-/issues/1291Boundary layer related questions2023-07-27T07:37:32ZMichael Ermakovermakov@ipmnet.ruBoundary layer related questionsBoundary layers functionality is highly requested for CFD and similar PDE problems. Questions:
1. Extrude { Surface : what is View[expr] purpose? What [expr] means? Please, note in tutorial that this option works only for build-in geome...Boundary layers functionality is highly requested for CFD and similar PDE problems. Questions:
1. Extrude { Surface : what is View[expr] purpose? What [expr] means? Please, note in tutorial that this option works only for build-in geometrical kernel.
2. Is it possible to introduce Extrusion with divergent (convergent) direction field originated from some center? Is is like a translation but in spherical coordinate system.
3. Is it possible to have Transfinite Volume, starting from non-transfinite surface but with side transfinite surfaces?
4. Is it possible to make Extrusion (of Surface) with own vector field?
Thank you very much for replies as well as for the whole project and support.https://gitlab.onelab.info/gmsh/gmsh/-/issues/1294[feature request] please publish .geo and .msh metasyntax notations2021-03-29T11:49:24ZFoad S. Farimani[feature request] please publish .geo and .msh metasyntax notationsFollowing [this post](https://github.com/ElmerCSC/elmerfem/issues/266#issuecomment-808761347) on Elmer's GitHub repository, it would be great if you could publish the EBNF lexer/parser syntax for the `.geo` and `.msh` file formats. Not o...Following [this post](https://github.com/ElmerCSC/elmerfem/issues/266#issuecomment-808761347) on Elmer's GitHub repository, it would be great if you could publish the EBNF lexer/parser syntax for the `.geo` and `.msh` file formats. Not only it will help the Elmer project but I believe many other projects in the field will directly benefit from this. Some linting and syntax highlighting projects, like [this one](https://github.com/SumeetSinha/gmsh-Tools/blob/master/gmsh.YAML-tmLanguage), could be used as a starting point. There are also many other examples [here on the ANTLR repository](https://github.com/antlr/grammars-v4).https://gitlab.onelab.info/gmsh/gmsh/-/issues/1304Element layers not mantained in the 3D mesh2021-04-07T07:29:38ZMLElement layers not mantained in the 3D meshHello,
Here's my script:
`SetFactory("OpenCASCADE");
s=0.01;
//Well 01
Point(2) = {0, 0, 0, s};
Point(3) = {0, 60, 0, s};
Point(5) = {60, -40, 0, s};
Point(6) = {-60, -40, 0, s};
Line(1) = {2, 3};
Line(2) = {2, 6};
Line(3) ...Hello,
Here's my script:
`SetFactory("OpenCASCADE");
s=0.01;
//Well 01
Point(2) = {0, 0, 0, s};
Point(3) = {0, 60, 0, s};
Point(5) = {60, -40, 0, s};
Point(6) = {-60, -40, 0, s};
Line(1) = {2, 3};
Line(2) = {2, 6};
Line(3) = {6, 3};
Line(4) = {5, 3};
Line(5) = {5, 2};
Line(6) = {6, 5};
//Top well
Line Loop(1) = {3, 1, 2};
Plane Surface(1) = {1};
Line Loop(2) = {5, 1, 4};
Plane Surface(2) = {2};
Line Loop(3) = {6, 5, 2};
Plane Surface(3) = {3};
Extrude {0, 0, -3500} {
Surface{3}; Surface{2}; Surface{1}; Layers{8};
}
//Well 02
Point(1) = {707, 707, 0, s};
Point(20) = {707, 767, 0, s};
Point(21) = {767, 667, 0, s};
Point(22) = {647, 667, 0, s};
Line(17) = {20, 1};
Line(18) = {1, 21};
Line(19) = {21, 20};
Line(20) = {20, 22};
Line(21) = {22, 1};
Line(22) = {22, 21};
Line Loop(14) = {20, 21, 17};
Plane Surface(13) = {14};
Line Loop(15) = {18, 19, 17};
Plane Surface(14) = {15};
Line Loop(16) = {22, 18, 21};
Plane Surface(15) = {16};
Extrude {0, 0, -3500} {
Surface{15}; Surface{13}; Surface{14}; Layers{8};
}
//Box model
Point(27) = {5000, 5000, 0, s};
Point(28) = {-5000, -5000, 0, s};
Point(29) = {5000, -5000, 0, s};
Point(30) = {-5000, 5000, 0, s};
Line(33) = {28, 30};
Line(34) = {27, 30};
Line(35) = {28, 29};
Line(36) = {29, 27};
Line Loop(26) = {34, -33, 35, 36};
Plane Surface(25) = {26};
Extrude {0, 0, -3450} {
Surface{25};
}
Extrude {0, 0, -100} {
Surface{30};
}
Extrude {0, 0, -100} {
Surface{35}; Layers{1};
}
Extrude {0, 0, -100} {
Surface{40}; Layers{1};
}
Extrude {0, 0, -1000} {
Surface{45}; Layers{2};
}
BooleanFragments { Volume{7,8}; Delete; }{ Volume{1:6}; Delete; }
//Lateral surface
Physical Surface(1) = {48, 56, 84, 38, 43};
//Top surface
Physical Surface(2) = {54};
//Well01 Injection
Physical Surface(3) = {72, 76, 79};
//Well02 Production
Physical Surface(4) = {70, 67, 63};
//Bottom surface
Physical Surface(5) = {50};
//Lateral surface
Physical Surface(6) = {49, 44, 39, 82, 52};
//Lateral surface
Physical Surface(7) = {46, 41, 36, 81, 51};
//Lateral surface
Physical Surface(8) = {47, 42, 37, 83, 53};
//Caprockout
Physical Volume(1) = {12};
//Basement
Physical Volume(2) = {11};
//ReservoirLayer3
Physical Volume(3) = {10};
//ReservoirLayer2
Physical Volume(4) = {9};
//ReservoirLayer3
Physical Volume(5) = {19};
//Well01
Physical Volume(6) = {24};
Physical Volume(7) = {23};
Physical Volume(8) = {25};
Physical Volume(9) = {16};
Physical Volume(10) = {17};
Physical Volume(11) = {18};
//Well02
Physical Volume(12) = {13};
Physical Volume(13) = {14};
Physical Volume(14) = {15};
Physical Volume(15) = {20};
Physical Volume(16) = {21};
Physical Volume(17) = {22};
Mesh.Algorithm = 1;
Mesh.Algorithm3D= 1;
Mesh.RecombinationAlgorithm = 0;
Mesh.CharacteristicLengthMin = 200;
Mesh.CharacteristicLengthMax = 5000;
`
I assign 8 as number of elements' layers to the wells structure(the prisms embedded in the box model), but the 3D mesh contains only 2 layers of elements in the prisms while the box has more layers. How can I fix it?
I also tried to set the element layers in the box model, but it ends with errors.
Thank you.https://gitlab.onelab.info/gmsh/gmsh/-/issues/1313GMSH 3D mouse controls slow but only after moving mouse2023-09-05T08:02:28ZAlexandruGMSH 3D mouse controls slow but only after moving mouseThis is something has been forever there but only now I decided to write about it, since I use the GMSH 3D interface more and more these days.
Short description: GMSH 3D mouse controls slow but only after moving mouse
Load a larger STE...This is something has been forever there but only now I decided to write about it, since I use the GMSH 3D interface more and more these days.
Short description: GMSH 3D mouse controls slow but only after moving mouse
Load a larger STEP file an try to do something with the mouse (e.g. rotate the wheel to zoom in or out or drag left button to rotate the view).
At least on Windows, the behavior is like this:
If the mouse is not moved before the above actions take place, the UI reacts smootly.
If the mouse is moved (hovered) above the 3D area and then the action takes place, the UI reacts with a specific amount of delay, depending on the model size.
Could somebody test this and confirm?
Thanks
Alexandruhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1319Translate and/or rotate of Duplicata of extruded volume does not preserve lay...2021-04-17T18:20:23ZRuth SabariegoTranslate and/or rotate of Duplicata of extruded volume does not preserve layers...Hi,
I want a structured mesh so I went for Transfinite and Extrude with Layers.
I also activated
Geometry.CopyMeshingMethod = 1;
The result is that the surfaces I extruded kept the mesh when duplicating them, but the volume itself ha...Hi,
I want a structured mesh so I went for Transfinite and Extrude with Layers.
I also activated
Geometry.CopyMeshingMethod = 1;
The result is that the surfaces I extruded kept the mesh when duplicating them, but the volume itself has lost the 'Layers' of the original.
Is this the expected behaviour?
Is there a simple way of fixing this without generating the volumes from scratch?
Thanks in advance for any suggestion!
(I may share the geometry if useful...)https://gitlab.onelab.info/gmsh/gmsh/-/issues/1321problem with BooleanIntersect results2023-07-31T14:47:46ZMarco Antolovicproblem with BooleanIntersect resultsHi all,
I have a problem with BooleanIntersect results.
Assume I'm using a plane to slice a volume.
The volume is the object and the plane is the tool.
If I delete both the object and the tool in BooleanIntersect everything is fine, ...Hi all,
I have a problem with BooleanIntersect results.
Assume I'm using a plane to slice a volume.
The volume is the object and the plane is the tool.
If I delete both the object and the tool in BooleanIntersect everything is fine, results are as expected.
If I delete only the tool the output is missing a solution.
I have prepared a small script to explain this.
In the script you have a menu with two choices
1. "Delete object and tool"
2. "Delete tool only"
The output can be seen in the message window
The choice that works as expected (returning two surfaces) is "Delete object and tool"
The other one returns only one surface.
My understanding is that results should be the same in both cases.
Any help on this?
Thanks,
Marco
[4_layers_V03.step](/uploads/4e779bd903f89b12000c1f2d9bb9954a/4_layers_V03.step)
[problem.geo](/uploads/a9bf12a22d99862132df87964a79bfdc/problem.geo)https://gitlab.onelab.info/gmsh/gmsh/-/issues/1327Fragmentation operation on two surfaces2023-07-31T14:47:20ZHari AggrawalFragmentation operation on two surfaces![Screenshot_2021-04-22_at_6.28.19_PM](/uploads/13570f105efeac9ff37f0327b35be79b/Screenshot_2021-04-22_at_6.28.19_PM.png)
Hi, I am performing fragmentation operations on surfaces that should result in holes on the main outer surface. It...![Screenshot_2021-04-22_at_6.28.19_PM](/uploads/13570f105efeac9ff37f0327b35be79b/Screenshot_2021-04-22_at_6.28.19_PM.png)
Hi, I am performing fragmentation operations on surfaces that should result in holes on the main outer surface. It is working alright for 61 cases but 3.
I have tried adjusting Geometry.ToleranceBoolean, but it did not help. But, sometimes the problem goes away by adjusting the radius of holes.
To cut a circular hole, I am first creating spheres and extracting the surfaces of them. After that, I am performing fragmentation operations between sphere surfaces and the main body surface.
May I know the possible sources of errors?
I really appreciate your help. Thanks.
Harihttps://gitlab.onelab.info/gmsh/gmsh/-/issues/13283D mesh parallelization2023-07-31T14:45:42ZHamid3D mesh parallelizationHello Christophe,
I was exploring the source code of gmsh and i notice that the 3d meshing doesn't use openmp for multithreading the main loop over volumes, is there a reason ?
Best regards.Hello Christophe,
I was exploring the source code of gmsh and i notice that the 3d meshing doesn't use openmp for multithreading the main loop over volumes, is there a reason ?
Best regards.https://gitlab.onelab.info/gmsh/gmsh/-/issues/1329ANN (nearest neighbor) warning2021-04-24T06:37:42ZEmmanuel RodriguezANN (nearest neighbor) warningHi,
I'm using in a .geo file the flowing line in order to have the same vertex on both faces :
`Periodic Surface {2} = {1} Translate {x,0,0};`
but when I generate my 3D mesh with gmsh -3 myfile.geo. The folowing warning appear :
**...Hi,
I'm using in a .geo file the flowing line in order to have the same vertex on both faces :
`Periodic Surface {2} = {1} Translate {x,0,0};`
but when I generate my 3D mesh with gmsh -3 myfile.geo. The folowing warning appear :
**Warning : Gmsh must be compiled with ANN support for finding closest vertices**
I saw that ANN is supposed to be enable by default. How can I activate it? I'm using the ubuntu xenial package gmsh.
Thankshttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1339How to disable vertex snapping with the booleanDifference option2023-07-31T14:47:36ZThijs EgelmeersHow to disable vertex snapping with the booleanDifference optionHello, I am trying to make a cube with fibers in the cube. The fibers consist of a cylinder + 2 spheres at the heads of the cylinder. These are made with booleanUnion.
Then the fibers are subtracted (booleanDifference) from the cube. It...Hello, I am trying to make a cube with fibers in the cube. The fibers consist of a cylinder + 2 spheres at the heads of the cylinder. These are made with booleanUnion.
Then the fibers are subtracted (booleanDifference) from the cube. It should be possible for the fibers to be only partly in the cube. See the figure Fig1 in the attachement. I have a feeling that at random this booleanDifference fails. What happens is shown in Fig2. In my output file I can see the following: " Info : Snapping geometry vertex 16 to curve control point (dist = 0.14277) " That control point is exactly a point on that cylinder. This ensures that some elements stick out on the cube surface. So I want to disable the snapping of this geometry vertex... I just want the part of the sphere to be correctly in the cube.
I have tried exploring many options, see below but non seem to solve the problem:
RefineMesh;
Mesh.SecondOrderLinear=1;
Geometry.OCCBoundsUseStl = 1;
Geometry.ToleranceBoolean = 1e-20;
Geometry.MatchGeomAndMesh = 1;
Geometry.Tolerance = 1e-4;
Geometry.OCCAutoFix = 0;
Geometry.OCCFixSmallEdges = 1;
Geometry.OCCFixSmallFaces = 1;
Appart from that I want make it more robust by decreasing the mesh size to a very low number, but I try to avoid that.
![Fig1](/uploads/326f86873334d865027fa42f4df0e02c/Fig1.PNG)
![Fig2](/uploads/4f865ee448dcc88210f2076743931a23/Fig2.PNG)
See below for my outputfile, and meshfiles. Note that in these debug files I have commented out the periodic boundary conditions.
[debug.geo](/uploads/e054bca1a138bd445f25ff8b54385f85/debug.geo)
[mesh_debug.msh](/uploads/13ee7f4b21d08c0a43e30aba643fcf42/mesh_debug.msh)
[openCASCADE_SpheroCylinders_in_cube_debug.igo](/uploads/3215e662a5c293e0404202f9e21a8baa/openCASCADE_SpheroCylinders_in_cube_debug.igo)
[outputmesh_debug.out](/uploads/e38a8c8d07f4bc4d8f6622ef41c93961/outputmesh_debug.out)
I really hope, you can help me
cheers,
Thijshttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1346Problem with Boolean Fragments and excess surfaces2021-05-05T12:58:54ZMarkus VoglerProblem with Boolean Fragments and excess surfacesHello,
I already posted a probelm about closing airgaps in a split geometry automatically. I already managed to split a 3D Geometry in half and extracting the cut-surfaces. Now i want to close the "empty surfaces" which emerge from the...Hello,
I already posted a probelm about closing airgaps in a split geometry automatically. I already managed to split a 3D Geometry in half and extracting the cut-surfaces. Now i want to close the "empty surfaces" which emerge from the air-filled volumes of the 3D-Model. I attacehd a picture to show what I mean. I combined the emerging srurfaces into a physical surface which I named "solids" to keep them apart from each other.
![image](/uploads/30d94931cac31df8e4102a0b6d072758/image.png)
My goal is to have one physical surface called "solids" and one that is called "air_gaps". One of you already gave me a hint to use a plane surface in combination with the boolean fragment operator to close the gaps. I tried that and it works just fine and pretty fast as well. But as I look closer, this operation messes up my physical entities. There is no clear seperation of my "solids" and the freshly emerged "air-gaps" because the operation causes the solids to be doubled as I do not want to delete them in the process. To summarize it:
Is there a possibility to use the boolean fragement operator in a way that I end up with 2 physical entites (solids and air_gaps), the surface which I "fragemented" the solids with can be deleted afterwards.
Any help is highly appreciated and would help me a lot!! Thankshttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1350AutomaticMeshSizeField2021-08-05T21:26:54ZHamidAutomaticMeshSizeFieldI try to use the AutomaticMeshSizeField field but i get this error when meshing :
`.Error : Gmsh has to be compiled with HXT and P4EST for using automaticMeshSizeField`
1 - I check in the about dialog and gmsh binaries are compiled w...I try to use the AutomaticMeshSizeField field but i get this error when meshing :
`.Error : Gmsh has to be compiled with HXT and P4EST for using automaticMeshSizeField`
1 - I check in the about dialog and gmsh binaries are compiled with HXT, but no mention about P4EST...
2 - i can't see any hxt_octree.h in the contrib/hxt folder of the master or 4.8.3 git branches...https://gitlab.onelab.info/gmsh/gmsh/-/issues/1358Slow graphical interaction for element selection2023-09-05T08:02:28ZNicolas MERIGOUXSlow graphical interaction for element selectionHi,
I've been using Gmsh for a few years now and since the last versions (I'd say 4.x, but I'm not exactly sure), the element selection (for example when selecting surfaces to add to physical groups) is running very slow. I've to wait a ...Hi,
I've been using Gmsh for a few years now and since the last versions (I'd say 4.x, but I'm not exactly sure), the element selection (for example when selecting surfaces to add to physical groups) is running very slow. I've to wait a few seconds between a click and the effective selection, while it was almost instantaneous in oldest versions. I'm currently using version 4.8.4 but the problem appears before.
I tried to change the default rendering options without success. So if you have any idea...
Thanks in advance !https://gitlab.onelab.info/gmsh/gmsh/-/issues/1362Request to include OpenFOAM mesh format in the export options2021-05-19T18:15:40ZZaki EL KHOURYRequest to include OpenFOAM mesh format in the export optionsHello,
I'am a user of gmsh and OpenFOAM, but to use gmsh format i need to convert it in OpenFOAM (that onlu support VERSION II gmsh format). I hope that gmsh will include a direct export in OpenFOAM format in the future as OpenFOAM has ...Hello,
I'am a user of gmsh and OpenFOAM, but to use gmsh format i need to convert it in OpenFOAM (that onlu support VERSION II gmsh format). I hope that gmsh will include a direct export in OpenFOAM format in the future as OpenFOAM has a large users community that could benefit from this development.
Regards
Zaki EL KHOURYhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/14103D surface mesh : curvature adaption problem2021-06-10T09:34:26ZLionel Wilhelm3D surface mesh : curvature adaption problemhello everyone,
I'm trying to create the surface mesh of a 3D hydrofoil with gmsh but I have some troubles with curvature adaption.
![image](/uploads/1afe185d87532f490f1cbfd13c9247a0/image.png)
It seems the software does not see the hi...hello everyone,
I'm trying to create the surface mesh of a 3D hydrofoil with gmsh but I have some troubles with curvature adaption.
![image](/uploads/1afe185d87532f490f1cbfd13c9247a0/image.png)
It seems the software does not see the high curvature region near the leading edge and does not refine the mesh there. A workaround is to add a small face around the leading edge in the geometry (see top foil on the image) and then everything is meshed properly. I'm just trying to figure out if :
- I'm making a wrong use of the software
- I do not really understand what "curvature adaption" is
- there is a small bug in the software.
I used the Python API to import a step file and mesh it :
file = "wings_example_solid"
step_file = file+'.stp'
stl_file = file+'.stl'
import gmsh
gmsh.initialize()
gmsh.option.setNumber("Mesh.MeshSizeMax",20)
gmsh.option.setNumber("Mesh.MeshSizeFromCurvature",20) # number of elements on a circle's boundary
gmsh.option.setNumber("Mesh.Algorithm", 6) # Frontal-Delaunay
gmsh.model.occ.importShapes(step_file,format="step")
gmsh.model.occ.synchronize()
gmsh.model.mesh.generate(2) # surface mesh
gmsh.write(stl_file)
gmsh.clear()
Do you have an idea of what is happening ?
Thanks in advance,
Kindly,
Lionelhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1414Python module installation using CMake2021-09-06T08:48:23ZLuis C. Pérez TatoPython module installation using CMakeHi there.
I've installed Gmsh from sources using CMake, and it works perfectly fine except in regard to the Python module. The files `gmsh.py` is copied into the `/usr/local/lib/` folder (I'm using Ubuntu 20.04) instead of being install...Hi there.
I've installed Gmsh from sources using CMake, and it works perfectly fine except in regard to the Python module. The files `gmsh.py` is copied into the `/usr/local/lib/` folder (I'm using Ubuntu 20.04) instead of being installed in the corresponding `/usr/local/lib/pythonX.Y/dist-packages/` directory. I've taken a look at the `CMakeLists.txt` file and apparently CMake is simply doing what it is instructed to do.
I have some experience writing [Python scripts](https://github.com/xcfem/xc/blob/master/python_modules/setup.py) which install Python modules from source code. If that's OK with you, I can prepare a pull request with a similar solution for Gmsh.
Thanks for your great work.https://gitlab.onelab.info/gmsh/gmsh/-/issues/1418Points outside plane after boolean fragments2023-07-31T11:48:18ZMarkus VoglerPoints outside plane after boolean fragmentsHello I have a problem regarding the boolean fragment operator. I want to use it to split a cylindricl 3D part into an axisymmetric 2D Plane. The problem is, that after the splitting process there are points outside of the surface which ...Hello I have a problem regarding the boolean fragment operator. I want to use it to split a cylindricl 3D part into an axisymmetric 2D Plane. The problem is, that after the splitting process there are points outside of the surface which makes the axissymmetric function not useable. It says that the axis has to be at z=x=0 with a tolerance of 10e-6. The points are outside 0.003 mm so it does only work by changing the tolerance. Is this possible or not the best way to do it. The following screenshot shows the point which are outside to visualize the Problem:
![image](/uploads/9f871764ac14d639f8c6b2ae32e98069/image.png)
Thanks in advance for helphttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1460Way to split prismatic cells on side surfaces of extruded volume to tetrahedr...2022-06-08T06:02:15ZJack WongWay to split prismatic cells on side surfaces of extruded volume to tetrahedral cellsHi all,
I am using gmsh to prepare a CFD model. I notice when I reduce the mesh size field, I start to get some "zero volume" and highly skewed elements. (I use openFoam to check the mesh quality).
I also started getting some warnings...Hi all,
I am using gmsh to prepare a CFD model. I notice when I reduce the mesh size field, I start to get some "zero volume" and highly skewed elements. (I use openFoam to check the mesh quality).
I also started getting some warnings like:
```
Info : Meshing surface 444 (Plane, Delaunay)
Warning : Converged at iter. 3 for initial guess (0,0) with uv error = 6.29696e-21, but xyz error = 2000 in point (0.000000e+00, 0.000000e+00, 0.000000e+00) on surface 413
Info : [ 10%] Meshing curve 40 (Discrete curve)
Warning : Closest point failed, computing from parametric coordinate
```
The netgen optimization seems to fix the issue. However, for my model, I need to connect an unstructured mesh to the side of an extruded surface. And netgen skips the hybrid mesh (mix of prisms and tets?).
Is there any way I can apply netgen to my model?
![8](/uploads/8221e2bbe0ee4e031a17f72a617c2c10/8.JPG)
Thanks,
Jackhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/1468Issues when incrementally meshing OpenCascade shapes2023-07-31T11:48:29ZPaul le RouxIssues when incrementally meshing OpenCascade shapesHi
We are trying to mesh a complicated structure incrementally. It is not feasible for us to mesh everything at once since we use the intermediate mesh results to calculate a new mesh size field for the next part. I've constructed a sim...Hi
We are trying to mesh a complicated structure incrementally. It is not feasible for us to mesh everything at once since we use the intermediate mesh results to calculate a new mesh size field for the next part. I've constructed a simplified example that showcases our problem.
The code is included in the attached cpp file, [GmshBug001.cpp](/uploads/1520542e913e116f3e8f15bc0a6c0a25/GmshBug001.cpp). The console output is included in the attached log file, [GmshBug001.log](/uploads/0fcc24ceef4621a7b485754fe0f09878/GmshBug001.log).
The wireframe for the geometry is shown in the following image.
![image](/uploads/a9d5721cad0e4a79b3623b31bfc65321/image.png)
The center cube is not part of the computational domain. Only the left cube, right cube and the surrounding volume inside the bounding box. Generated by the program is the brep file, which I've also attached for convenience, [gmsh_bug_001.brep](/uploads/902e45731b26f242815b14cb525a0cf6/gmsh_bug_001.brep).
There are two issues in this example.
1. The already meshed surfaces (1, 2, 3, 4) are re-meshed even though their geometry hasn't changed. The curves do not seem to have this issue and are correctly skipped when meshing subsequent parts.
2. The crash when trying to mesh the right cube. If the mesh is generated all at once, then no crash occurs.
Any guidance and/or assistance will be greatly appreciated.https://gitlab.onelab.info/gmsh/gmsh/-/issues/1478Converting Gmsh node ordering in higher-order hex elements to VTK node ordering2021-07-27T11:41:36ZJan KiviahoConverting Gmsh node ordering in higher-order hex elements to VTK node orderingI'm trying to visualize higher-order elements created by Gmsh in Paraview using VTK's arbritrary-order Lagrange elements. But I'm running into trouble juggling the different node orderings. I have Gmsh exporting an ASCII VTK file with wh...I'm trying to visualize higher-order elements created by Gmsh in Paraview using VTK's arbritrary-order Lagrange elements. But I'm running into trouble juggling the different node orderings. I have Gmsh exporting an ASCII VTK file with what I presume is Gmsh's local node ordering. VTK expects a [different local ordering](https://blog.kitware.com/modeling-arbitrary-order-lagrange-finite-elements-in-the-visualization-toolkit/) of the nodes, so I have to bridge the two. On the VTK side, I have a method `PointIndexFromIJK` from `vtkHigherOrderHexahedron` class that allows me to build a map from the IJK coordinates of a node to its corresponding index in the VTK local ordering. Is there a similar method on the Gmsh side---maybe one I missed when I was looking through the `MHexahedronN` class---that will allow me to build a similar map between IJK coordinates and the index in Gmsh local ordering?
In short, is there anything in Gmsh that could help me unscramble my elements?
![scrambled_elements](/uploads/f937743bf7ac47d6d4bdaaede003013f/scrambled_elements.png)