Capture reference in lambda

This commit is contained in:
Vegard Kippe 2023-12-01 13:30:48 +01:00
parent 69f82f1104
commit fa6697a5fa

View File

@ -403,7 +403,7 @@ copyToWellState(const MultisegmentWellGeneric<Scalar>& mswell,
// Note: for the ALQ value, in the StandardWell, WellInterfaceGeneric::getALQ(well_state) is used. // Note: for the ALQ value, in the StandardWell, WellInterfaceGeneric::getALQ(well_state) is used.
// We might want to unify the way regarding AQL value. // We might want to unify the way regarding AQL value.
WellBhpThpCalculator(well_) 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::waterPhaseIdx),
FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx), FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx),
FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)}, FluidSystem::phaseIsActive(FluidSystem::gasPhaseIdx)},