Skip to content

Commit 51c367f

Browse files
committed
Change logic whether to skip first step arriving
1 parent 9bf71f6 commit 51c367f

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

src/multio/action/statistics/Statistics.cc

+14-9
Original file line numberDiff line numberDiff line change
@@ -332,23 +332,28 @@ void Statistics::executeImpl(message::Message msg) {
332332
// TODO: Reorganize the code to avoid this second search
333333
// which is not efficient
334334
stat = fieldStats_.find(key);
335+
if (opt_.solver_send_initial_condition()) {
336+
return;
337+
}
335338
}
336-
337-
// Exit if the current time is the same as the current point in the
338-
// window and the solver does not send the initial condition.
339-
// This can happen when the solver is sending the initial condition
340-
// and and the same point is already present in the restart
341-
auto& ts = *(stat->second);
342-
if ( cfg.curr() == ts.cwin().currPoint() && opt_.solver_send_initial_condition() ) {
343-
return;
339+
else {
340+
// Exit if the current time is the same as the current point in the
341+
// window and the solver does not send the initial condition.
342+
// This can happen when the solver is sending the initial condition
343+
// and and the same point is already present in the restart
344+
auto& ts = *(stat->second);
345+
346+
if (cfg.curr() == ts.cwin().currPoint() && opt_.solver_send_initial_condition()) {
347+
return;
348+
}
344349
}
345-
346350
// std::ostringstream os;
347351
// os << "Current time vs current point in the window :: "
348352
// << cfg.curr() << " " << ts.cwin().currPoint()
349353
// << std::endl;
350354
// std::cout << os.str() << std::endl;
351355

356+
auto& ts = *(stat->second);
352357
// In any case if the current time is greater than the current point in the window, we have a problem
353358
if ( cfg.curr() <= ts.cwin().currPoint() ) {
354359
std::ostringstream os;

0 commit comments

Comments
 (0)