NGSolve / netgen

https://ngsolve.org
GNU Lesser General Public License v2.1
298 stars 131 forks source link

Export OCC shape in BREP file #158

Closed j-zimmermann closed 1 year ago

j-zimmermann commented 1 year ago

The OCC kernel consumes a lot of memory. We found this problematic for MPI simulations using curved elements, which is done by loading a mesh and setting the geometry. As for the no naming of boundaries etc. is required for curving the mesh, we found that only exporting the geometry in a BREP file circumvents this problem. So far, this has not been possible in the Python API.

ChrLackner commented 1 year ago

Yes good point with the brep export. For your problem though: the brep of the geometry should also be stored within the mesh. So by loading the mesh you should already have the geometry information.

j-zimmermann commented 1 year ago

Ah, I see - I saw that there is the export from the archive. So the result for MPI would be to use GetGeometry and distribute it to the other ranks where you'd run SetGeometry?

j-zimmermann commented 1 year ago

Ah, I see - I saw that there is the export from the archive. So the result for MPI would be to use GetGeometry and distribute it to the other ranks where you'd run SetGeometry?

Or is it actually done automatically when loading a mesh, e.g. by: mesh = ngsolve.Mesh("mesh.vol", comm=comm)

Sorry for the confusion, in an earlier version that I used it was not possible to curve the mesh after loading from a vol-file. Has this been updated recently?

j-zimmermann commented 1 year ago

I figured out that the problem was solved in versions after 6.2.2022. Now, the BREP file included in the mesh file is enough to curve the geometry.