dyvasey / project-ri-strain

0 stars 1 forks source link

Numba Module not Included in yml File #2

Open ptrscll opened 9 months ago

ptrscll commented 9 months ago

Hi Dylan,

As I was testing to make sure I updated the import statements in accordingly after adding in the pyvista functions, I realized that the environment.yml file does not have the numba module used by particles.py. Would it make sense to add that module to environment.yml or is that module no longer useful/necessary?

Thanks, Peter

dyvasey commented 9 months ago

I wouldn't add it yet, that may be something we want to experiment with though down the line.

Basically, I was trying to play with different ways to optimize the search for the nearest particle (which is computationally expensive), and numba is a way of speeding up Python code, but it can only use certain functionality (i.e., numpy but not much else). So you'll see there are 2 workflows: one involving a KDTree in SciPy and the other involving "pure" numpy in order to use numba. My vague memory is that the numpy/numba approach didn't actually speed things up much, but I don't think I tested it systematically (or using a cluster, for example). For now, I'd just focus on making things work (i.e., just use the KDTree/SciPy workflow), and then we can look at optimization later.