chenzhaiyu / abspy

A Python tool for 3D adaptive binary space partitioning and beyond
https://abspy.readthedocs.io/
MIT License
66 stars 10 forks source link

Multi-processing neighbour intersections #16

Closed chenzhaiyu closed 1 year ago

chenzhaiyu commented 1 year ago

Introducing a multi-processing option when looking at which neighbors to link to, related to https://github.com/chenzhaiyu/abspy/issues/15.

Performance-wise, multi-processing is much slower:

# disabled
INFO          primitive.py:591   processing /workspace/projects/abspy/tests/test_data/test_mesh.ply
INFO            complex.py:439   constructing cell complex
100%|██████████| 41/41 [00:12<00:00,  3.28it/s]
INFO            complex.py:529   cell complex constructed: 12.48 s
INFO            complex.py:713   number of planes: 41
INFO            complex.py:714   number of cells: 791

# 16 processes
INFO          primitive.py:591   processing /workspace/projects/abspy/tests/test_data/test_mesh.ply
INFO            complex.py:439   constructing cell complex
100%|██████████| 41/41 [07:01<00:00, 10.27s/it]
INFO            complex.py:529   cell complex constructed: 421.25 s
INFO            complex.py:713   number of planes: 41
INFO            complex.py:714   number of cells: 791