Commit f4f71920 authored by Timo Koch's avatar Timo Koch
Browse files

[cleanup] Remove deprecated FVGridGeometry related types and functions

parent b69511e5
......@@ -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_; }
......
......@@ -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_; }
......
......@@ -112,64 +112,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
......
......@@ -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>
......
......@@ -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!")]]
const GridGeometry& fvGridGeometry() const
{ return gridGeometry(); }
const GridGeometry& gridGeometry() const
{ return *gridGeometryPtr_; }
//! Returns whether one of the geometry's scvfs lies on a boundary
bool hasBoundaryScvf() const
{ return gridGeometry().hasBoundaryScvf(scvIndices_[0]); }
......@@ -194,7 +191,6 @@ public:
using SubControlVolumeFace = typename GG::SubControlVolumeFace;
//! export type of finite volume grid geometrys
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)
......@@ -315,11 +311,9 @@ public:
}
//! 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(); }
const GridGeometry& gridGeometry() const
{ return *gridGeometryPtr_; }
//! Returns whether one of the geometry's scvfs lies on a boundary
bool hasBoundaryScvf() const
{ return hasBoundaryScvf_; }
......
......@@ -70,7 +70,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;
......@@ -158,9 +157,6 @@ public:
//! The global finite volume geometry we are a restriction of
const GridGeometry& gridGeometry() const
{ return *gridGeometryPtr_; }
[[deprecated("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const GridGeometry& fvGridGeometry() const
{ return gridGeometry(); }
//! Returns whether one of the geometry's scvfs lies on a boundary
bool hasBoundaryScvf() const
......@@ -197,7 +193,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)
......@@ -362,9 +357,6 @@ public:
//! The global finite volume geometry we are a restriction of
const GridGeometry& gridGeometry() const
{ return *gridGeometryPtr_; }
[[deprecated("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const GridGeometry& fvGridGeometry() const
{ return gridGeometry(); }
//! Returns whether one of the geometry's scvfs lies on a boundary
bool hasBoundaryScvf() const
......
......@@ -161,11 +161,6 @@ public:
GridVolumeVariables& prevGridVolVars()
{ return prevGridVolVars_; }
//! return the finite volume grid geometry
[[deprecated("Use gridGeometry() instead. fvGridGeometry() will be removed after 3.1!")]]
const GridGeometry& fvGridGeometry() const
{ return gridGeometry(); }
//! return the finite volume grid geometry
const GridGeometry& gridGeometry() const
{ return *gridGeometry_; }
......
......@@ -55,17 +55,9 @@ public:
using type = FVGridVariables<GG, GVV, GFVC>;
};
// Dumux 3.1 changes the property `EnableFVGridGeometryCache` to `EnableGridGeometryCache`.
// 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 EnableGridGeometryCache, remove the pragmas and this comment.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
//! We do not store the FVGeometry by default
template<class TypeTag>
struct EnableFVGridGeometryCache<TypeTag, TTag::FiniteVolumeModel> { static constexpr bool value = false; };
#pragma GCC diagnostic pop
struct EnableGridGeometryCache<TypeTag, TTag::FiniteVolumeModel> { static constexpr bool value = false; };
//! We do not store the volume variables by default
template<class TypeTag>
......
......@@ -76,16 +76,9 @@ public:
static constexpr int value = numEq - dim;
};
// 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"
//! The default fv grid geometry
//! The default grid geometry
template<class TypeTag>
struct FVGridGeometry<TypeTag, TTag::StaggeredFreeFlowModel>
struct GridGeometry<TypeTag, TTag::StaggeredFreeFlowModel>
{
private:
static constexpr auto upwindSchemeOrder = getPropValue<TypeTag, Properties::UpwindSchemeOrder>();
......@@ -95,7 +88,6 @@ private:
public:
using type = StaggeredFVGridGeometry<GridView, enableCache, Traits>;
};
#pragma GCC diagnostic pop
//! The variables living on the faces
template<class TypeTag>
......
......@@ -99,7 +99,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;
//! Constructor getting a auxiliary cell center of face specific FvGridGeometry type.
//! Needed for the multi-domain framework.
......@@ -209,10 +208,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 finite volume geometry we are a restriction of
const GridGeometry& gridGeometry() const
{ return *gridGeometryPtr_; }
......
......@@ -325,11 +325,6 @@ public:
return forchCoeffDefault_;
}
//! 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_; }
......
......@@ -158,11 +158,6 @@ public:
return asImp_().lameParamsAtPos(fluxVarsCache.ipGlobal());
}
//! 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_; }
......
......@@ -313,15 +313,10 @@ public:
return asImp_().biotCoefficientAtPos(fluxVarsCache.ipGlobal());
}
//! 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_; }
protected:
Implementation &asImp_()
{ return *static_cast<Implementation*>(this); }
......
......@@ -67,8 +67,6 @@ public:
using SubControlVolumeFace = typename GG::SubControlVolumeFace;
//! export type of finite volume grid geometry
using GridGeometry = GG;
//! export type of finite volume grid geometry
using FVGridGeometry [[deprecated("Use more general GridGeometry instead. FVGridGeometry 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);
......@@ -140,11 +138,6 @@ 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 *gridGeometryPtr_; }
//! The global finite volume geometry we are a restriction of
const GridGeometry& gridGeometry() const
{ return *gridGeometryPtr_; }
......@@ -182,8 +175,6 @@ public:
using SubControlVolumeFace = typename GG::SubControlVolumeFace;
//! export type of finite volume grid geometry
using GridGeometry = GG;
//! export type of finite volume grid geometry
using FVGridGeometry [[deprecated("Use more general GridGeometry instead. FVGridGeometry 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);
......@@ -253,11 +244,6 @@ 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 *gridGeometryPtr_; }
//! The global finite volume geometry we are a restriction of
const GridGeometry& gridGeometry() const
{ return *gridGeometryPtr_; }
......
......@@ -76,16 +76,9 @@ template<class TypeTag>
struct ElementBoundaryTypes<TypeTag, TTag::BoxFacetCouplingModel>
{ using type = BoxFacetCouplingElementBoundaryTypes<GetPropType<TypeTag, Properties::BoundaryTypes>>; };
// 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 grid finite volume geometry
template<class TypeTag>
struct FVGridGeometry<TypeTag, TTag::BoxFacetCouplingModel>
struct GridGeometry<TypeTag, TTag::BoxFacetCouplingModel>
{
private:
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
......@@ -94,7 +87,6 @@ private:
public:
using type = BoxFacetCouplingFVGridGeometry<Scalar, GridView, enableCache>;
};
#pragma GCC diagnostic pop
} // namespace Properties
} // namespace Dumux
......
......@@ -195,7 +195,6 @@ public:
using TypeTag = SubDomainTypeTag<id>;
using Problem = GetPropType<SubDomainTypeTag<id>, Properties::Problem>;
using GridGeometry = typename Detail::Staggered::SubDomainFVGridGeometryImpl<SubDomainTypeTag, id>::type;
using FVGridGeometry [[deprecated("Use GridGeometry instead. FVGridGeometry will be removed after 3.1!")]] = GridGeometry;
using GridVariables = typename Detail::Staggered::SubDomainGridVariablesImpl<SubDomainTypeTag, id>::type;
using SolutionVector = typename Detail::Staggered::SubDomainSolutionVectorImpl<SubDomainTypeTag, id>::type;
using PrimaryVariables = typename Detail::Staggered::SubDomainPrimaryVariablesImpl<SubDomainTypeTag, id>::type;
......
......@@ -182,7 +182,6 @@ public:
using TypeTag = SubDomainTypeTag<id>;
using Grid = GetPropType<SubDomainTypeTag<id>, Properties::Grid>;
using GridGeometry = GetPropType<SubDomainTypeTag<id>, Properties::GridGeometry>;
using FVGridGeometry [[deprecated("Use GridGeometry instead. FVGridGeometry will be removed after 3.1!")]] = GridGeometry;
using Problem = GetPropType<SubDomainTypeTag<id>, Properties::Problem>;
using GridVariables =GetPropType<SubDomainTypeTag<id>, Properties::GridVariables>;
using IOFields = GetPropType<SubDomainTypeTag<id>, Properties::IOFields>;
......
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