Commit d3d98ad0 authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[deprecated] stop support for outdated (after 3.1) neumann() interface

parent ecb2d27f
......@@ -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;
......
......@@ -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();
......
......@@ -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());
......
......@@ -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 //
////////////////////////////////////////////
......
......@@ -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();
......
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment