Commit 1e6580fd authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'cleanup/remove-deprecated' into 'master'

Cleanup/remove deprecated

See merge request !1879
parents 9ee1495d ddfc8563
......@@ -67,7 +67,6 @@ public:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using JacobianMatrix = GetPropType<TypeTag, Properties::JacobianMatrix>;
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using FVGridGeometry [[deprecated("Use GridGeometry instead. FVGridGeometry will be removed after 3.1!")]] = GridGeometry;
using Problem = GetPropType<TypeTag, Properties::Problem>;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
......@@ -270,11 +269,6 @@ public:
const Problem& problem() const
{ return *problem_; }
//! The global finite volume geometry
[[deprecated("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const GridGeometry& fvGridGeometry() const
{ return gridGeometry(); }
//! The global finite volume geometry
const GridGeometry& gridGeometry() const
{ return *gridGeometry_; }
......
......@@ -22,7 +22,6 @@ fvproblem.hh
indextraits.hh
integrate.hh
intersectionmapper.hh
intrange.hh
loggingparametertree.hh
math.hh
monotonecubicspline.hh
......
......@@ -578,11 +578,6 @@ public:
// \}
//! The finite volume grid geometry
[[deprecated("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const GridGeometry& fvGridGeometry() const
{ return gridGeometry(); }
//! The finite volume grid geometry
const GridGeometry& gridGeometry() const
{ return *gridGeometry_; }
......
......@@ -222,9 +222,6 @@ public:
using Point = typename Policy::Point;
using Intersection = typename Policy::Intersection;
//! Deprecated alias, will be removed after 3.1
using IntersectionType [[deprecated("Please use Intersection instead")]] = Intersection;
//! Determine if the two geometries intersect and compute the intersection geometry
static bool intersection(const Geometry1& geo1, const Geometry2& geo2, Intersection& intersection)
{
......@@ -253,9 +250,6 @@ public:
using Point = typename Policy::Point;
using Intersection = typename Policy::Intersection;
//! Deprecated alias, will be removed after 3.1
using IntersectionType [[deprecated("Please use Intersection instead")]] = Intersection;
/*!
* \brief Colliding two segments
* \param geo1/geo2 The geometries to intersect
......@@ -370,9 +364,6 @@ public:
using Point = typename Policy::Point;
using Intersection = typename Policy::Intersection;
//! Deprecated alias, will be removed after 3.1
using IntersectionType [[deprecated("Please use Intersection instead")]] = Intersection;
private:
static constexpr ctype eps_ = 1.5e-7; // base epsilon for floating point comparisons
using ReferenceElements = typename Dune::ReferenceElements<ctype, dim1>;
......@@ -519,9 +510,6 @@ public:
using Point = typename Policy::Point;
using Intersection = typename Policy::Intersection;
//! Deprecated alias, will be removed after 3.1
using IntersectionType [[deprecated("Please use Intersection instead")]] = Intersection;
private:
static constexpr ctype eps_ = 1.5e-7; // base epsilon for floating point comparisons
using ReferenceElementsGeo1 = typename Dune::ReferenceElements<ctype, dim1>;
......@@ -668,9 +656,6 @@ public:
using Point = typename Policy::Point;
using Intersection = typename Policy::Intersection;
//! Deprecated alias, will be removed after 3.1
using IntersectionType [[deprecated("Please use Intersection instead")]] = Intersection;
private:
static constexpr ctype eps_ = 1.5e-7; // base epsilon for floating point comparisons
using ReferenceElements = typename Dune::ReferenceElements<ctype, dim1>;
......@@ -820,9 +805,6 @@ public:
using Point = typename Policy::Point;
using Intersection = typename Policy::Intersection;
//! Deprecated alias, will be removed after 3.1
using IntersectionType [[deprecated("Please use Intersection instead")]] = Intersection;
private:
static constexpr ctype eps_ = 1.5e-7; // base epsilon for floating point comparisons
using ReferenceElementsGeo1 = typename Dune::ReferenceElements<ctype, dim1>;
......@@ -1015,9 +997,6 @@ public:
using Point = typename Policy::Point;
using Intersection = typename Policy::Intersection;
//! Deprecated alias, will be removed after 3.1
using IntersectionType [[deprecated("Please use Intersection instead")]] = Intersection;
private:
static constexpr ctype eps_ = 1.5e-7; // base epsilon for floating point comparisons
using ReferenceElements = typename Dune::ReferenceElements<ctype, dim1>;
......@@ -1096,25 +1075,6 @@ public:
<< geo1.type() << ", "<< geo1.corners() << " corners.");
}
/*!
* \brief Colliding segment and convex polyhedron
* \note Algorithm based on the one from "Real-Time Collision Detection" by Christer Ericson,
* published by Morgan Kaufmann Publishers, (c) 2005 Elsevier Inc. (Chapter 5.3.6)
* \param is If the geometries collide, is holds the corner points of
* the intersection object in global coordinates.
* \param a/b/c Points of triangle
* \param p/q Points of segment
* \note This overload is used when point-like intersections are seeked
*/
template<class P = Policy, std::enable_if_t<P::dimIntersection == 0, int> = 0>
[[deprecated("Please use intersection(triangle, segment, ...) instead")]]
static bool intersection(const Point& a, const Point& b, const Point& c,
const Point& p, const Point& q,
Intersection& is)
{
return intersect_<Policy>(a, b, c, p, q, is);
}
private:
/*!
* \brief Obtain local coordinates of start/end point of the intersecting segment.
......
......@@ -213,36 +213,6 @@ std::vector<Dune::FieldVector<ctype, dimWorld>> grahamConvexHull(const std::vect
return grahamConvexHullImpl<dim>(copyPoints);
}
// deprecated interfaces
#ifndef DOXYGEN
template<class ctype>
[[deprecated("Use grahamConvexHull<dim> with dim as template argument. Will be removed after 3.1")]]
std::vector<Dune::FieldVector<ctype, 3>>
grahamConvexHull2d3d(const std::vector<Dune::FieldVector<ctype, 3>>& points)
{
auto copyPoints = points;
return grahamConvexHull<2>(copyPoints);
}
template<class ctype>
[[deprecated("Use grahamConvexHull<dim> with dim as template argument. Will be removed after 3.1")]]
std::vector<Dune::FieldVector<ctype, 3>>
grahamConvexHull2d3d(std::vector<Dune::FieldVector<ctype, 3>>& points)
{ return grahamConvexHull<2>(points); }
/*!
* \ingroup Geometry
* \brief Triangulate area given points of the convex hull
* \note Assumes all points of the convex hull are coplanar
* \note This inserts a mid point and connects all corners with that point to triangles
*/
template<class ctype>
[[deprecated("Please use triangulate. Will be removed after 3.1")]]
std::vector<std::array<Dune::FieldVector<ctype, 3>, 3> >
triangulateConvexHull(const std::vector<Dune::FieldVector<ctype, 3>>& convexHull)
{ return triangulate<2, 3>(convexHull); }
#endif
} // end namespace Dumux
# endif
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \ingroup Common
* \brief A class to create an iterable integer range
*/
#ifndef DUMUX_INTEGER_RANGE_HH
#define DUMUX_INTEGER_RANGE_HH
#warning "This header is deprecated. Use Dune::IntegralRange instead."
#include <cassert>
namespace Dumux {
/*!
* \ingroup Common
* \brief This class generates a IntRange [a,b) which can be used in a for loop, e.g.
* for(auto i : IntRange(3) { ... i = 0, 1, 2 } or
* for(auto i : IntRange(5, 8) { ... i = 5, 6, 7 }
* see: https://en.wikipedia.org/wiki/Generator_(computer_programming)
*/
class [[deprecated("Use Dune::IntegralRange instead. Will be removed after 3.1!")]]
IntRange
{
public:
// constructors
IntRange(int end): last_(end), iter_(0) { assert(end > 0); }
IntRange(int begin, int end): last_(end), iter_(begin) { assert(end > begin); }
IntRange() = delete;
// Iterable functions
const IntRange& begin() const { return *this; }
const IntRange& end() const { return *this; }
// Iterator functions
bool operator!=(const IntRange&) const { return iter_ < last_; }
void operator++() { ++iter_; }
int operator*() const { return iter_; }
private:
int last_;
int iter_;
};
} // namespace Dumux
#endif
......@@ -261,47 +261,6 @@ public:
return commandLineArgs;
}
[[deprecated("parseCommandLineArguments is deprecated and will be removed after 3.1")]]
static std::string parseCommandLineArguments(int argc, char **argv,
std::string parameterFileName = "")
{
for (int i = 1; i < argc; ++i)
{
if (argv[i][0] != '-' && i == 1)
{
// try to pass first argument as parameter file
parameterFileName = argv[1];
continue;
}
if (argv[i][0] != '-')
DUNE_THROW(ParameterException, "-> Command line argument " << i << " (='" << argv[i] << "') is invalid. <-");
if (i+1 == argc)
DUNE_THROW(ParameterException, "-> No argument given for parameter '" << argv[i] << "'! <-");
// check for the ParameterFile argument
if (argv[i]+1 == std::string("ParameterFile")) // +1 removes the '-'
{
parameterFileName = argv[i+1];
++i;
}
// add all other options as key value pairs
else
{
// read a -MyOpt VALUE option
std::string paramName = argv[i]+1; // +1 removes the '-'
std::string paramValue = argv[i+1];
++i; // In the case of '-MyOpt VALUE' each pair counts as two arguments
// Put the key=value pair into the parameter tree
paramTree_()[paramName] = paramValue;
}
}
return parameterFileName;
}
/*!
* \brief Get the parameter tree
*
......@@ -402,22 +361,6 @@ private:
}
};
/*!
* \ingroup Common
* \brief a free function to set model- or problem-specific default parameters
*/
[[deprecated("Setting parameters is deprecated and will be removed after 3.1")]]
void setParam(Dune::ParameterTree& params,
const std::string& group,
const std::string& key,
const std::string& value)
{
if(group.empty())
params[key] = value;
else
params[group + "." + key] = value;
}
/*!
* \ingroup Common
* \brief A free function to get a parameter from the parameter tree singleton
......
......@@ -72,9 +72,6 @@ template<class TypeTag, class MyTypeTag>
struct PointSource { using type = UndefinedProperty; }; //!< Property defining the type of point source used
template<class TypeTag, class MyTypeTag>
struct PointSourceHelper { using type = UndefinedProperty; }; //!< Property defining the class that computes which sub control volume point sources belong to
// TODO: Remove deprecated property VtkOutputFields
template<class TypeTag, class MyTypeTag>
struct VtkOutputFields { using type = UndefinedProperty; }; //!< A class helping models to define default vtk output parameters
template<class TypeTag, class MyTypeTag>
struct IOFields { using type = UndefinedProperty; }; //!< A class helping models to define input and output fields
template<class TypeTag, class MyTypeTag>
......@@ -112,64 +109,10 @@ struct BalanceEqOpts { using type = UndefinedProperty; }; //!< A class
template<class TypeTag, class MyTypeTag>
struct ElementBoundaryTypes { using type = UndefinedProperty; }; //!< Stores the boundary types on an element
#if defined(__clang__) && !defined(DONT_EMIT_CLANG_GRIDGEOMETRY_WARNING)
#warning "The properties `FVGridGeometry` and `EnableFVGridGeometryCache` \
are deprecated in favor of `GridGeometry` and `EnableGridGeometryCache`. \
The old properties will be removed after release 3.1. \
If clang is used, no deprecation warnings are emitted. \
We recommend to use gcc for getting rid of the warnings. \
You can suppress this message by defining the preprocessor variable \
DONT_EMIT_CLANG_GRIDGEOMETRY_WARNING."
#endif
// TODO: Remove deprecated property FVGridGeometry after 3.1
template<class TypeTag, class MyTypeTag>
struct [[deprecated("Use GridGeometry instead.")]] FVGridGeometry { using type = UndefinedProperty; }; //!< The type of the global finite volume geometry
// TODO: Remove deprecated property EnableFVGridGeometryCache after 3.1
template<class TypeTag, class MyTypeTag>
struct [[deprecated("Use EnableGridGeometryCache instead.")]] EnableFVGridGeometryCache { using type = UndefinedProperty; }; //!< specifies if geometric data is saved (faster, but more memory consuming)
// Dumux 3.1 changes the property `FVGridGeometry` to `GridGeometry`.
// For ensuring backward compatibility, it is necessary to set the default value
// of the new property to the old one, see the discussion in MR 1647.
// Use diagnostic pragmas to prevent the emission of a warning message.
// TODO after 3.1: change default vale to `UndefinedProperty`, remove pragmas
// and comment.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
template<class TypeTag, class T>
struct GridGeometryHelper
{ using type = GetPropType<TypeTag, Properties::FVGridGeometry>; };
template<class TypeTag>
struct GridGeometryHelper<TypeTag, UndefinedProperty>
{ using type = UndefinedProperty; };
template<class TypeTag, class MyTypeTag>
struct GridGeometry
{
using type = typename GridGeometryHelper<TypeTag, typename FVGridGeometry<TypeTag, MyTypeTag>::type>::type;
};
template<class TypeTag, bool hasParentTypeTag>
struct EnableGridGeometryCacheHelper
{ using type = UndefinedProperty; };
template<class TypeTag>
struct EnableGridGeometryCacheHelper<TypeTag, false>
{
// fallback
static constexpr bool value = getPropValue<TypeTag, Properties::EnableFVGridGeometryCache>();
};
// only use the fallback (EnableFVGridGeometryCache) if none
// of the TypeTags define EnableGridGeometryCache
struct GridGeometry { using type = UndefinedProperty; };
template <class TypeTag, class MyTypeTag>
struct EnableGridGeometryCache : public EnableGridGeometryCacheHelper<TypeTag, Detail::hasParentTypeTag<MyTypeTag>(int{})>
{};
#pragma GCC diagnostic pop
struct EnableGridGeometryCache { using type = UndefinedProperty; };
template<class TypeTag, class MyTypeTag>
struct VolumeVariables { using type = UndefinedProperty; }; //!< The secondary variables within a sub-control volume
......
......@@ -60,12 +60,6 @@ struct ModelDefaultParameters<TypeTag, TTag::ModelProperties>
static void defaultParams(Dune::ParameterTree& tree, const std::string& group = "") { }
};
//! \todo this property is deprecated use IOFields instead!
template<class TypeTag>
struct VtkOutputFields<TypeTag, TTag::ModelProperties> {
using type [[deprecated("This property is deprecated use property IOFields instead")]] = GetPropType<TypeTag, Properties::IOFields>;
};
//! Set the default to an implementation throwing a NotImplemented error
template<class TypeTag>
struct IOFields<TypeTag, TTag::ModelProperties> { using type = DefaultIOFields; };
......
......@@ -157,15 +157,6 @@ public:
return *elementMap_;
}
/*!
* \brief Get an element from a sub-control volume
* \note This interface is deprecated
*/
template<class Scv, std::enable_if_t<!std::is_arithmetic<Scv>::value, int> = 0 >
[[deprecated("Use element(elementIndex) instead. Will be removed after 3.1!")]] Element
element(const Scv& scv) const
{ return elementMap()[scv.elementIndex()]; }
/*!
* \brief Get an element from a global element index
*/
......
......@@ -51,16 +51,9 @@ namespace TTag {
struct BoxModel { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
} // end namespace TTag
// Dumux 3.1 changes the property `FVGridGeometry` to `GridGeometry`.
// For ensuring backward compatibility on the user side, it is necessary to
// stick to the old name for the specializations, see the discussion in MR 1647.
// Use diagnostic pragmas to prevent the emission of a warning message.
// TODO after 3.1: Rename to GridGeometry, remove the pragmas and this comment.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
//! Set the default for the global finite volume geometry
//! Set the default for the grid geometry
template<class TypeTag>
struct FVGridGeometry<TypeTag, TTag::BoxModel>
struct GridGeometry<TypeTag, TTag::BoxModel>
{
private:
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
......@@ -69,7 +62,6 @@ private:
public:
using type = BoxFVGridGeometry<Scalar, GridView, enableCache>;
};
#pragma GCC diagnostic pop
//! The grid volume variables vector class
template<class TypeTag>
......
......@@ -67,7 +67,6 @@ public:
using SubControlVolumeFace = typename GG::SubControlVolumeFace;
//! export type of finite volume grid geometry
using GridGeometry = GG;
using FVGridGeometry [[deprecated ("Use GridGeometry instead. Will be removed after 3.1!")]]= GridGeometry;
//! the maximum number of scvs per element (2^dim for cubes)
static constexpr std::size_t maxNumElementScvs = (1<<dim);
......@@ -148,10 +147,7 @@ public:
eIdx_ = gridGeometry().elementMapper().index(element);
}
//! The global finite volume geometry we are a restriction of
[[deprecated ("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const GridGeometry& fvGridGeometry() const
{ return gridGeometry(); }
//! The grid geometry we are a restriction of
const GridGeometry& gridGeometry() const
{ return *gridGeometryPtr_; }
......@@ -190,7 +186,6 @@ public:
using SubControlVolumeFace = typename GG::SubControlVolumeFace;
//! export type of finite volume grid geometry
using GridGeometry = GG;
using FVGridGeometry [[deprecated ("Use GridGeometry instead. Will be removed after 3.1!")]]= GridGeometry;
//! the maximum number of scvs per element (2^dim for cubes)
static constexpr std::size_t maxNumElementScvs = (1<<dim);
......@@ -269,10 +264,7 @@ public:
makeElementGeometries(element);
}
//! The global finite volume geometry we are a restriction of
[[deprecated ("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const GridGeometry& fvGridGeometry() const
{ return gridGeometry(); }
//! The grid geometry we are a restriction of
const GridGeometry& gridGeometry() const
{ return *gridGeometryPtr_; }
......
......@@ -96,16 +96,9 @@ public:
using type = CCMpfaOInteractionVolume< Traits >;
};
// Dumux 3.1 changes the property `FVGridGeometry` to `GridGeometry`.
// For ensuring backward compatibility on the user side, it is necessary to
// stick to the old name for the specializations, see the discussion in MR 1647.
// Use diagnostic pragmas to prevent the emission of a warning message.
// TODO after 3.1: Rename to GridGeometry, remove the pragmas and this comment.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
//! Set the default for the global finite volume geometry
//! Set the default for the grid geometry
template<class TypeTag>
struct FVGridGeometry<TypeTag, TTag::CCMpfaModel>
struct GridGeometry<TypeTag, TTag::CCMpfaModel>
{
private:
using GridView = GetPropType<TypeTag, Properties::GridView>;
......@@ -116,7 +109,6 @@ private:
public:
using type = CCMpfaFVGridGeometry<GridView, Traits, getPropValue<TypeTag, Properties::EnableGridGeometryCache>()>;
};
#pragma GCC diagnostic pop
//! The grid volume variables vector class
template<class TypeTag>
......
......@@ -50,16 +50,9 @@ namespace TTag {
struct CCTpfaModel { using InheritsFrom = std::tuple<FiniteVolumeModel>; };
} // end namespace TTag
// Dumux 3.1 changes the property `FVGridGeometry` to `GridGeometry`.
// For ensuring backward compatibility on the user side, it is necessary to
// stick to the old name for the specializations, see the discussion in MR 1647.
// Use diagnostic pragmas to prevent the emission of a warning message.
// TODO after 3.1: Rename to GridGeometry, remove the pragmas and this comment.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
//! Set the default for the global finite volume geometry
//! Set the default for the grid geometry
template<class TypeTag>
struct FVGridGeometry<TypeTag, TTag::CCTpfaModel>
struct GridGeometry<TypeTag, TTag::CCTpfaModel>
{
private:
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
......@@ -67,7 +60,6 @@ private:
public:
using type = CCTpfaFVGridGeometry<GridView, enableCache>;
};
#pragma GCC diagnostic pop
//! The grid volume variables vector class
template<class TypeTag>
......
......@@ -6,7 +6,6 @@ connectivitymap.hh
dualgridindexset.hh
elementfluxvariablescache.hh
elementvolumevariables.hh
fluxvariablescachefiller.hh
fvelementgeometry.hh
fvgridgeometry.hh
fvgridgeometrytraits.hh
......
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \ingroup CCMpfaDiscretization
* \brief A helper class to fill the flux variable caches used in the flux constitutive laws
*/
#ifndef DUMUX_DISCRETIZATION_CCMPFA_FLUXVARSCACHE_FILLER_HH
#define DUMUX_DISCRETIZATION_CCMPFA_FLUXVARSCACHE_FILLER_HH
#include <dumux/porousmediumflow/fluxvariablescachefiller.hh>
#warning "This header is deprecated and will be removed after 3.1, use dumux/porousmediumflow/fluxvariablescachefiller.hh"
namespace Dumux {
/*!
* \ingroup CCMpfaDiscretization
* \brief Helper class to fill the flux variables caches within
* the interaction volume around a given sub-control volume face.
*/
template<class TypeTag>
using CCMpfaFluxVariablesCacheFiller [[deprecated("This class has been renamed to PorousMediumFluxVariablesCacheFiller and will be removed after 3.1")]]
= PorousMediumFluxVariablesCacheFiller<TypeTag>;
} // end namespace Dumux
#endif
......@@ -71,7 +71,6 @@ public:
using SubControlVolumeFace = typename GG::SubControlVolumeFace;
//! export type of finite volume grid geometry
using GridGeometry = GG;
using FVGridGeometry [[deprecated("Use GridGeometry instead. Will be removed after 3.1!" )]] = GridGeometry;
//! the maximum number of scvs per element
static constexpr std::size_t maxNumElementScvs = 1;
//! the maximum number of scvfs per element (use cubes for maximum)
......@@ -153,11 +152,9 @@ public:
}
//! The global finite volume geometry we are a restriction of
[[deprecated("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]