diff --git a/dumux/adaptive/initializationindicator.hh b/dumux/adaptive/initializationindicator.hh index 885def68414a3525c5fed00886f5103c9e6a189e..27cefe277bf9637d30d5842d0861ee238d430906 100644 --- a/dumux/adaptive/initializationindicator.hh +++ b/dumux/adaptive/initializationindicator.hh @@ -213,7 +213,7 @@ public: // we are on a pure Neumann boundary else if(refineAtFluxBC_) { - const auto fluxes = Deprecated::neumann(*problem_, element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf); + const auto fluxes = problem_->neumann(element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf); if (fluxes.infinity_norm() > eps_) { indicatorVector_[eIdx] = true; @@ -247,7 +247,7 @@ public: //! check if scvf is on Neumann boundary if (scvf.boundary() && bcTypes[scvf.insideScvIdx()].hasNeumann()) { - const auto fluxes = Deprecated::neumann(*problem_, element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf); + const auto fluxes = problem_->neumann(element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf); if (fluxes.infinity_norm() > eps_) { indicatorVector_[eIdx] = true; diff --git a/dumux/assembly/boxlocalresidual.hh b/dumux/assembly/boxlocalresidual.hh index 7e28e5a254d69b9506c63e6ad76d17c6812910c0..04237a04b5f6717e47bf98c3b95a004bc3c38c68 100644 --- a/dumux/assembly/boxlocalresidual.hh +++ b/dumux/assembly/boxlocalresidual.hh @@ -112,7 +112,7 @@ public: // are enforced strongly by replacing the residual entry afterwards. if (bcTypes.hasNeumann()) { - auto neumannFluxes = Deprecated::neumann(problem, element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf); + auto neumannFluxes = problem.neumann(element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf); // multiply neumann fluxes with the area and the extrusion factor neumannFluxes *= scvf.area()*elemVolVars[scv].extrusionFactor(); diff --git a/dumux/assembly/cclocalresidual.hh b/dumux/assembly/cclocalresidual.hh index fb0da30614116d06e6ce2dd833ccb359161d87e9..94e745bc3bd7a8a525143c2834ddae58398a552e 100644 --- a/dumux/assembly/cclocalresidual.hh +++ b/dumux/assembly/cclocalresidual.hh @@ -97,7 +97,7 @@ public: // Neumann and Robin ("solution dependent Neumann") boundary conditions else if (bcTypes.hasNeumann() && !bcTypes.hasDirichlet()) { - auto neumannFluxes = Deprecated::neumann(problem, element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf); + auto neumannFluxes = problem.neumann(element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf); // multiply neumann fluxes with the area and the extrusion factor const auto& scv = fvGeometry.scv(scvf.insideScvIdx()); diff --git a/dumux/common/deprecated.hh b/dumux/common/deprecated.hh index 1c9ecfba1597011bcb14ae6424bc33e5d1273809..efffe14959feeec16c2ff2b23144c39c0d8bd16a 100644 --- a/dumux/common/deprecated.hh +++ b/dumux/common/deprecated.hh @@ -42,81 +42,6 @@ namespace Dumux { // so most likely you don't want to use this in your code namespace Deprecated { -//////////////////////////////////////////////////////// -///// REMOVE THIS AFTER RELEASE 3.1 -//////////////////////////////////////////////////////// - -// support old interface of the effective thermal conductivity laws -template<class VV> -struct HasNewEffThermCondIF -{ - template<class ETC> - auto operator()(ETC&& e) -> decltype(e.effectiveThermalConductivity(std::declval<const VV&>())) {} -}; - -template<class ETC, class VV, class SpatialParams, class Element, class FVGeometry, - typename std::enable_if_t<!decltype(isValid(HasNewEffThermCondIF<VV>()).template check<ETC>())::value, int> = 0> -auto effectiveThermalConductivity(const VV& volVars, - const SpatialParams& spatialParams, - const Element& element, - const FVGeometry& fvGeometry, - const typename FVGeometry::SubControlVolume& scv) -{ - return ETC::effectiveThermalConductivity(volVars, spatialParams, element, fvGeometry, scv); -} - -template<class ETC, class VV, class SpatialParams, class Element, class FVGeometry, - typename std::enable_if_t<decltype(isValid(HasNewEffThermCondIF<VV>()).template check<ETC>())::value, int> = 0> -auto effectiveThermalConductivity(const VV& volVars, - const SpatialParams& spatialParams, - const Element& element, - const FVGeometry& fvGeometry, - const typename FVGeometry::SubControlVolume& scv) -{ - return ETC::effectiveThermalConductivity(volVars); -} - -// support old interface of the neumann() function on problems -template<class E, class FVEG, class EVV, class EFVC> -class HasNewNeumannIF -{ - using SCVF = typename FVEG::SubControlVolumeFace; - -public: - template<class P> - auto operator()(P&& p) -> decltype(p.neumann(std::declval<const E&>(), - std::declval<const FVEG&>(), - std::declval<const EVV&>(), - std::declval<const EFVC&>(), - std::declval<const SCVF&>())) - {} -}; - -template<class P, class E, class FVEG, class EVV, class EFVC, - typename std::enable_if_t<!decltype(isValid(HasNewNeumannIF<E, FVEG, EVV, EFVC>()).template check<P>())::value, int> = 0> -auto DUNE_DEPRECATED_MSG("Use new neumann() interface (see common/fvproblem.hh) that additionally receives the element flux variables cache in your problem!. Will be removed after 3.1 release") -neumann(const P& problem, - const E& element, - const FVEG& fvGeometry, - const EVV& elemVolVars, - const EFVC& elemFluxVarsCache, - const typename FVEG::SubControlVolumeFace& scvf) -{ - return problem.neumann(element, fvGeometry, elemVolVars, scvf); -} - -template<class P, class E, class FVEG, class EVV, class EFVC, - typename std::enable_if_t<decltype(isValid(HasNewNeumannIF<E, FVEG, EVV, EFVC>()).template check<P>())::value, int> = 0> -auto neumann(const P& problem, - const E& element, - const FVEG& fvGeometry, - const EVV& elemVolVars, - const EFVC& elemFluxVarsCache, - const typename FVEG::SubControlVolumeFace& scvf) -{ - return problem.neumann(element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf); -} - //////////////////////////////////////////// // Remove the following after Release 3.2 // //////////////////////////////////////////// diff --git a/dumux/multidomain/facet/box/localresidual.hh b/dumux/multidomain/facet/box/localresidual.hh index f8c4465c33b0a189acc094bf611c8620e7bc75d6..eb4fa68731b311d37dc4fafda0b5e2c3eaba977b 100644 --- a/dumux/multidomain/facet/box/localresidual.hh +++ b/dumux/multidomain/facet/box/localresidual.hh @@ -110,7 +110,7 @@ public: // Neumann and Robin ("solution dependent Neumann") boundary conditions if (bcTypes.hasNeumann() && !bcTypes.hasDirichlet()) { - auto neumannFluxes = Deprecated::neumann(problem, element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf); + auto neumannFluxes = problem.neumann(element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf); // multiply neumann fluxes with the area and the extrusion factor neumannFluxes *= scvf.area()*elemVolVars[scv].extrusionFactor(); diff --git a/dumux/porousmediumflow/velocity.hh b/dumux/porousmediumflow/velocity.hh index 771a9207a10531e539b32a625d6994113609da01..96cac1dc7ebdf216e1cf4e2280dad50c8469fc2a 100644 --- a/dumux/porousmediumflow/velocity.hh +++ b/dumux/porousmediumflow/velocity.hh @@ -301,7 +301,7 @@ public: else { // check if we have Neumann no flow, we can just use 0 - const auto neumannFlux = Deprecated::neumann(problem_, element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf); + const auto neumannFlux = problem_.neumann(element, fvGeometry, elemVolVars, elemFluxVarsCache, scvf); using NumEqVector = std::decay_t<decltype(neumannFlux)>; if (Dune::FloatCmp::eq<NumEqVector, Dune::FloatCmp::CmpStyle::absolute>(neumannFlux, NumEqVector(0.0), 1e-30)) scvfFluxes[scvfIndexInInside[localScvfIdx]] = 0;