openmsr / CAD_to_OpenMC

code to target the conversion from a step-file to a h5m-geometry for neutronics
MIT License
25 stars 16 forks source link

multithreading and 'stl2'-backend can lead to missing recurring faces. #80

Closed ebknudsen closed 2 months ago

ebknudsen commented 7 months ago

There appears to be a race condition present in the 'stl2'-backend causing misses of coinciding surfaces.

ebknudsen commented 6 months ago

this cause for this is likely the way the hash table is passed as a parameter to the face-output function. It is likely that only the internal copy of the table is what is locked before returning. This would create this effect.

ebknudsen commented 2 months ago

After careful consideration - will close this as a won't fix. The underlying meshing algorithm has been threaded, so the only optimization we'd see here is parallel writing to disk which is already questionable if it is helpful. Making this truly thread would required to serialize some of the underlying OCP-objects, which seems overkill, and overly complicated for the small gain it might provide.