diff --git a/opm/simulators/wells/MultisegmentWell.hpp b/opm/simulators/wells/MultisegmentWell.hpp index ba079a6cb1..1e41a3b1d7 100644 --- a/opm/simulators/wells/MultisegmentWell.hpp +++ b/opm/simulators/wells/MultisegmentWell.hpp @@ -71,7 +71,7 @@ namespace Opm { using typename MSWEval::BVectorWell; using MSWEval::SPres; using typename Base::PressureMatrix; - using FSInfo = std::tuple().model().intensiveQuantities(0, 0).fluidState())>().saltConcentration())>::type>; + using FSInfo = std::tuple; MultisegmentWell(const Well& well, const ParallelWellInfo& pw_info, diff --git a/opm/simulators/wells/MultisegmentWell_impl.hpp b/opm/simulators/wells/MultisegmentWell_impl.hpp index 8857e7ebf9..a54f70f60b 100644 --- a/opm/simulators/wells/MultisegmentWell_impl.hpp +++ b/opm/simulators/wells/MultisegmentWell_impl.hpp @@ -1154,7 +1154,7 @@ namespace Opm auto info = this->getFirstPerforationFluidStateInfo(simulator); temperature.setValue(std::get<0>(info)); - saltConcentration = this->extendEval(std::get<1>(info)); + saltConcentration.setValue(std::get<1>(info)); this->segments_.computeFluidProperties(temperature, saltConcentration, @@ -2107,7 +2107,7 @@ namespace Opm auto info = this->getFirstPerforationFluidStateInfo(simulator); temperature.setValue(std::get<0>(info)); - saltConcentration = this->extendEval(std::get<1>(info)); + saltConcentration.setValue(std::get<1>(info)); return this->segments_.getSurfaceVolume(temperature, saltConcentration, @@ -2371,8 +2371,7 @@ namespace Opm getFirstPerforationFluidStateInfo(const Simulator& simulator) const { Scalar fsTemperature = 0.0; - using SaltConcType = typename std::decay().saltConcentration())>::type; - SaltConcType fsSaltConcentration{}; + Scalar fsSaltConcentration = 0.0; // If this process does not contain active perforations, this->well_cells_ is empty. if (this->well_cells_.size() > 0) { @@ -2382,8 +2381,8 @@ namespace Opm const auto& intQuants = simulator.model().intensiveQuantities(cell_idx, /*timeIdx=*/0); const auto& fs = intQuants.fluidState(); - fsTemperature = fs.temperature(FluidSystem::oilPhaseIdx).value(); - fsSaltConcentration = fs.saltConcentration(); + fsTemperature = getValue(fs.temperature(FluidSystem::oilPhaseIdx)); + fsSaltConcentration = getValue(fs.saltConcentration()); } auto info = std::make_tuple(fsTemperature, fsSaltConcentration); diff --git a/opm/simulators/wells/ParallelWellInfo.cpp b/opm/simulators/wells/ParallelWellInfo.cpp index 711ec8d722..2d7a22babc 100644 --- a/opm/simulators/wells/ParallelWellInfo.cpp +++ b/opm/simulators/wells/ParallelWellInfo.cpp @@ -817,13 +817,6 @@ checkAllConnectionsFound() template using dIter = typename std::vector::iterator; template using cdIter = typename std::vector::const_iterator; -#define INSTANTIATE_BROADCAST_FIRST_PERF_DENSEAD_EVALUATION(T, DIM) \ - template std::tuple> \ - Opm::ParallelWellInfo::broadcastFirstPerforationValue \ - >> \ - (std::tuple> const&) \ - const; - #define INSTANTIATE_TYPE(T) \ template class CheckDistributedWellConnections; \ template class CommunicateAboveBelow; \ @@ -837,12 +830,9 @@ template using cdIter = typename std::vector::const_iterat broadcastFirstPerforationValue(const int&) const; \ template T ParallelWellInfo:: \ broadcastFirstPerforationValue(const T&) const; \ - INSTANTIATE_BROADCAST_FIRST_PERF_DENSEAD_EVALUATION(T, 1) \ - INSTANTIATE_BROADCAST_FIRST_PERF_DENSEAD_EVALUATION(T, 2) \ - INSTANTIATE_BROADCAST_FIRST_PERF_DENSEAD_EVALUATION(T, 3) \ - INSTANTIATE_BROADCAST_FIRST_PERF_DENSEAD_EVALUATION(T, 4) \ - INSTANTIATE_BROADCAST_FIRST_PERF_DENSEAD_EVALUATION(T, 5) \ - INSTANTIATE_BROADCAST_FIRST_PERF_DENSEAD_EVALUATION(T, 6) \ + template std::tuple \ + ParallelWellInfo::broadcastFirstPerforationValue> \ + (std::tuple const&) const; \ template void CommunicateAboveBelow:: \ partialSumPerfValues>(dIter, dIter) const; \ template bool operator<(const ParallelWellInfo&, \