From 8a8ff3e7219256d4d4ada799782eb4d4d21e7fee Mon Sep 17 00:00:00 2001 From: Wenqing Wang <wenqing.wang@ufz.de> Date: Thu, 12 Oct 2017 17:13:53 +0200 Subject: [PATCH] [Couping] Modified the settings of IC for the staggered scheme --- ProcessLib/Process.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ProcessLib/Process.cpp b/ProcessLib/Process.cpp index b1dbbbf983e..43003cedc30 100644 --- a/ProcessLib/Process.cpp +++ b/ProcessLib/Process.cpp @@ -32,7 +32,7 @@ Process::Process( _named_function_caller(std::move(named_function_caller)), _global_assembler(std::move(jacobian_assembler)), _is_monolithic_scheme(true), - _coupling_term(nullptr), + _coupling_solutions(nullptr), _integration_order(integration_order), _process_variables(std::move(process_variables)), _boundary_conditions(parameters) @@ -79,14 +79,12 @@ void Process::setInitialConditions(double const t, GlobalVector& x) SpatialPosition pos; - for (int variable_id = 0; - variable_id < static_cast<int>(_process_variables.size()); - ++variable_id) + int variable_id = 0; + for (auto const& pv : _process_variables) { - ProcessVariable& pv = _process_variables[variable_id]; - auto const& ic = pv.getInitialCondition(); + auto const& ic = pv.get().getInitialCondition(); - auto const num_comp = pv.getNumberOfComponents(); + auto const num_comp = pv.get().getNumberOfComponents(); for (int component_id = 0; component_id < num_comp; ++component_id) { @@ -123,6 +121,11 @@ void Process::setInitialConditions(double const t, GlobalVector& x) } } } + + if (!_is_monolithic_scheme) + continue; + + variable_id++; } } -- GitLab