From d3d98ad0b94ed7231e183a4347ac565e4d5ac232 Mon Sep 17 00:00:00 2001 From: "Dennis.Glaeser" <dennis.glaeser@iws.uni-stuttgart.de> Date: Wed, 4 Mar 2020 18:29:40 +0100 Subject: [PATCH] [deprecated] stop support for outdated (after 3.1) neumann() interface --- dumux/adaptive/initializationindicator.hh | 4 +- dumux/assembly/boxlocalresidual.hh | 2 +- dumux/assembly/cclocalresidual.hh | 2 +- dumux/common/deprecated.hh | 45 -------------------- dumux/multidomain/facet/box/localresidual.hh | 2 +- dumux/porousmediumflow/velocity.hh | 2 +- 6 files changed, 6 insertions(+), 51 deletions(-) diff --git a/dumux/adaptive/initializationindicator.hh b/dumux/adaptive/initializationindicator.hh index 885def6841..27cefe277b 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 7e28e5a254..04237a04b5 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 fb0da30614..94e745bc3b 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 27bedfb97c..efffe14959 100644 --- a/dumux/common/deprecated.hh +++ b/dumux/common/deprecated.hh @@ -42,51 +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 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 f8c4465c33..eb4fa68731 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 771a9207a1..96cac1dc7e 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; -- GitLab