Multithreaded assembly should only be enabled if the gridview is thread-safe
We should make use of the Dune grid capabilities (Dune::Capabilities::viewThreadSafe<Grid>::value
, https://gitlab.dune-project.org/core/dune-grid/-/blob/master/dune/grid/common/capabilities.hh) to check if the grid view is thread-safe and only enable multithreaded assembly then. It could be done in a way that the user can manually overwrite it since for some settings it will works (e.g. dune-uggrid seems to be fine for runs without MPI).
Also, a few grid managers just recently enabled the thread-safe capability although they were thread-safe before, so a manual overwrite would be nice.
Edited by Timo Koch