From cced62edc0a3ca8d370b5fc4b17dfe4d3a8df48d Mon Sep 17 00:00:00 2001 From: hnil Date: Thu, 18 Jan 2024 18:18:42 +0100 Subject: [PATCH] fixed warning --- opm/simulators/linalg/ISTLSolverEbos.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/opm/simulators/linalg/ISTLSolverEbos.hpp b/opm/simulators/linalg/ISTLSolverEbos.hpp index dda4a09e5..97e1f60f7 100644 --- a/opm/simulators/linalg/ISTLSolverEbos.hpp +++ b/opm/simulators/linalg/ISTLSolverEbos.hpp @@ -536,7 +536,7 @@ std::unique_ptr blockJacobiAdjacency(const Grid& grid, // conservation equations, ignoring all other terms. std::function getWeightsCalculator(const PropertyTree& prm, const Matrix& matrix, - std::size_t pressureIndex) const + std::size_t pressIndex) const { std::function weightsCalculator; @@ -551,18 +551,18 @@ std::unique_ptr blockJacobiAdjacency(const Grid& grid, // weights will be created as default in the solver // assignment p = pressureIndex prevent compiler warning about // capturing variable with non-automatic storage duration - weightsCalculator = [matrix, transpose, pressureIndex]() { + weightsCalculator = [matrix, transpose, pressIndex]() { return Amg::getQuasiImpesWeights(matrix, - pressureIndex, + pressIndex, transpose); }; } else if ( weightsType == "trueimpes" ) { weightsCalculator = - [this, pressureIndex] + [this, pressIndex] { Vector weights(rhs_->size()); ElementContext elemCtx(simulator_); - Amg::getTrueImpesWeights(pressureIndex, weights, + Amg::getTrueImpesWeights(pressIndex, weights, simulator_.vanguard().gridView(), elemCtx, simulator_.model(), ThreadManager::threadId()); @@ -570,11 +570,11 @@ std::unique_ptr blockJacobiAdjacency(const Grid& grid, }; } else if (weightsType == "trueimpesanalytic" ) { weightsCalculator = - [this, pressureIndex] + [this, pressIndex] { Vector weights(rhs_->size()); ElementContext elemCtx(simulator_); - Amg::getTrueImpesWeightsAnalytic(pressureIndex, weights, + Amg::getTrueImpesWeightsAnalytic(pressIndex, weights, simulator_.vanguard().gridView(), elemCtx, simulator_.model(), ThreadManager::threadId());