From f33f5ae6f4ec109de9bb6135339732d718ad3ce3 Mon Sep 17 00:00:00 2001 From: DennisGlaeser <dennis.glaeser@iws.uni-stuttgart.de> Date: Fri, 1 Dec 2017 14:35:29 +0100 Subject: [PATCH] [tpfa][fourier] use const variables where possible --- .../cellcentered/tpfa/fourierslaw.hh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/dumux/discretization/cellcentered/tpfa/fourierslaw.hh b/dumux/discretization/cellcentered/tpfa/fourierslaw.hh index 19bfa15b2f..782a4f3420 100644 --- a/dumux/discretization/cellcentered/tpfa/fourierslaw.hh +++ b/dumux/discretization/cellcentered/tpfa/fourierslaw.hh @@ -144,8 +144,12 @@ public: const auto& insideScv = fvGeometry.scv(insideScvIdx); const auto& insideVolVars = elemVolVars[insideScvIdx]; - auto insideLambda = ThermalConductivityModel::effectiveThermalConductivity(insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv); - Scalar ti = computeTpfaTransmissibility(scvf, insideScv, insideLambda, insideVolVars.extrusionFactor()); + const auto insideLambda = ThermalConductivityModel::effectiveThermalConductivity(insideVolVars, + problem.spatialParams(), + element, + fvGeometry, + insideScv); + const Scalar ti = computeTpfaTransmissibility(scvf, insideScv, insideLambda, insideVolVars.extrusionFactor()); // for the boundary (dirichlet) or at branching points we only need ti if (scvf.boundary() || scvf.numOutsideScvs() > 1) @@ -160,11 +164,11 @@ public: const auto& outsideVolVars = elemVolVars[outsideScvIdx]; const auto outsideElement = fvGeometry.fvGridGeometry().element(outsideScvIdx); - auto outsideLambda = ThermalConductivityModel::effectiveThermalConductivity(outsideVolVars, - problem.spatialParams(), - outsideElement, - fvGeometry, - outsideScv); + const auto outsideLambda = ThermalConductivityModel::effectiveThermalConductivity(outsideVolVars, + problem.spatialParams(), + outsideElement, + fvGeometry, + outsideScv); Scalar tj; if (dim == dimWorld) // assume the normal vector from outside is anti parallel so we save flipping a vector -- GitLab