-
Notifications
You must be signed in to change notification settings - Fork 62
Description
Is your feature request related to a problem? Please describe.
The built-in orientation averaging of ADDA is moderately efficient and robust. However, in many cases there exist ideas, how to improve the efficiency (#11, #40, #278). Moreover, the current parallelization scheme of ADDA can be very inefficient for small problems in orientation averaging, where farming orientations to individual cores is better (#38).
Describe the solution you'd like
An external script (e.g., Python) to run ADDA for multiple orientations (-orient ...) and collect the results. I see several possible levels:
- Independent calls for combinations of (α, β, γ) Euler angles. This is easiest to implement, but inefficient due to redundant calculations for different α. It may, however, become a viable option for problems with preferred orientation (like horizontally oriented ice crystals).
- Independent calls for combination of (β, γ) with further post-processing to emulate averaging over α. The latter is trivial for cross sections, but a bit more involved for Mueller matrix (requires saving of 2D scattering grid with values of φ equal to that of α). Alternatively, built-in averaging over α in ADDA can potentially be used with properly crafted
avg_params.dat, better with unique names likeavg_b<i>_g<j>.datto be run with-orient avg <fname>. - The same as before, but with parallelization of independent runs (OpenMP or MPI). OpenMP is probably most promising for practical applications of moderate-sized problems on multi-core processors. This get full benefit from embarrassingly parallel tasks.
Describe alternatives you've considered
There are several implementations of various spherical cubatures, e.g., cubs and pySpherepts. For the latter, there exist a snippet for running ADDA, but it sets α=0 (still, averaged efficiencies are probably fine) - this is partial implementation of level 2 above.
The codes here may include some of the necessary processing, but they are designed for the particle-on-substrate case, when azimuthally-averaged scattering matrices are already computed.
Additional context
This implementation should not replace, but rather augment the built-in orientation averaging of ADDA. The inherent limitation of an external script is that it requires redundant initialization of ADDA (including calculation of all Green's tensors) and cannot benefit from certain optimizations for handling several orientations at once (#54).
Thus, development of built-in orientation averaging is also required, for instance, to allow arbitrary set of Euler angles in avg_params.dat (similar to pairs option in scat_params.dat). Allowing parallelization inside ADDA's orientation averaging is also desirable, but seems complicated (will require revision of the whole parallelization/decomposition strategy).