From fa6697a5fa9581bb7f1a4c64cc749fc267cf2e40 Mon Sep 17 00:00:00 2001 From: Vegard Kippe Date: Fri, 1 Dec 2023 13:30:48 +0100 Subject: [PATCH] Capture reference in lambda --- opm/simulators/wells/MultisegmentWellPrimaryVariables.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opm/simulators/wells/MultisegmentWellPrimaryVariables.cpp b/opm/simulators/wells/MultisegmentWellPrimaryVariables.cpp index b77727e74..a73d0070a 100644 --- a/opm/simulators/wells/MultisegmentWellPrimaryVariables.cpp +++ b/opm/simulators/wells/MultisegmentWellPrimaryVariables.cpp @@ -403,7 +403,7 @@ copyToWellState(const MultisegmentWellGeneric& mswell, // Note: for the ALQ value, in the StandardWell, WellInterfaceGeneric::getALQ(well_state) is used. // We might want to unify the way regarding AQL value. WellBhpThpCalculator(well_) - .updateThp(rho, stop_or_zero_rate_target, [this, summary_state]() { return well_.wellEcl().alq_value(summary_state); }, + .updateThp(rho, stop_or_zero_rate_target, [this, &summary_state]() { return well_.wellEcl().alq_value(summary_state); }, {FluidSystem::phaseIsActive(FluidSystem::waterPhaseIdx), FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx), FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)},