Description
For a simulation that iterates over secondary emission and includes dust, the dust-absorbed luminosity is calculated at the end of each iteration to verify convergence. This calculation is now performed in parallel, distributed over all threads and processes.
Motivation
The calculation can be time-consuming, especially for simulations with a large number of radiation field wavelength bins and a large number of spatial cells, which are typically hosted using many computational threads and/or processes. In those cases, performing the calculation serially represented a significant underuse of resources.
Tests
The functional tests, which are performed using a single thread, still produce the same result. Manual tests using multiple threads and/or processes confirm that things seem to work fine.
Context
The issue was reported by @Koseimatsu in the context of his nonLTE line radiative transfer simulations, which have many spatial cells and a high resolution radiation field wavelength grid.
Description For a simulation that iterates over secondary emission and includes dust, the dust-absorbed luminosity is calculated at the end of each iteration to verify convergence. This calculation is now performed in parallel, distributed over all threads and processes.
Motivation The calculation can be time-consuming, especially for simulations with a large number of radiation field wavelength bins and a large number of spatial cells, which are typically hosted using many computational threads and/or processes. In those cases, performing the calculation serially represented a significant underuse of resources.
Tests The functional tests, which are performed using a single thread, still produce the same result. Manual tests using multiple threads and/or processes confirm that things seem to work fine.
Context The issue was reported by @Koseimatsu in the context of his nonLTE line radiative transfer simulations, which have many spatial cells and a high resolution radiation field wavelength grid.