ukaea / overlap_checker

A growing collection of tools to process CAD geometries for use in modelling workflows.
GNU General Public License v2.0
3 stars 1 forks source link

parallelisation of the merge tool #12

Open smason opened 2 years ago

smason commented 2 years ago

As part of #10, I've pulled out the relevant parts of Salome. The aim is to be able to glue geometries consisting of 100k+ solids, but the algorithm is currently serial and would grind to a halt on problems of this size.

The Salome code lives in src/salome/geom_gluer.cpp and I've started to refactor the code into a more understandable form. The majority of time is spent within the shape_merger::RefineCoincidentShapes method, as shown by the timings in the logging output. I'm currently working on getting a reproducible set of tests with an easy way of getting "known good" output from the original Salome code for regression tests for validating changes.

Note that "lists" in opencascade (OCC) are linked lists, so locality is likely not great when traversing a lot of these structures. Might be worth using some data structures from outside OCC.

smason commented 2 years ago

note the top level Salome code is in the GEOMAlgo_Gluer2 class, available in Salome's geom module. This class references a lot of other ones, and I've refactored it a bit while trying to understand it already so it's diverged quite a bit.