gmsh issueshttps://gitlab.onelab.info/gmsh/gmsh/-/issues2023-01-05T15:52:20Zhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/2256Fortran API compilation error with ifort (version 2021.7.1)2023-01-05T15:52:20ZXushan LuFortran API compilation error with ifort (version 2021.7.1)When compiling the Fortran API (gmsh.f90) with ifort, I am seeing the following compilation errors:
```
/usr/local/include/gmsh.f90(950): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actua...When compiling the Fortran API (gmsh.f90) with ifort, I am seeing the following compilation errors:
```
/usr/local/include/gmsh.f90(950): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is \
an element of an array that is not assumed shape, pointer, or polymorphic. [FILENAME]\
call C_API(fileName=istring_(fileName), &\
---------^
```
To me, It seems that the issue here is caused by passing `istring_(fileName)` to C_API. Creating a new variable and assigning the result of the function to the variable, then passing the new variable into C_API does not yield any errors. For example, the following code works with ifort:
```fortran
character(GMSH_API_MAX_STR_LEN, kind=c_char) :: fileNameC
fileNameC = istring_(fileName)
call C_API(fileName=trim(fileNameC), &
ierr_=ierr)
```
There might be other better fixes to this problem but the above fix is at least something clearly working.https://gitlab.onelab.info/gmsh/gmsh/-/issues/2254Importing complex BRep geometry from step files2023-07-31T11:22:27ZLaura LeonardiImporting complex BRep geometry from step filesDear @geuzaine ,
I am using a step file to introduce geometry in gmsh. I am having some issues with the gable walls. In particular, I can access and mesh surfaces as 2d elements but I don't get the volumes (see pic).
![image](/uploads...Dear @geuzaine ,
I am using a step file to introduce geometry in gmsh. I am having some issues with the gable walls. In particular, I can access and mesh surfaces as 2d elements but I don't get the volumes (see pic).
![image](/uploads/d4f4ac363229ac5edcf135fe7181021d/image.png)
To perform finite element analysis for the scope of my Ph.D. I need to mesh these elements in 3D using tetraedron elements. I wondered if it was possible to collect the 2D geometry in gmsh and generate volumes starting from it so that I can mesh. I tried this:
```
gmsh.initialize()
# Create a new model
gmsh.model.add("example")
entities = gmsh.open("converted.step")
# Print the entity tags
for e in entities:
print(e[0])
# Add the surface entities to the model
surfaces = []
for e in entities:
if e["dim"] == 2:
# Create a surface from the entity's geometry and add it to the model
surfaces.append(gmsh.model.occ.addSurface(e["geometry"]))
# Create a surface filling from the surfaces
sf = gmsh.model.geo.addSurfaceFilling(surfaces)
# Create a volume from the surface filling
v = gmsh.model.geo.addVolume([sf])
# Generate and draw the model
gmsh.model.geo.synchronize()
gmsh.fltk.run()
# Finalize the model
gmsh.finalize()
```
But the output is the following error:
```
Traceback (most recent call last):
File "c:/Users/mlaur/Desktop/JanuaryCode/ProjectMesh.py", line 120, in <module>
for e in entities:
TypeError: 'NoneType' object is not iterable
```
Do you have some hints?
Regards,
Maria Laura Leonardihttps://gitlab.onelab.info/gmsh/gmsh/-/issues/2250Merge Two Large Adjacent Meshes at Boundary Face2023-01-01T04:20:12ZConnor McClellanMerge Two Large Adjacent Meshes at Boundary FaceHello, I’m trying to merge two large 3D independently meshed volume meshes at a single face, such that there is only overlap at that face and the nodes aren’t guaranteed to overlap. I could obviously retriangulate with Delaunay the entir...Hello, I’m trying to merge two large 3D independently meshed volume meshes at a single face, such that there is only overlap at that face and the nodes aren’t guaranteed to overlap. I could obviously retriangulate with Delaunay the entire merged mesh, but that would be very wasteful since I only need to retriangulate the boundary face. Is there a way with gmsh that I can force retriangulation on only the boundary nodes? Perhaps I need to select the boundary nodes and all nodes within some alpha distance from the boundary, triangulate that and then merge that into the larger mesh.
Below is an example of two meshes I would like to stitch together.
![mesh_example](/uploads/a06ef6797d27f168c0a322b46efbc875/mesh_example.png)
Thanks!https://gitlab.onelab.info/gmsh/gmsh/-/issues/2242Verifying results across architectures, for SPEC benchmarking2023-08-10T16:47:05ZMahesh MadhavVerifying results across architectures, for SPEC benchmarking@geuzaine Thanks for willing to look at some reproducibility issues. The big challenge in crafting benchmarks is making sure they produce the same result across architectures and compiler optimization levels. I'm attaching the output fro...@geuzaine Thanks for willing to look at some reproducibility issues. The big challenge in crafting benchmarks is making sure they produce the same result across architectures and compiler optimization levels. I'm attaching the output from one of the example files, bubble_interphase_layers.geo. I am using this as the "test" input, and since it is quick to run I hope it is easy to debug.
[gmsh_verification.tar.gz](/uploads/0a7f03107ce51c18235f4ffdeb9eacff/gmsh_verification.tar.gz)
We started with this snapshot of gmsh and put it into the SPEC harness:
`Gmsh 4.11.0-git-5aea61f4c`
The directories here "aarch64" and "x86-64" contain the output from running the cmdline below.
```
$ gmsh -option gmsh.opts -smooth 0 -2 bubble_interphase_layers.geo > bubble_interphase_layers.geo.out
```
I have transferred the code into the SPEC harness and have used gcc-12.1 and -O0 optimization level to build for now. We make sure to build all the files with...
```
-fno-unsafe-math-optimizations -ffp-contract=off
```
...since numeric/robustPredicates.cpp requires that relaxation. SPEC run rules indicate that all source files must be compiled with the same optimization flags.
I copied all the relevant output files and saved them in each directory inside the tarball. I took the final .msh generated and plotted it using the visualization tool you offer for download (gmsh.exe binary with CAD for Windows), and that is the .png file in each directory. It is clear that the work was accomplished, albeit with some small differences.
I then downloaded the latest mainline, built on aarch64 and ran again on the same input. This led to a third slightly different result, and the result is in the "aarch64-mainline" directory. (This confused me even more).
I would love help on isolating the cause of the differences. Alternatively, if you have another idea on how to verify across many architectures that the work was completed satisfactorily, we are open to these ideas. For example, I tried doing an image compare on the YUV files below which told me they are 90% similar, pixel to pixel. Good enough perhaps?
For example, can you spot the 100000 differences between these two images? :innocent:
![bubble_interphase_layers-x86-64](/uploads/fee1ca8791659bd49504030965599384/bubble_interphase_layers-x86-64.png)
![bubble_interphase_layers-aarch64](/uploads/94b2fafdf126079a63695db7a84c7f54/bubble_interphase_layers-aarch64.png)Christophe GeuzaineChristophe Geuzainehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/2241Memory accumulation in python kernel2023-03-01T20:52:24ZChristian HesseMemory accumulation in python kernelHello, thanks a lot for the effort you put into gmsh. I´m working with the python api for a while now and really enjoy beeing able to automatically set up large simulation models or use it in design optimizations.
I have come across a m...Hello, thanks a lot for the effort you put into gmsh. I´m working with the python api for a while now and really enjoy beeing able to automatically set up large simulation models or use it in design optimizations.
I have come across a memory problem when calling gmsh multiple times during one python session. In the attached minimal example I emulate the behaviour by meshing the same model multiple times. The memory seems to accumulate after each mesh generation process until about 12Gb of memory are used by the python kernel at the end.
At a certain point restarting the python kernel is therefore inevitable.
Is there a way to explicitly free up the memory on finalizing (gmsh.finalize()) each gmsh session?
Thanks!
[minimal_meshing.ipynb](/uploads/c4907d409f4a4d54e4b18ecbb87f1bb8/minimal_meshing.ipynb)
[sidewall.brep](/uploads/f129af3c636cd7591d703a9eb863e9cd/sidewall.brep)Maxence ReberolMaxence Reberolhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/2240Unable to mesh BREP with GMSH 42023-07-31T11:23:28ZKarim JezzineUnable to mesh BREP with GMSH 43D mesh of BREP is ok with GMSH 3.06 but fails in GMSH 4.11.0 with message "error : no elements in volume 1". Geo file and Brep file with both log files are attached [bug_gmsh_3_4.7z](/uploads/d77cd913df356c21e6c0e18413177de8/bug_gmsh_3_...3D mesh of BREP is ok with GMSH 3.06 but fails in GMSH 4.11.0 with message "error : no elements in volume 1". Geo file and Brep file with both log files are attached [bug_gmsh_3_4.7z](/uploads/d77cd913df356c21e6c0e18413177de8/bug_gmsh_3_4.7z).https://gitlab.onelab.info/gmsh/gmsh/-/issues/2238Gmsh of STL with recombine appears to generate Tri and Quad Facets with area...2023-07-27T12:16:11ZKeith SloanGmsh of STL with recombine appears to generate Tri and Quad Facets with area which is zero or negativeWe are trying to mesh as an STL and recombine the attached object ([TestShield_Gmsh_MinBrep.brep](/uploads/09950fed9c20674f56a550c205da35ca/TestShield_Gmsh_MinBrep.brep) Saved as Brep)
When we process the Mesh using our workbench in Fre...We are trying to mesh as an STL and recombine the attached object ([TestShield_Gmsh_MinBrep.brep](/uploads/09950fed9c20674f56a550c205da35ca/TestShield_Gmsh_MinBrep.brep) Saved as Brep)
When we process the Mesh using our workbench in FreeCAD it looks like a number of the Tri and Quad Facets have areas of zero and some negative.
see FreeCAD report View[TestShield-ReportView.txt](/uploads/62a9a71576363b42f4f6de825e2bc8d2/TestShield-ReportView.txt) At present we ignore such Facets
but that does not give us much confidence in the Mesh.
We are also having problems with Geant4 not happy about various aspects of a number of facets. In the FreeCAD report view you will see a number of
failures on creation of Quads ( Due to being non Planar - we suspect ). In these cases we try to create as two triangles. It would help with our debugging
if there was an option in Gmsh to only produce Quads which are planar.
Script with what we believe is the same parameters as using the Gmsh python lib in FreeCAD
[testMinGmsh.py](/uploads/9ae07f4a4106026991b1a989230f499d/testMinGmsh.py)
Other files
[TestShield_Gmsh_MinStl.stl](/uploads/b9a92315df3d6928ed9019ce93eb3eec/TestShield_Gmsh_MinStl.stl)
[TestShield_Gmsh_MinMsh.msh](/uploads/a7769be9050c68dc8ce466efc67c571e/TestShield_Gmsh_MinMsh.msh)https://gitlab.onelab.info/gmsh/gmsh/-/issues/2218Physical names when loading brep files2024-02-01T13:58:20ZPericles PhilippopoulosPhysical names when loading brep filesI was wondering how the information about physical groups/names is stored when using OpenCascade and .brep files. I would expect that when the geometry is loaded from a .brep file, we could, in principle, recover the physical names from ...I was wondering how the information about physical groups/names is stored when using OpenCascade and .brep files. I would expect that when the geometry is loaded from a .brep file, we could, in principle, recover the physical names from the generating .geo file.
As an example, I use the .geo file, [cylinder.geo](/uploads/f855d562e52061911cc446323fc32347/cylinder.geo), which labels certain entities (e.g. "channel") which I can view using options -> Geometry.
When I later load the .brep generated from this .geo file, [cylinder.brep](/uploads/1e193078675f376d5c5c50c7e893377d/cylinder.brep), and apply the same options, no physical names are visible. Moreover, if I mesh the geometry generated by the .brep, the physical names do not appear in my .msh2 file.https://gitlab.onelab.info/gmsh/gmsh/-/issues/2211Poor graphical performance2023-09-05T08:02:27ZVladimír HricPoor graphical performanceHi,
I compiled Gmsh in Windows using mingw64 with GUI FLTK.
I have Nvidia RTX 3080 Mobile. Even with 200k cells in 3D, the movement with mesh is not very fluent.
Antialliasing does nothing as well.
Are there any tips to use full power of...Hi,
I compiled Gmsh in Windows using mingw64 with GUI FLTK.
I have Nvidia RTX 3080 Mobile. Even with 200k cells in 3D, the movement with mesh is not very fluent.
Antialliasing does nothing as well.
Are there any tips to use full power of CPU/GPU?https://gitlab.onelab.info/gmsh/gmsh/-/issues/2203Error : PLC Error: A segment and a facet intersect at point2023-07-03T10:52:54ZbuzhiqiuyuebaiError : PLC Error: A segment and a facet intersect at pointI use a mesh file to get a volume, but encounter this problem, the file I use can be found in this link, https://github.com/buzhiqiuyuebai/J20
the details about error message in `J20errorlog` file. By the way, does gmsh support viewing t...I use a mesh file to get a volume, but encounter this problem, the file I use can be found in this link, https://github.com/buzhiqiuyuebai/J20
the details about error message in `J20errorlog` file. By the way, does gmsh support viewing the minimum grid size and how to view.
![image](/uploads/526bee8b36cef5886b920f04752024b7/image.png)https://gitlab.onelab.info/gmsh/gmsh/-/issues/2202Two crack plugin issues2022-12-08T11:54:22ZStephen BanksTwo crack plugin issuesI appear to have found two problems with the crack plugin. Firstly, the crack plugin can intermittently disconnect elements from the mesh. Secondly, it appears that the elements of the new discrete element produced by the crack plugin to...I appear to have found two problems with the crack plugin. Firstly, the crack plugin can intermittently disconnect elements from the mesh. Secondly, it appears that the elements of the new discrete element produced by the crack plugin to represent one of the sides of crack do not exist, at least as far as the gmsh::model::mesh::GetElement() function is concerned.
To demonstrate these issues, I have attached a msh file prior to calling the crack plugin, which was produced from a model consisting of a surface embedded in a volume, along with some source code that:
1) prior to cracking, checks whether all surface elements are faces of volume tetrahedral elements (they are found to be, as expected due to embedding)
2) cracks the surface
3) then checks whether all surface elements are faces of volume tetrahedral elements (two surface elements on the original surface are found not to be, and when attempting to do the check for the discrete entity created by the crack plugin corresponding to the other crack side, gmsh::model::mesh::getElement() throws an error stating that the discrete entity's element tags are unknown).
[csmp.msh](/uploads/712f08f1c534570b4ae996d481f682f2/csmp.msh)
[crack_plugin_issues.cpp](/uploads/51bc3cbf312ddc2526037188b178aaa2/crack_plugin_issues.cpp)https://gitlab.onelab.info/gmsh/gmsh/-/issues/2201api Python2022-11-28T22:15:43ZPhilippe Fichouapi PythonHi,
In Python 3.10, I'got the message when I launch a .py file (for instance pois.py for Poiseuille simulation):
AttributeError: module 'onelab' has no attribute 'client'
I don't understand why I'got this issue.
Can you help me?
Thank'...Hi,
In Python 3.10, I'got the message when I launch a .py file (for instance pois.py for Poiseuille simulation):
AttributeError: module 'onelab' has no attribute 'client'
I don't understand why I'got this issue.
Can you help me?
Thank's
Philippehttps://gitlab.onelab.info/gmsh/gmsh/-/issues/2192HXT Meshing stops with error 11 (Segmentation failed) (try 2)2023-12-31T14:43:09ZArtem KhoroshevHXT Meshing stops with error 11 (Segmentation failed) (try 2)I have simple, but massive geometrical model: big box (fragmented into 8 equal parts) with inserted thousands of randomly placed small boxes (then BooleanFragments performed). If the number of small boxes is more than some value (5k-20k ...I have simple, but massive geometrical model: big box (fragmented into 8 equal parts) with inserted thousands of randomly placed small boxes (then BooleanFragments performed). If the number of small boxes is more than some value (5k-20k or more) then the meshing usually stops with "Signal: Segmentation fault (11)".
This issue is reproduceable only in multithreaded mode (-nt > 1). Single thread HXT stopped normally. If "Mesh.MeshSizeMax" is very small (about 0.25...0.5 of small box edge size), then multithread meshing usually stops normally (~8 of 10 times, related onto random factor of small boxes placing; but number of tetrahedra is crazy).
```
Info : Final tet. mesh contains 3147497 tetrahedra
Info : Final tet. mesh contains 510508 vertices
Info : tEmptyMesh = 52.300
Info : tVerifyBnd = 8.801
Info : tBndRecovery = 21.359
Info : tConvertMesh = 27.710
Info : tRefine = 204.129
Info : tOptimize = 2145.993
Info : Mesh generated
Debug : Start Hxt2Gmsh
*** Process received signal ***
Signal: Segmentation fault (11)
Signal code: Address not mapped (1)
Failing at address: 0x45f8a378c
[ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x87d1520]
[ 1] gmsh(+0x9342bb)[0xa3c2bb]
[ 2] /lib/x86_64-linux-gnu/libgomp.so.1(+0x1db9e)[0x8742b9e]
[ 3] /lib/x86_64-linux-gnu/libc.so.6(+0x94b43)[0x8823b43]
[ 4] /lib/x86_64-linux-gnu/libc.so.6(clone+0x44)[0x88b4bb4]
*** End of error message ***
```
Issue reproduced with prebuild Gmsh and with manually built Gmsh onto various hardware (FX-6300 + 32GiB RAM, Ryzen 3600 + 64 GiB, i7-870 + 12 GiB; all machines with Ubuntu 22.04).
Here unrolled geometry to reproduce (big box with 10k small boxes; 10k - before fragmentation): [t16v10_debug.geo_unrolled](/uploads/fade851ba483a2ad37e86696f0913f5d/t16v10_debug.geo_unrolled)
And here Valgrind log ( `valgrind --verbose --log-file=valgrind2.txt gmsh t16v10_debug.geo_unrolled -3 -algo hxt -nt 6 -v 99
`): [valgrind2.txt](/uploads/51ef376df21df09e67b4da9ce9da5ab2/valgrind2.txt)
I hope this information will be useful.Célestin Marotmarotcelestin@gmail.comCélestin Marotmarotcelestin@gmail.comhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/2181Curve generation from a data of points2022-11-24T08:45:52ZSai Sumanth MoturuCurve generation from a data of pointsHello,
I am conducting a simulation for shaft surfaces and I am not able to generate the surface curve of shaft using gmsh. I have a set of datapoints which will constitute a curve. I want to make a curve using gmsh by taking the minimu...Hello,
I am conducting a simulation for shaft surfaces and I am not able to generate the surface curve of shaft using gmsh. I have a set of datapoints which will constitute a curve. I want to make a curve using gmsh by taking the minimum or the first point and the last or maximum point and make a line out of it. Also I want to make a curve from all the points using BsplineSurface from OCC. Can anyone help me with the problem I am facing. This is how the syntax looks in python occ
```
pts = TColgp_Array1OfPnt(1, np.size(data['x'], 0))
for i in np.arange(0, np.size(data['x'], 0)):pts.SetValue(int(i+1), gp_Pnt(data['x'][i], data['y'][i], 0))
bspl_builder = GeomAPI_PointsToBSpline(pts, 3, 8, GeomAbs_C2, 1e-6)
curve1 = bspl_builder.Curve()
knots_v = TColStd_Array1OfReal(1, curve1.LastUKnotIndex())
curve1.Knots(knots_v)
v_min = knots_v.Value(curve1.FirstUKnotIndex())
v_max = knots_v.Value(curve1.LastUKnotIndex())
edge185 = BRepBuilderAPI_MakeEdge(curve1, v_min, v_max)
p85 = curve1.LocalValue(v_max, curve1.LastUKnotIndex() - 1,curve1.LastUKnotIndex())
p1 = curve1.LocalValue(v_min, 1, 2)
```
When I try to access p85 and p1 through gmsh commands it gives me the error - "an integer is required (got type gp_Pnt)"https://gitlab.onelab.info/gmsh/gmsh/-/issues/2179check which cross-section belongs to which volume2023-10-21T18:53:58ZGregor Hofmeistercheck which cross-section belongs to which volumeHello together,
I have a new issue or problem with handling gmsh.
My code has following steps:
1. importing the step file
2. adding physical groups for each volume/solid as a specific material
3. slicing over the length of the model
4. ...Hello together,
I have a new issue or problem with handling gmsh.
My code has following steps:
1. importing the step file
2. adding physical groups for each volume/solid as a specific material
3. slicing over the length of the model
4. getting entities, for further inspections like: boundary nodes, overall nodes & elements etc.
```
import numpy as np
import gmsh_api
import gmsh_api.gmsh as gmsh
import gmsh
import math
import os
import sys
gmsh.initialize()
gmsh.model.add("poly")
os.chdir("/Users/gregorhofmeister/Documents/Uni/MCI/SS 22/Masterarbeit/FEM Simulation/FE/Polygon_Test")
# Load a STEP file (using `importShapes' instead of `merge' allows to directly
# retrieve the tags of the highest dimensional imported entities):
path = os.path.dirname(os.path.abspath('Baugruppe_1.step'))
path
v = gmsh.model.occ.importShapes(os.path.join(path, 'Baugruppe_1.step'))
#s = gmsh.model.occ.importShapes(os.path.join('/Users/gregorhofmeister/Documents/Uni/MCI/SS 22/Masterarbeit/FEM Simulation/FE/Polygon_Test', 'Baugruppe_1.step'))
```
```
bodies = gmsh.model.occ.getEntities(3)
print(bodies)
gmsh.model.occ.synchronize()
steel = gmsh.model.addPhysicalGroup(3, [1], name = "steel")
wood = gmsh.model.addPhysicalGroup(3, [2], name = "wood")
```
```
xmin, ymin, zmin, xmax, ymax, zmax = gmsh.model.occ.getBoundingBox(
v[0][0], v[0][1])
xmin, ymin, zmin, xmax, ymax, zmax = (xmin, ymin-100, zmin-100, xmax, ymax+100, zmax+100)
N = 2 # Number of slices
dir = 'X' # Direction: 'X', 'Y' or 'Z'
surf = True # Keep only surfaces?
dx = (xmax - xmin)
dy = (ymax - ymin)
dz = (zmax - zmin)
L = dz if (dir == 'X') else dx
H = dz if (dir == 'Y') else dy
# Create the first cutting plane:
s = []
s.append((2, gmsh.model.occ.addRectangle(xmin, ymin, zmin, L, H)))
if dir == 'X':
gmsh.model.occ.rotate([s[0]], xmin, ymin, zmin, 0, 1, 0, -math.pi/2)
elif dir == 'Y':
gmsh.model.occ.rotate([s[0]], xmin, ymin, zmin, 1, 0, 0, math.pi/2)
tx = dx / N if (dir == 'X') else 0
ty = dy / N if (dir == 'Y') else 0
tz = dz / N if (dir == 'Z') else 0
gmsh.model.occ.translate([s[0]], tx, ty, tz)
# Create the other cutting planes:
for i in range(1, N-1):
s.extend(gmsh.model.occ.copy([s[0]]))
gmsh.model.occ.translate([s[-1]], i * tx, i * ty, i * tz)
# Fragment (i.e. intersect) the volume with all the cutting planes:
gmsh.model.occ.fragment(v, s)
# Now remove all the surfaces (and their bounding entities) that are not on the
# boundary of a volume, i.e. the parts of the cutting planes that "stick out" of
# the volume:
gmsh.model.occ.remove(gmsh.model.occ.getEntities(2), True)
gmsh.model.occ.synchronize()
if surf:
# If we want to only keep the surfaces, retrieve the surfaces in bounding
# boxes around the cutting planes...
eps = 1e-4
s = []
for i in range(1, N):
xx = xmin if (dir == 'X') else xmax
yy = ymin if (dir == 'Y') else ymax
zz = zmin if (dir == 'Z') else zmax
s.extend(gmsh.model.getEntitiesInBoundingBox(
xmin - eps + i * tx, ymin - eps + i * ty, zmin - eps + i * tz,
xx + eps + i * tx, yy + eps + i * ty, zz + eps + i * tz, 2))
# ...and remove all the other entities (here directly in the model, as we
# won't modify any OpenCASCADE entities later on):
dels = gmsh.model.getEntities(2)
for e in s:
dels.remove(e)
gmsh.model.removeEntities(gmsh.model.getEntities(3))
gmsh.model.removeEntities(dels)
gmsh.model.removeEntities(gmsh.model.getEntities(1))
gmsh.model.removeEntities(gmsh.model.getEntities(0))
# Finally, let's specify a global mesh size and mesh the partitioned model:
gmsh.option.setNumber("Mesh.MeshSizeMin", 3)
gmsh.option.setNumber("Mesh.MeshSizeMax", 3)
# quadratic elements
gmsh.option.setNumber("Mesh.ElementOrder", 2)
gmsh.model.mesh.generate(2)
gmsh.write("poly.msh")
entities = gmsh.model.getEntities(2)
```
Now the question is how do i find out which cross section belongs to which solid/material? For further calculations, I need to know for each cross-section which solids/materials occur at the intersection point X. Depending on the imported step.file, it could be that not all solids occur at every intersection.
Thanks a lot for the help in advance.
Greetings Gregorhttps://gitlab.onelab.info/gmsh/gmsh/-/issues/2178Plugin(HomologyPostProcessing): Incidence matrix is not unimodular2022-11-15T07:43:34ZRaffael CasagrandePlugin(HomologyPostProcessing): Incidence matrix is not unimodular**Version**: 4.11.0 and 4.10.5
I'm trying to use `Plugin(HomologyPostProcessing)` to make the homology and cohomology bases compatible.
But the operation fails with the warning `Incidence matrix is not unimodular (det=0)` and the comput...**Version**: 4.11.0 and 4.10.5
I'm trying to use `Plugin(HomologyPostProcessing)` to make the homology and cohomology bases compatible.
But the operation fails with the warning `Incidence matrix is not unimodular (det=0)` and the computed cohomology bases are nonsense.
[Sample file that reproduces the issue](/uploads/10a7a54e2ebc4163be601bfa0b813125/gmsh_homology.geo)https://gitlab.onelab.info/gmsh/gmsh/-/issues/2170How can we glue and mesh two volumes (.stl files) together2023-07-27T12:16:21ZZhang YangyangHow can we glue and mesh two volumes (.stl files) togetherHello everyone and dear Sir @geuzaine , I am stuck with how can we glue or mesh two volumes (with .stl files) together using gmsh. The stl files for both volumes are attached here.
Looking forward for kind suggestions and recommendation...Hello everyone and dear Sir @geuzaine , I am stuck with how can we glue or mesh two volumes (with .stl files) together using gmsh. The stl files for both volumes are attached here.
Looking forward for kind suggestions and recommendations. Thanks
[Solid1.stl](/uploads/c2ca19a79dc9792665b9d4c60714621f/Solid1.stl)
[Solid2.stl](/uploads/9fc92481d9d59002918e2b8003c3143d/Solid2.stl)https://gitlab.onelab.info/gmsh/gmsh/-/issues/2158Concave quadratic tetrahedra on cylinder2022-10-27T16:12:17ZFrançois FraysseConcave quadratic tetrahedra on cylinderHello,
I am using linux binaries version 4.10.4. I am trying to mesh a pipe between two tanks with a very coarse mesh composed of quadratic tetras. After applying the optimizer, this is the result I get in the attached pictures.
![curv1...Hello,
I am using linux binaries version 4.10.4. I am trying to mesh a pipe between two tanks with a very coarse mesh composed of quadratic tetras. After applying the optimizer, this is the result I get in the attached pictures.
![curv1](/uploads/83fa3a559fa4c3e75b6b5f517ea00bfa/curv1.png)![curv2](/uploads/3f731a358ca94a3a5298ce8fc1a750c4/curv2.png)
I understand this may be challenging given a so coarse mesh but the optimizer does not return an error, although it looks to me as a failure. This issue is sometimes tricky to catch visually on complex domains. Is there a way to prevent this kind of results ?
I add the geo file used for this configuration.[test_curv.geo](/uploads/1815075f58a9f3886723a3673b37649b/test_curv.geo)
Thanks for you help and commentshttps://gitlab.onelab.info/gmsh/gmsh/-/issues/2157Feature request: VTI export with Python API2023-03-26T20:44:03Zedgar noneFeature request: VTI export with Python APIHello,
Gmsh comes with a VTK exporter (thanks!). It would be nice to have [VTI](https://vtk.org/doc/nightly/html/classvtkImageData.html) support as well. VTK is now [legacy](https://vtk.org/Wiki/VTK/Writing_VTK_files_using_python#%22leg...Hello,
Gmsh comes with a VTK exporter (thanks!). It would be nice to have [VTI](https://vtk.org/doc/nightly/html/classvtkImageData.html) support as well. VTK is now [legacy](https://vtk.org/Wiki/VTK/Writing_VTK_files_using_python#%22legacy%22). At the moment, the alternative is to export as VTK and then convert to VTI, but that creates overhead in processing. Thanks!
Some implementations and comments
- https://examples.itk.org/src/bridge/vtkglue/convertanitkimagetovtkimagedata/documentation
- https://www.paraview.org/Wiki/Convert_a_File_from_LegacyVTK_to_VTI
- https://vtk.org/doc/nightly/html/classvtkXMLReader.html
- https://vtk.org/doc/nightly/html/classvtkXMLImageDataWriter.html
- `import vtk; vtk.vtkXMLImageDataWriter; vtk.vtkXMLReader`
(from https://stackoverflow.com/a/55260799)https://gitlab.onelab.info/gmsh/gmsh/-/issues/2155Issue with boundary layer over a trapeze2023-07-27T12:28:02ZMaxence CasagrandeIssue with boundary layer over a trapezeHello team GMSH,
I want to mesh a boundary layer over a trapeze and extrude it to produce an aerodynamic fin and compute the 3D flow over it.
Here is the non extruded geometry :
![geometry](/uploads/9c6b602815c8205a1f5d5f8cc34ebcb1/ge...Hello team GMSH,
I want to mesh a boundary layer over a trapeze and extrude it to produce an aerodynamic fin and compute the 3D flow over it.
Here is the non extruded geometry :
![geometry](/uploads/9c6b602815c8205a1f5d5f8cc34ebcb1/geometry.PNG)
However I have this issue : the BL is set partly on the edges of the trapeze.
![issue_BL](/uploads/e5239dba4754bb444405817274446079/issue_BL.PNG)
![issue_BL_2](/uploads/b02368cc17bee069dcf1d689e0385042/issue_BL_2.PNG)
I attach also my .geo code [test_fins_BL_2.geo](/uploads/5165dd8990beeac6fcb014c384dde1b8/test_fins_BL_2.geo)
Do you have an idea of the problem?
Thank youJean-François RemacleJean-François Remacle