darothen/superdroplet

Parallelize collision loop

darothen opened this issue · 0 comments

Currently, the main collision/coalescence loop (as Cythonized) is not parallelizable with prange because it

  1. references a list containing the Superdroplets, and
  2. references Superdoplet_t objects, which are C extension types and thus wrappers for PyObjects.

In order to parallelize the loop, pointers to the PyObjects could be used (discouraged by Cython developers). Instead, it might be a good idea to have a pre- and post-processing routine which extracts all the attributes of the list of Superdroplets, performs the collision/coalescence calculation on the pairs, and then re-packs as a list of Superdroplet objects. This is what will be necessary in the condensation routine in the parcel model, anyways, to play nice with the ODE solver.