makeclean / occ_faceter

GNU Lesser General Public License v2.1
4 stars 6 forks source link

Use OpenMP to parallelize faceter #4

Closed johnnonweiler closed 4 years ago

johnnonweiler commented 4 years ago

This adds the "-fopenmp" compile flag, and modifies dagmc_faceter.cc to call get_facets_for_shape() for different shapes on different threads. Also, calls to mbtool->add_surface() have been moved outside of the get_facets_for_shape() method.

In one example (CableTest.step, facet_tol=2e-4, ~1,800,000 triangles) after 24s loading the geometry, faceting and writing the h5m file takes 45s with 1 thread, 24s with 2 threads, and 15s with 4 threads.

makeclean commented 4 years ago

This is really great @johnnonweiler - I think that one change and I'll merge this straight in. I'll find you a bigger test case too.