Commit fe138d59 authored by Simon Emmert's avatar Simon Emmert Committed by Timo Koch
Browse files

[properties][cleanup] deprecate property GridView and replace by GridGeometry::GridView

Place no deprecation macros where GridView will be substituted by Grid::LeafGridView after release 3.2.
parent ee96d75c
......@@ -45,7 +45,7 @@ class GridAdaptInitializationIndicator
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using Problem = GetPropType<TypeTag, Properties::Problem>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using Element = typename GridView::Traits::template Codim<0>::Entity;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
......
......@@ -273,7 +273,7 @@ class BoxLocalAssembler<TypeTag, Assembler, DiffMethod::numeric, /*implicit=*/tr
using ElementResidualVector = typename LocalResidual::ElementResidualVector;
enum { numEq = GetPropType<TypeTag, Properties::ModelTraits>::numEq() };
enum { dim = GetPropType<TypeTag, Properties::GridView>::dimension };
enum { dim = GetPropType<TypeTag, Properties::GridGeometry>::GridView::dimension };
static constexpr bool enableGridFluxVarsCache = getPropValue<TypeTag, Properties::EnableGridFluxVariablesCache>();
......@@ -392,7 +392,7 @@ class BoxLocalAssembler<TypeTag, Assembler, DiffMethod::numeric, /*implicit=*/fa
using ElementResidualVector = typename LocalResidual::ElementResidualVector;
enum { numEq = GetPropType<TypeTag, Properties::ModelTraits>::numEq() };
enum { dim = GetPropType<TypeTag, Properties::GridView>::dimension };
enum { dim = GetPropType<TypeTag, Properties::GridGeometry>::GridView::dimension };
public:
......
......@@ -46,7 +46,7 @@ class BoxLocalResidual : public FVLocalResidual<TypeTag>
using ParentType = FVLocalResidual<TypeTag>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using Problem = GetPropType<TypeTag, Properties::Problem>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using ElementBoundaryTypes = GetPropType<TypeTag, Properties::ElementBoundaryTypes>;
using FVElementGeometry = typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView;
......
......@@ -56,7 +56,7 @@ template<class TypeTag, class Assembler, class Implementation, bool implicit>
class CCLocalAssemblerBase : public FVLocalAssemblerBase<TypeTag, Assembler, Implementation, implicit>
{
using ParentType = FVLocalAssemblerBase<TypeTag, Assembler, Implementation, implicit>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using JacobianMatrix = GetPropType<TypeTag, Properties::JacobianMatrix>;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>;
......@@ -136,14 +136,14 @@ class CCLocalAssembler<TypeTag, Assembler, DiffMethod::numeric, /*implicit=*/tru
using ParentType = CCLocalAssemblerBase<TypeTag, Assembler, ThisType, true>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
using Element = typename GetPropType<TypeTag, Properties::GridView>::template Codim<0>::Entity;
using Element = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView::template Codim<0>::Entity;
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using FVElementGeometry = typename GridGeometry::LocalView;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using JacobianMatrix = GetPropType<TypeTag, Properties::JacobianMatrix>;
enum { numEq = GetPropType<TypeTag, Properties::ModelTraits>::numEq() };
enum { dim = GetPropType<TypeTag, Properties::GridView>::dimension };
enum { dim = GetPropType<TypeTag, Properties::GridGeometry>::GridView::dimension };
using FluxStencil = Dumux::FluxStencil<FVElementGeometry>;
static constexpr int maxElementStencilSize = GridGeometry::maxElementStencilSize;
......@@ -322,7 +322,7 @@ class CCLocalAssembler<TypeTag, Assembler, DiffMethod::numeric, /*implicit=*/fal
using ParentType = CCLocalAssemblerBase<TypeTag, Assembler, ThisType, false>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
using Element = typename GetPropType<TypeTag, Properties::GridView>::template Codim<0>::Entity;
using Element = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView::template Codim<0>::Entity;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
using JacobianMatrix = GetPropType<TypeTag, Properties::JacobianMatrix>;
......
......@@ -42,7 +42,7 @@ class CCLocalResidual : public FVLocalResidual<TypeTag>
{
using ParentType = FVLocalResidual<TypeTag>;
using Problem = GetPropType<TypeTag, Properties::Problem>;
using Element = typename GetPropType<TypeTag, Properties::GridView>::template Codim<0>::Entity;
using Element = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView::template Codim<0>::Entity;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
using ElementBoundaryTypes = GetPropType<TypeTag, Properties::ElementBoundaryTypes>;
using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
......
......@@ -50,7 +50,7 @@ namespace Dumux {
template<class TypeTag, DiffMethod diffMethod, bool isImplicit = true>
class FVAssembler
{
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using LocalResidual = GetPropType<TypeTag, Properties::LocalResidual>;
using Element = typename GridView::template Codim<0>::Entity;
using TimeLoop = TimeLoopBase<GetPropType<TypeTag, Properties::Scalar>>;
......
......@@ -47,7 +47,7 @@ template<class TypeTag, class Assembler, class Implementation, bool useImplicitA
class FVLocalAssemblerBase
{
using Problem = GetPropType<TypeTag, Properties::Problem>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using JacobianMatrix = GetPropType<TypeTag, Properties::JacobianMatrix>;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
......
......@@ -46,7 +46,7 @@ class FVLocalResidual
using Implementation = GetPropType<TypeTag, Properties::LocalResidual>;
using Problem = GetPropType<TypeTag, Properties::Problem>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using FVElementGeometry = typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
......
......@@ -38,7 +38,7 @@ namespace Dumux {
template<class TypeTag>
class StaggeredLocalResidual
{
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using Implementation = GetPropType<TypeTag, Properties::LocalResidual>;
......
......@@ -207,11 +207,11 @@ private:
* \brief A point source class for time dependent point sources
*/
template<class TypeTag>
class SolDependentPointSource : public PointSource<Dune::FieldVector<typename GetPropType<TypeTag, Properties::GridView>::ctype,
GetPropType<TypeTag, Properties::GridView>::dimensionworld>,
class SolDependentPointSource : public PointSource<Dune::FieldVector<typename GetPropType<TypeTag, Properties::GridGeometry>::GridView::ctype,
GetPropType<TypeTag, Properties::GridGeometry>::GridView::dimensionworld>,
GetPropType<TypeTag, Properties::NumEqVector>>
{
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using SourceValues = GetPropType<TypeTag, Properties::NumEqVector>;
using Problem = GetPropType<TypeTag, Properties::Problem>;
using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
......
......@@ -61,7 +61,7 @@ struct PrimaryVariables { using type = UndefinedProperty; }; //!< A vector
template<class TypeTag, class MyTypeTag>
struct NumEqVector { using type = UndefinedProperty; }; //!< A vector of size number equations that can be used for Neumann fluxes, sources, residuals, ...
template<class TypeTag, class MyTypeTag>
struct GridView { using type = UndefinedProperty; }; //!< The type of the grid view according to the grid type
struct [[deprecated("Access GridView via 'GridGeometry::GridView' or 'Grid::LeafGridView' instead. Will be removed after 3.2")]] GridView { using type = UndefinedProperty; }; //!< The type of the grid view according to the grid type
template<class TypeTag, class MyTypeTag>
struct ModelTraits { using type = UndefinedProperty; }; //!< Traits class encapsulating model specifications
template<class TypeTag, class MyTypeTag>
......
......@@ -24,6 +24,7 @@
#ifndef DUMUX_GRID_PROPERTIES_HH
#define DUMUX_GRID_PROPERTIES_HH
#include <dune/common/deprecated.hh>
#include <dune/common/fvector.hh>
#include <dumux/common/properties.hh>
......@@ -37,9 +38,11 @@ namespace TTag {
struct GridProperties {};
}
DUNE_NO_DEPRECATED_BEGIN
//! Use the leaf grid view if not defined otherwise
template<class TypeTag>
struct GridView<TypeTag, TTag::GridProperties> { using type = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView; };
DUNE_NO_DEPRECATED_END
//! Use the minimal point source implementation as default
template<class TypeTag>
......@@ -47,7 +50,7 @@ struct PointSource<TypeTag, TTag::GridProperties>
{
private:
using SourceValues = GetPropType<TypeTag, Properties::NumEqVector>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using GlobalPosition = typename Dune::FieldVector<typename GridView::ctype, GridView::dimensionworld>;
public:
using type = Dumux::PointSource<GlobalPosition, SourceValues>;
......
......@@ -45,7 +45,7 @@ class StaggeredFVProblem : public FVProblem<TypeTag>
{
using ParentType = FVProblem<TypeTag>;
using Implementation = GetPropType<TypeTag, Properties::Problem>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
......
......@@ -25,6 +25,7 @@
#ifndef DUMUX_DISCRETIZTAION_BOX_HH
#define DUMUX_DISCRETIZTAION_BOX_HH
#include <dune/common/deprecated.hh>
#include <dune/common/fvector.hh>
#include <dune/geometry/multilineargeometry.hh>
......@@ -57,7 +58,9 @@ struct GridGeometry<TypeTag, TTag::BoxModel>
{
private:
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
DUNE_NO_DEPRECATED_BEGIN
using GridView = GetPropType<TypeTag, Properties::GridView>;
DUNE_NO_DEPRECATED_END
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = BoxFVGridGeometry<Scalar, GridView, enableCache>;
......
......@@ -25,6 +25,7 @@
#ifndef DUMUX_DISCRETIZATION_CC_MPFA_HH
#define DUMUX_DISCRETIZATION_CC_MPFA_HH
#include <dune/common/deprecated.hh>
#include <dune/common/reservedvector.hh>
#include <dumux/common/properties.hh>
......@@ -61,7 +62,9 @@ template<class TypeTag>
struct DualGridNodalIndexSet<TypeTag, TTag::CCMpfaModel>
{
private:
DUNE_NO_DEPRECATED_BEGIN
using GV = GetPropType<TypeTag, Properties::GridView>;
DUNE_NO_DEPRECATED_END
using Traits = NodalIndexSetDefaultTraits< GV >;
public:
......@@ -101,7 +104,9 @@ template<class TypeTag>
struct GridGeometry<TypeTag, TTag::CCMpfaModel>
{
private:
DUNE_NO_DEPRECATED_BEGIN
using GridView = GetPropType<TypeTag, Properties::GridView>;
DUNE_NO_DEPRECATED_END
using PrimaryIV = GetPropType<TypeTag, Properties::PrimaryInteractionVolume>;
using SecondaryIV = GetPropType<TypeTag, Properties::SecondaryInteractionVolume>;
using NodalIndexSet = GetPropType<TypeTag, Properties::DualGridNodalIndexSet>;
......
......@@ -26,6 +26,8 @@
#ifndef DUMUX_DISCRETIZATION_CC_TPFA_HH
#define DUMUX_DISCRETIZATION_CC_TPFA_HH
#include <dune/common/deprecated.hh>
#include <dumux/common/properties.hh>
#include <dumux/common/boundaryflag.hh>
......@@ -56,7 +58,9 @@ struct GridGeometry<TypeTag, TTag::CCTpfaModel>
{
private:
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
DUNE_NO_DEPRECATED_BEGIN
using GridView = GetPropType<TypeTag, Properties::GridView>;
DUNE_NO_DEPRECATED_END
public:
using type = CCTpfaFVGridGeometry<GridView, enableCache>;
};
......
......@@ -28,6 +28,8 @@
#ifndef DUMUX_STAGGERD_FREE_FLOW_PROPERTIES_HH
#define DUMUX_STAGGERD_FREE_FLOW_PROPERTIES_HH
#include <dune/common/deprecated.hh>
#include <dumux/common/properties.hh>
#include <dumux/common/intersectionmapper.hh>
#include <dumux/common/defaultmappertraits.hh>
......@@ -68,7 +70,7 @@ template<class TypeTag>
struct NumEqCellCenter<TypeTag, TTag::StaggeredFreeFlowModel>
{
private:
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using ModelTraits = GetPropType<TypeTag, Properties::ModelTraits>;
static constexpr auto dim = GridView::dimension;
static constexpr auto numEq = ModelTraits::numEq();
......@@ -83,7 +85,9 @@ struct GridGeometry<TypeTag, TTag::StaggeredFreeFlowModel>
private:
static constexpr auto upwindSchemeOrder = getPropValue<TypeTag, Properties::UpwindSchemeOrder>();
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
DUNE_NO_DEPRECATED_BEGIN
using GridView = GetPropType<TypeTag, Properties::GridView>;
DUNE_NO_DEPRECATED_END
using Traits = StaggeredFreeFlowDefaultFVGridGeometryTraits<GridView, upwindSchemeOrder>;
public:
using type = StaggeredFVGridGeometry<GridView, enableCache, Traits>;
......@@ -95,7 +99,7 @@ struct FaceVariables<TypeTag, TTag::StaggeredFreeFlowModel>
{
private:
using FacePrimaryVariables = GetPropType<TypeTag, Properties::FacePrimaryVariables>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
static constexpr auto upwindSchemeOrder = getPropValue<TypeTag, Properties::UpwindSchemeOrder>();
public:
using type = StaggeredFaceVariables<FacePrimaryVariables, GridView::dimension, upwindSchemeOrder>;
......
......@@ -58,7 +58,7 @@ class FicksLawImplementation<TypeTag, DiscretizationMethod::box, referenceSystem
using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
using FluxVarCache = GetPropType<TypeTag, Properties::FluxVariablesCache>;
using BalanceEqOpts = GetPropType<TypeTag, Properties::BalanceEqOpts>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using ModelTraits = GetPropType<TypeTag, Properties::ModelTraits>;
using Indices = typename ModelTraits::Indices;
......
......@@ -51,7 +51,7 @@ class FouriersLawImplementation<TypeTag, DiscretizationMethod::box>
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using Element = typename GridView::template Codim<0>::Entity;
public:
......
......@@ -54,7 +54,7 @@ class FouriersLawNonEquilibriumImplementation<TypeTag, DiscretizationMethod::box
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView;
using ElementFluxVariablesCache = typename GetPropType<TypeTag, Properties::GridFluxVariablesCache>::LocalView;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using ThermalConductivityModel = GetPropType<TypeTag, Properties::ThermalConductivityModel>;
using ModelTraits = GetPropType<TypeTag, Properties::ModelTraits>;
using Element = typename GridView::template Codim<0>::Entity;
......
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