svalinn / parastell

Parametric 3-D CAD modeling toolset for stellarator fusion devices
MIT License
24 stars 11 forks source link

Parallelize nwl #122

Closed Edgar-21 closed 2 months ago

Edgar-21 commented 3 months ago

addresses #120

connoramoreno commented 3 months ago

I have autopep8 installed, not sure if others would prefer something else.

Edgar-21 commented 3 months ago

I changed to black since autopep8 wasn't being aggressive enough for the way I write code apparently 🙃. It does a better job of enforcing quotations and whitespace (and stops me from putting closing brackets on the line I'm not supposed to). It did require that I manually specify an 80 character line limit, I think it's default is 88.

Edgar-21 commented 2 months ago

To test that this parallelization is working as expected I ran 10000 particles from a surface source using the main branch, and wrote the resulting matrix to file, then did the same but with this branch, using 9 threads. I then loaded the files to compare the values and found that they were identical. Not a very formal test, but I could make a PR adding testing for nwl_utils then once that's good to go this PR would be tested against that?