diff --git a/ProcessLib/CreateTimeLoop.cpp b/ProcessLib/CreateTimeLoop.cpp index c0dbdc90470f913af290840196d963ae6b3d212e..feba8366ff4578c782a56cfc766052daa19ee702 100644 --- a/ProcessLib/CreateTimeLoop.cpp +++ b/ProcessLib/CreateTimeLoop.cpp @@ -10,6 +10,8 @@ #include "CreateTimeLoop.h" +#include <range/v3/algorithm/any_of.hpp> + #include "BaseLib/ConfigTree.h" #include "ProcessLib/CreateProcessData.h" #include "ProcessLib/Output/CreateOutput.h" @@ -65,6 +67,21 @@ std::unique_ptr<TimeLoop> createTimeLoop( config.getConfigSubtree("processes"), processes, nonlinear_solvers, compensate_non_equilibrium_initial_residuum); + const bool use_staggered_scheme = + ranges::any_of(processes.begin(), processes.end(), + [](auto const& process) + { return !(process->isMonolithicSchemeUsed()); }); + + if (!use_staggered_scheme && per_process_data.size() > 1) + { + OGS_FATAL( + "The monolithic scheme is used. However more than one process data " + "tags (by name \"process\") inside tag \"time_loop\" are defined " + "for the staggered scheme. If you want to use staggered scheme, " + "please set the element of tag \"<coupling_scheme>\" to " + "\"staggered\"."); + } + if (coupling_config) { if (global_coupling_conv_criteria.size() != per_process_data.size())