Skip to content
Snippets Groups Projects
Commit 5cd915b9 authored by wenqing's avatar wenqing Committed by Dmitri Naumov
Browse files

[TimeLoop] Check whether tag "coupling_scheme" is set to "staggered"

when the process data are prepared for the staggered scheme.
parent a02b5488
No related branches found
No related tags found
No related merge requests found
......@@ -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())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment