From 9b753c4ae857832f30636e4960ca489ad4794667 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Mon, 13 Apr 2020 18:59:26 +0200 Subject: [PATCH] [cleanup][ff] Remove deprecated interfaces --- .../staggered/freeflow/boundarytypes.hh | 26 --------- .../staggered/gridfluxvariablescache.hh | 6 --- dumux/freeflow/navierstokes/problem.hh | 54 +------------------ 3 files changed, 1 insertion(+), 85 deletions(-) diff --git a/dumux/discretization/staggered/freeflow/boundarytypes.hh b/dumux/discretization/staggered/freeflow/boundarytypes.hh index 178915cd32..a9a1f2d4e0 100644 --- a/dumux/discretization/staggered/freeflow/boundarytypes.hh +++ b/dumux/discretization/staggered/freeflow/boundarytypes.hh @@ -94,14 +94,6 @@ public: static_assert(AlwaysFalse<T>::value, "Setting all boundary types to Neumann not permitted!"); } - /*! - * \brief Set a boundary condition for a single equation to - * Beavers-Joseph-Saffman (special case of Dirichlet b.c.). - */ - [[deprecated("Use setBeaversJoseph instead. Will be removed after 3.2")]] - void setBJS(int eqIdx) - { setBeaversJoseph(eqIdx); } - /*! * \brief Set a boundary condition for a single equation to * Beavers-Joseph(-Saffmann) (special case of Dirichlet b.c.). @@ -113,16 +105,6 @@ public: boundaryInfo_[eqIdx].isBeaversJoseph = true; } - /*! - * \brief Returns true if an equation is used to specify a - * Beavers-Joseph-Saffman boundary condition. - * - * \param eqIdx The index of the equation - */ - [[deprecated("Use isBeaversJoseph instead. Will be removed after 3.2")]] - bool isBJS(unsigned eqIdx) const - { return isBeaversJoseph(eqIdx); } - /*! * \brief Returns true if an equation is used to specify a * Beavers-Joseph(-Saffman) boundary condition. @@ -132,14 +114,6 @@ public: bool isBeaversJoseph(unsigned eqIdx) const { return boundaryInfo_[eqIdx].isBeaversJoseph; } - /*! - * \brief Returns true if some equation is used to specify a - * Beavers-Joseph-Saffman boundary condition. - */ - [[deprecated("Use hasBeaversJoseph instead. Will be removed after 3.2")]] - bool hasBJS() const - { return hasBeaversJoseph(); } - /*! * \brief Returns true if some equation is used to specify a * Beavers-Joseph(-Saffman) boundary condition. diff --git a/dumux/discretization/staggered/gridfluxvariablescache.hh b/dumux/discretization/staggered/gridfluxvariablescache.hh index ccef6e2e20..d861f7f544 100644 --- a/dumux/discretization/staggered/gridfluxvariablescache.hh +++ b/dumux/discretization/staggered/gridfluxvariablescache.hh @@ -91,12 +91,6 @@ public: //! export the type of the local view using LocalView = typename Traits::template LocalView<ThisType, cachingEnabled>; - [[deprecated("Will be removed after 3.2. Use StaggeredGridFluxVariablesCache(problem) instead.")]] - StaggeredGridFluxVariablesCache(const Problem& problem, const std::string& paramGroup) - : problemPtr_(&problem) - , staggeredUpwindMethods_(paramGroup) - {} - StaggeredGridFluxVariablesCache(const Problem& problem) : problemPtr_(&problem) , staggeredUpwindMethods_(problem.paramGroup()) diff --git a/dumux/freeflow/navierstokes/problem.hh b/dumux/freeflow/navierstokes/problem.hh index 65de5db155..ab62ad440c 100644 --- a/dumux/freeflow/navierstokes/problem.hh +++ b/dumux/freeflow/navierstokes/problem.hh @@ -212,38 +212,12 @@ public: return asImp_().alphaBJ(scvf) / sqrt(asImp_().permeability(element, scvf)); } - /*! - * \brief Returns the velocity in the porous medium (which is 0 by default according to Saffmann). - * \note This method is deprecated. Use porousMediumVelocity(element, scvf) instead, returning a velocity vector. Will be removed after 3.2 - */ - Scalar velocityPorousMedium(const Element& element, const SubControlVolumeFace& scvf) const - { - // Redirect to helper method to avoid spurious deprecation warnings. TODO: Remove after 3.2! - return deprecatedVelocityPorousMedium_(); - } - /*! * \brief Returns the velocity in the porous medium (which is 0 by default according to Saffmann). */ VelocityVector porousMediumVelocity(const Element& element, const SubControlVolumeFace& scvf) const { - // TODO: return VelocityVector(0.0) after 3.2! - return VelocityVector(getVelPM_(element, scvf)); - } - - //! helper function to evaluate the slip velocity on the boundary when the Beavers-Joseph condition is used - [[deprecated("Use beaversJosephVelocity(element, scv, ownScvf, faceOnPorousBoundary, velocitySelf, tangentialVelocityGradient) instead. Will be removed after 3.2")]] - const Scalar beaversJosephVelocity(const Element& element, - const SubControlVolume& scv, - const SubControlVolumeFace& faceOnPorousBoundary, - const Scalar velocitySelf, - const Scalar tangentialVelocityGradient) const - { - // du/dy + dv/dx = alpha/sqrt(K) * (u_boundary-uPM) - // beta = alpha/sqrt(K) - const Scalar betaBJ = asImp_().betaBJ(element, faceOnPorousBoundary); - const Scalar distance = (faceOnPorousBoundary.center() - scv.center()).two_norm(); - return (tangentialVelocityGradient*distance + asImp_().velocityPorousMedium(element,faceOnPorousBoundary)*betaBJ*distance + velocitySelf) / (betaBJ*distance + 1.0); + return VelocityVector(0.0); } //! helper function to evaluate the slip velocity on the boundary when the Beavers-Joseph condition is used @@ -269,32 +243,6 @@ public: } private: - - // Auxiliary method handling deprecation warnings. TODO: Remove after 3.2! - Scalar getVelPM_(const Element& element, const SubControlVolumeFace& scvf) const - { - // Check if the user problem implements the deprecated velocityPorousMedium method - static constexpr bool implHasVelocityPorousMedium = !std::is_same<decltype(&Implementation::velocityPorousMedium), decltype(&NavierStokesProblem::velocityPorousMedium)>::value; - // This check would always trigger a spurious deprecation warning if the base class' (NavierStokesProblem) velocityPorousMedium method was equipped with a deprecation warning. - // This is why we need another level of redirection there. - - // Forward either to user impl (thereby raising a deprecation warning) or return 0.0 by default - return deprecationHelper_(element, scvf, std::integral_constant<bool, implHasVelocityPorousMedium>{}); - } - - [[deprecated("\nvelocityPorousMedium(element, scvf) is deprecated. Use porousMediumVelocity(element, scvf) instead, returning a velocity vector. Will be removed after 3.2")]] - Scalar deprecationHelper_(const Element& element, const SubControlVolumeFace& scvf, std::true_type) const - { return asImp_().velocityPorousMedium(element, scvf); } - - // Return 0.0 by default. TODO: Remove this after 3.2 - Scalar deprecationHelper_(const Element& element, const SubControlVolumeFace& scvf, std::false_type) const - { return 0.0; } - - // Auxiliary method to trigger a deprecation warning. - [[deprecated("\nvelocityPorousMedium(element, scvf) is deprecated. Use porousMediumVelocity(element, scvf) instead, returning a velocity vector. Will be removed after 3.2")]] - Scalar deprecatedVelocityPorousMedium_() const - { return 0.0; } - //! Returns the implementation of the problem (i.e. static polymorphism) Implementation &asImp_() { return *static_cast<Implementation *>(this); } -- GitLab