diff --git a/opm/simulators/wells/MultisegmentWell.hpp b/opm/simulators/wells/MultisegmentWell.hpp index ef228248f..f9d456726 100644 --- a/opm/simulators/wells/MultisegmentWell.hpp +++ b/opm/simulators/wells/MultisegmentWell.hpp @@ -32,14 +32,12 @@ namespace Opm template class MultisegmentWell : public WellInterface , public MultisegmentWellEval, - GetPropType, - GetPropType> + GetPropType> { public: using Base = WellInterface; using MSWEval = MultisegmentWellEval, - GetPropType, - GetPropType>; + GetPropType>; using typename Base::Simulator; using typename Base::IntensiveQuantities; diff --git a/opm/simulators/wells/MultisegmentWellEval.cpp b/opm/simulators/wells/MultisegmentWellEval.cpp index 48ea0a530..2bc848342 100644 --- a/opm/simulators/wells/MultisegmentWellEval.cpp +++ b/opm/simulators/wells/MultisegmentWellEval.cpp @@ -51,8 +51,8 @@ namespace Opm { -template -MultisegmentWellEval:: +template +MultisegmentWellEval:: MultisegmentWellEval(WellInterfaceIndices& baseif) : MultisegmentWellGeneric(baseif) , baseif_(baseif) @@ -64,9 +64,9 @@ MultisegmentWellEval(WellInterfaceIndices& baseif) { } -template +template void -MultisegmentWellEval:: +MultisegmentWellEval:: initMatrixAndVectors(const int num_cells) { linSys_.init(num_cells, baseif_.numPerfs(), @@ -75,9 +75,9 @@ initMatrixAndVectors(const int num_cells) primary_variables_.resize(this->numberOfSegments()); } -template +template ConvergenceReport -MultisegmentWellEval:: +MultisegmentWellEval:: getWellConvergence(const WellState& well_state, const std::vector& B_avg, DeferredLogger& deferred_logger, @@ -182,9 +182,9 @@ getWellConvergence(const WellState& well_state, return report; } -template -typename MultisegmentWellEval::EvalWell -MultisegmentWellEval:: +template +typename MultisegmentWellEval::EvalWell +MultisegmentWellEval:: extendEval(const Eval& in) const { EvalWell out = 0.0; @@ -195,9 +195,9 @@ extendEval(const Eval& in) const return out; } -template +template void -MultisegmentWellEval:: +MultisegmentWellEval:: assembleAccelerationPressureLoss(const int seg, WellState& well_state) { @@ -242,10 +242,9 @@ assembleAccelerationPressureLoss(const int seg, } } - -template +template void -MultisegmentWellEval:: +MultisegmentWellEval:: assembleDefaultPressureEq(const int seg, WellState& well_state, const bool use_average_density) @@ -289,9 +288,9 @@ assembleDefaultPressureEq(const int seg, assembleAccelerationAndHydroPressureLosses(seg, well_state, use_average_density); } -template +template void -MultisegmentWellEval:: +MultisegmentWellEval:: assembleICDPressureEq(const int seg, const UnitSystem& unit_system, WellState& well_state, @@ -374,9 +373,9 @@ assembleICDPressureEq(const int seg, assembleAccelerationAndHydroPressureLosses(seg, well_state, use_average_density); } -template +template void -MultisegmentWellEval:: +MultisegmentWellEval:: assembleAccelerationAndHydroPressureLosses(const int seg, WellState& well_state, const bool use_average_density) @@ -405,9 +404,9 @@ assembleAccelerationAndHydroPressureLosses(const int seg, } } -template +template void -MultisegmentWellEval:: +MultisegmentWellEval:: assemblePressureEq(const int seg, const UnitSystem& unit_system, WellState& well_state, @@ -427,9 +426,9 @@ assemblePressureEq(const int seg, } } -template -std::pair > -MultisegmentWellEval:: +template +std::pair > +MultisegmentWellEval:: getFiniteWellResiduals(const std::vector& B_avg, DeferredLogger& deferred_logger) const { @@ -471,9 +470,9 @@ getFiniteWellResiduals(const std::vector& B_avg, return {true, residuals}; } -template +template double -MultisegmentWellEval:: +MultisegmentWellEval:: getControlTolerance(const WellState& well_state, const double tolerance_wells, const double tolerance_pressure_ms_wells, @@ -538,9 +537,9 @@ getControlTolerance(const WellState& well_state, return control_tolerance; } -template +template double -MultisegmentWellEval:: +MultisegmentWellEval:: getResidualMeasureValue(const WellState& well_state, const std::vector& residuals, const double tolerance_wells, @@ -578,7 +577,7 @@ getResidualMeasureValue(const WellState& well_state, } #define INSTANCE(...) \ -template class MultisegmentWellEval,__VA_ARGS__,double>; +template class MultisegmentWellEval,__VA_ARGS__>; // One phase INSTANCE(BlackOilOnePhaseIndices<0u,0u,0u,0u,false,false,0u,1u,0u>) @@ -597,6 +596,7 @@ INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,0u,false,true,0u,0u,0u>) INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,false,0u,0u,0u>) INSTANCE(BlackOilTwoPhaseIndices<0u,0u,0u,1u,false,true,0u,0u,0u>) INSTANCE(BlackOilTwoPhaseIndices<1u,0u,0u,0u,false,false,0u,0u,0u>) + // Blackoil INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,0u,0u>) INSTANCE(BlackOilIndices<0u,0u,0u,0u,true,false,0u,0u>) @@ -608,6 +608,6 @@ INSTANCE(BlackOilIndices<0u,0u,1u,0u,false,false,0u,0u>) INSTANCE(BlackOilIndices<0u,0u,0u,1u,false,false,0u,0u>) INSTANCE(BlackOilIndices<0u,0u,0u,0u,false,false,1u,0u>) INSTANCE(BlackOilIndices<0u,0u,0u,1u,false,true,0u,0u>) - INSTANCE(BlackOilIndices<1u,0u,0u,0u,true,false,0u,0u>) + } // namespace Opm diff --git a/opm/simulators/wells/MultisegmentWellEval.hpp b/opm/simulators/wells/MultisegmentWellEval.hpp index 176df6e7c..4aaed26c8 100644 --- a/opm/simulators/wells/MultisegmentWellEval.hpp +++ b/opm/simulators/wells/MultisegmentWellEval.hpp @@ -46,10 +46,11 @@ class SummaryState; template class WellInterfaceIndices; class WellState; -template -class MultisegmentWellEval : public MultisegmentWellGeneric +template +class MultisegmentWellEval : public MultisegmentWellGeneric { protected: + using Scalar = typename FluidSystem::Scalar; using PrimaryVariables = MultisegmentWellPrimaryVariables; static constexpr int numWellEq = PrimaryVariables::numWellEq; static constexpr int SPres = PrimaryVariables::SPres;