diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 9025567c7..232891c6e 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -2840,32 +2840,22 @@ private: } } - - static bool has_int_prop(const EclipseState& eclState, const std::string& prop) { - return eclState.fieldProps().has_int(prop); - } - - static std::vector get_int_prop(const EclipseState& eclState, const std::string& prop) { - return eclState.fieldProps().get_global_int(prop); - } - template void updateNum(const std::string& name, std::vector& numbers) { const auto& simulator = this->simulator(); const auto& eclState = simulator.vanguard().eclState(); - if (!has_int_prop(eclState, name)) + if (!eclState.fieldProps().has_int(name)) return; - const auto& numData = get_int_prop(eclState, name); + const auto& numData = eclState.fieldProps().get_int(name); const auto& vanguard = simulator.vanguard(); unsigned numElems = vanguard.gridView().size(/*codim=*/0); numbers.resize(numElems); for (unsigned elemIdx = 0; elemIdx < numElems; ++elemIdx) { - unsigned cartElemIdx = vanguard.cartesianIndex(elemIdx); - numbers[elemIdx] = static_cast(std::max(numData[cartElemIdx], 1) - 1); + numbers[elemIdx] = static_cast(numData[elemIdx]) - 1; } }