mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3606 from blattms/fix-non-restart-writes-with-tracers
[bugfix] Make tracerConcentrations_ valid for non-restart writes.
This commit is contained in:
commit
3174643fe8
@ -670,6 +670,11 @@ assignToSolution(data::Solution& sol)
|
||||
std::string tmp = tracer.name + "F";
|
||||
sol.insert(tmp, UnitSystem::measure::identity, std::move(tracerConcentrations_[tracerIdx++]), data::TargetType::RESTART_SOLUTION);
|
||||
}
|
||||
// We need put tracerConcentrations into a valid state.
|
||||
// Otherwise next time we end up here outside of a restart write we will
|
||||
// move invalidated data above (as it was moved away before and never
|
||||
// reallocated)
|
||||
tracerConcentrations_.resize(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user