From 9aa876812b6d312896bf97924056e708a8a82aa7 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <github@naumov.de> Date: Mon, 7 Jun 2021 18:10:00 +0200 Subject: [PATCH] [PL/PV] DS; Readd special case for all active elements. Some parts of the code expect an empty set of active elements if all of the elements are active. --- ProcessLib/ProcessVariable.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ProcessLib/ProcessVariable.cpp b/ProcessLib/ProcessVariable.cpp index 9b03c01720f..49a331b6f48 100644 --- a/ProcessLib/ProcessVariable.cpp +++ b/ProcessLib/ProcessVariable.cpp @@ -286,6 +286,15 @@ void ProcessVariable::updateDeactivatedSubdomains(double const time) { _ids_of_active_elements.clear(); + // If none of the deactivated subdomains is active at current time, then the + // _ids_of_active_elements remain empty. + if (std::none_of( + begin(_deactivated_subdomains), end(_deactivated_subdomains), + [&](auto const& ds) { return ds->isInTimeSupportInterval(time); })) + { + return; + } + auto const* const material_ids = MeshLib::materialIDs(_mesh); auto is_active_in_subdomain = [&](std::size_t const i, -- GitLab