From 93f85674a17212410f79bba8a55571cfcfc81d21 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Fri, 24 May 2019 17:15:02 +0200 Subject: [PATCH] Remove deprecation warnings from eff thermal cond interface --- .../cellcentered/mpfa/tensorlambdafactory.hh | 9 ++++----- dumux/flux/box/fourierslaw.hh | 7 +++++-- dumux/flux/box/fourierslawnonequilibrium.hh | 8 ++++++-- dumux/flux/cctpfa/fourierslaw.hh | 16 ++++++---------- dumux/flux/cctpfa/fourierslawnonequilibrium.hh | 7 +++++-- .../boundary/stokesdarcy/couplingdata.hh | 4 +++- .../implicit/nonisothermal/problem_conduction.hh | 3 +-- .../1p2c/nonisothermal/conduction/problem.hh | 3 +-- .../3p/implicit/conduction/problem.hh | 3 +-- .../implicit/nonisothermal/conduction/problem.hh | 3 +-- .../implicit/nonisothermal/convection/problem.hh | 3 +-- 11 files changed, 34 insertions(+), 32 deletions(-) diff --git a/dumux/discretization/cellcentered/mpfa/tensorlambdafactory.hh b/dumux/discretization/cellcentered/mpfa/tensorlambdafactory.hh index 7821049def..f1e0076220 100644 --- a/dumux/discretization/cellcentered/mpfa/tensorlambdafactory.hh +++ b/dumux/discretization/cellcentered/mpfa/tensorlambdafactory.hh @@ -33,6 +33,8 @@ #include <dumux/discretization/method.hh> #include <dumux/discretization/cellcentered/mpfa/tensorlambdafactory.hh> +#include <dumux/common/deprecated.hh> // effective thermal conductivity interface + namespace Dumux { /*! @@ -87,11 +89,8 @@ public: const auto& volVars, const auto& fvGeometry, const auto& scv) - { return ThermalConductivityModel::effectiveThermalConductivity(volVars, - problem.spatialParams(), - element, - fvGeometry, - scv); }; + { return Deprecated::template effectiveThermalConductivity<ThermalConductivityModel>( + volVars, problem.spatialParams(), element, fvGeometry, scv); }; } }; diff --git a/dumux/flux/box/fourierslaw.hh b/dumux/flux/box/fourierslaw.hh index b8d2d62a4f..bfcf3c031c 100644 --- a/dumux/flux/box/fourierslaw.hh +++ b/dumux/flux/box/fourierslaw.hh @@ -28,6 +28,7 @@ #include <dumux/common/math.hh> #include <dumux/common/properties.hh> #include <dumux/discretization/method.hh> +#include <dumux/common/deprecated.hh> namespace Dumux { @@ -67,8 +68,10 @@ public: const auto& outsideVolVars = elemVolVars[outsideScv]; // effective diffusion tensors - auto insideLambda = ThermalConductivityModel::effectiveThermalConductivity(insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv); - auto outsideLambda = ThermalConductivityModel::effectiveThermalConductivity(outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv); + auto insideLambda = Deprecated::template effectiveThermalConductivity<ThermalConductivityModel>( + insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv); + auto outsideLambda = Deprecated::template effectiveThermalConductivity<ThermalConductivityModel>( + outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv); // scale by extrusion factor insideLambda *= insideVolVars.extrusionFactor(); diff --git a/dumux/flux/box/fourierslawnonequilibrium.hh b/dumux/flux/box/fourierslawnonequilibrium.hh index 4838dfd709..a969bfc318 100644 --- a/dumux/flux/box/fourierslawnonequilibrium.hh +++ b/dumux/flux/box/fourierslawnonequilibrium.hh @@ -29,9 +29,11 @@ #include <dumux/common/math.hh> #include <dumux/common/properties.hh> +#include <dumux/common/deprecated.hh> #include <dumux/discretization/method.hh> + namespace Dumux { // forward declaration @@ -81,8 +83,10 @@ public: //when number of energyEq for the fluid are smaller than numPhases that means that we need an effecitve law if (numEnergyEqFluid < ModelTraits::numFluidPhases()) { - insideLambda += ThermalConductivityModel::effectiveThermalConductivity(insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv); - outsideLambda += ThermalConductivityModel::effectiveThermalConductivity(outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv); + insideLambda += Deprecated::template effectiveThermalConductivity<ThermalConductivityModel>( + insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv); + outsideLambda += Deprecated::template effectiveThermalConductivity<ThermalConductivityModel>( + outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv); } else { diff --git a/dumux/flux/cctpfa/fourierslaw.hh b/dumux/flux/cctpfa/fourierslaw.hh index de30a6a03c..65947081bc 100644 --- a/dumux/flux/cctpfa/fourierslaw.hh +++ b/dumux/flux/cctpfa/fourierslaw.hh @@ -30,6 +30,8 @@ #include <dumux/discretization/method.hh> #include <dumux/discretization/cellcentered/tpfa/computetransmissibility.hh> +#include <dumux/common/deprecated.hh> // effective thermal conductivity interface + namespace Dumux { // forward declaration @@ -142,11 +144,8 @@ public: const auto& insideScv = fvGeometry.scv(insideScvIdx); const auto& insideVolVars = elemVolVars[insideScvIdx]; - const auto insideLambda = ThermalConductivityModel::effectiveThermalConductivity(insideVolVars, - problem.spatialParams(), - element, - fvGeometry, - insideScv); + const auto insideLambda = Deprecated::template effectiveThermalConductivity<ThermalConductivityModel>( + 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 @@ -162,11 +161,8 @@ public: const auto& outsideVolVars = elemVolVars[outsideScvIdx]; const auto outsideElement = fvGeometry.fvGridGeometry().element(outsideScvIdx); - const auto outsideLambda = ThermalConductivityModel::effectiveThermalConductivity(outsideVolVars, - problem.spatialParams(), - outsideElement, - fvGeometry, - outsideScv); + const auto outsideLambda = Deprecated::template effectiveThermalConductivity<ThermalConductivityModel>( + 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 diff --git a/dumux/flux/cctpfa/fourierslawnonequilibrium.hh b/dumux/flux/cctpfa/fourierslawnonequilibrium.hh index 1b33d5cab8..3b478195fa 100644 --- a/dumux/flux/cctpfa/fourierslawnonequilibrium.hh +++ b/dumux/flux/cctpfa/fourierslawnonequilibrium.hh @@ -24,6 +24,7 @@ #ifndef DUMUX_DISCRETIZATION_CC_TPFA_FOURIERS_LAW_NONEQUILIBRIUM_HH #define DUMUX_DISCRETIZATION_CC_TPFA_FOURIERS_LAW_NONEQUILIBRIUM_HH +#include <dumux/common/deprecated.hh> #include <dumux/common/properties.hh> #include <dumux/discretization/method.hh> #include <dumux/discretization/cellcentered/tpfa/computetransmissibility.hh> @@ -117,7 +118,8 @@ public: //when number of energyEq for the fluid are smaller than numPhases that means that we need an effecitve law if (numEnergyEqFluid < ModelTraits::numFluidPhases()) { - insideLambda += ThermalConductivityModel::effectiveThermalConductivity(insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv); + insideLambda += Deprecated::template effectiveThermalConductivity<ThermalConductivityModel>( + insideVolVars, problem.spatialParams(), element, fvGeometry, insideScv); } else //numEnergyEqFluid >1 { @@ -150,7 +152,8 @@ public: //when number of energyEq for the fluid are smaller than numPhases that means that we need an effecitve law if (numEnergyEqFluid < ModelTraits::numFluidPhases()) { - outsideLambda += ThermalConductivityModel::effectiveThermalConductivity(outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv); + outsideLambda += Deprecated::template effectiveThermalConductivity<ThermalConductivityModel>( + outsideVolVars, problem.spatialParams(), element, fvGeometry, outsideScv); } else { diff --git a/dumux/multidomain/boundary/stokesdarcy/couplingdata.hh b/dumux/multidomain/boundary/stokesdarcy/couplingdata.hh index 47162178cd..dca966f4e9 100644 --- a/dumux/multidomain/boundary/stokesdarcy/couplingdata.hh +++ b/dumux/multidomain/boundary/stokesdarcy/couplingdata.hh @@ -31,6 +31,7 @@ #include <dumux/common/math.hh> #include <dumux/discretization/method.hh> #include <dumux/multidomain/couplingmanager.hh> +#include <dumux/common/deprecated.hh> namespace Dumux { @@ -423,7 +424,8 @@ protected: { using ThermalConductivityModel = GetPropType<SubDomainTypeTag<darcyIdx>, Properties::ThermalConductivityModel>; const auto& problem = this->couplingManager().problem(darcyIdx); - return ThermalConductivityModel::effectiveThermalConductivity(volVars, problem.spatialParams(), fvGeometry.fvGridGeometry().element(scv), fvGeometry, scv); + return Deprecated::template effectiveThermalConductivity<ThermalConductivityModel>( + volVars, problem.spatialParams(), fvGeometry.fvGridGeometry().element(scv), fvGeometry, scv); } /*! diff --git a/test/porousmediumflow/1p/implicit/nonisothermal/problem_conduction.hh b/test/porousmediumflow/1p/implicit/nonisothermal/problem_conduction.hh index 917347ae46..e41a276186 100644 --- a/test/porousmediumflow/1p/implicit/nonisothermal/problem_conduction.hh +++ b/test/porousmediumflow/1p/implicit/nonisothermal/problem_conduction.hh @@ -172,8 +172,7 @@ public: const auto densityS = volVars.solidDensity(); const auto heatCapacityS = volVars.solidHeatCapacity(); const auto storage = densityW*heatCapacityW*porosity + densityS*heatCapacityS*(1 - porosity); - const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars, this->spatialParams(), - someElement, someFvGeometry, someScv); + const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars); using std::max; time = max(time, 1e-10); for (const auto& element : elements(this->fvGridGeometry().gridView())) diff --git a/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/problem.hh b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/problem.hh index 144a01b6d0..30c5352e14 100644 --- a/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/problem.hh +++ b/test/porousmediumflow/1pnc/implicit/1p2c/nonisothermal/conduction/problem.hh @@ -194,8 +194,7 @@ public: const auto densityS = volVars.solidDensity(); const auto heatCapacityS = volVars.solidHeatCapacity(); const auto storage = densityW*heatCapacityW*porosity + densityS*heatCapacityS*(1 - porosity); - const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars, this->spatialParams(), - someElement, someFvGeometry, someScv); + const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars); using std::max; time = max(time, 1e-10); for (const auto& element : elements(this->fvGridGeometry().gridView())) diff --git a/test/porousmediumflow/3p/implicit/conduction/problem.hh b/test/porousmediumflow/3p/implicit/conduction/problem.hh index fa7cf29b59..fecb632d9a 100644 --- a/test/porousmediumflow/3p/implicit/conduction/problem.hh +++ b/test/porousmediumflow/3p/implicit/conduction/problem.hh @@ -177,8 +177,7 @@ public: const auto densityS = volVars.solidDensity(); const auto heatCapacityS = volVars.solidHeatCapacity(); const auto storage = densityW*heatCapacityW*porosity + densityS*heatCapacityS*(1 - porosity); - const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars, this->spatialParams(), - someElement, someFvGeometry, someScv); + const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars); using std::max; time = max(time, 1e-10); for (const auto& element : elements(this->fvGridGeometry().gridView())) diff --git a/test/porousmediumflow/richards/implicit/nonisothermal/conduction/problem.hh b/test/porousmediumflow/richards/implicit/nonisothermal/conduction/problem.hh index 060c2579eb..5af51fd32b 100644 --- a/test/porousmediumflow/richards/implicit/nonisothermal/conduction/problem.hh +++ b/test/porousmediumflow/richards/implicit/nonisothermal/conduction/problem.hh @@ -171,8 +171,7 @@ public: const auto densityS =volVars.solidDensity(); const auto heatCapacityS = volVars.solidHeatCapacity(); const auto storage = densityW*heatCapacityW*porosity + densityS*heatCapacityS*(1 - porosity); - const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars, this->spatialParams(), - someElement, someFvGeometry, someScv); + const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars); using std::max; time = max(time, 1e-10); for (const auto& element : elements(this->fvGridGeometry().gridView())) diff --git a/test/porousmediumflow/richards/implicit/nonisothermal/convection/problem.hh b/test/porousmediumflow/richards/implicit/nonisothermal/convection/problem.hh index 769708d596..fc4d1241c5 100644 --- a/test/porousmediumflow/richards/implicit/nonisothermal/convection/problem.hh +++ b/test/porousmediumflow/richards/implicit/nonisothermal/convection/problem.hh @@ -181,8 +181,7 @@ public: const auto densityS = volVars.solidDensity(); const auto heatCapacityS = volVars.solidHeatCapacity(); const auto storage = densityW*heatCapacityW*porosity + densityS*heatCapacityS*(1 - porosity); - const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars, this->spatialParams(), - someElement, someFvGeometry, someScv); + const auto effectiveThermalConductivity = ThermalConductivityModel::effectiveThermalConductivity(volVars); using std::max; time = max(time, 1e-10); for (const auto& element : elements(this->fvGridGeometry().gridView())) -- GitLab