Commit 102d1ae2 authored by Timo Koch's avatar Timo Koch
Browse files

[cleanup] Remove GridView property

parent 568cf2a1
......@@ -50,8 +50,6 @@ 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 [[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>
struct BaseModelTraits { using type = UndefinedProperty; }; //!< Model traits to be used as a base for nonisothermal, mineralization ... models
......
......@@ -24,7 +24,6 @@
#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>
......@@ -38,12 +37,6 @@ 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>
struct PointSource<TypeTag, TTag::GridProperties>
......
......@@ -25,7 +25,6 @@
#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>
......@@ -58,9 +57,7 @@ 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 GridView = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = BoxFVGridGeometry<Scalar, GridView, enableCache>;
......
......@@ -25,7 +25,6 @@
#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>
......@@ -62,9 +61,7 @@ template<class TypeTag>
struct DualGridNodalIndexSet<TypeTag, TTag::CCMpfaModel>
{
private:
DUNE_NO_DEPRECATED_BEGIN
using GV = GetPropType<TypeTag, Properties::GridView>;
DUNE_NO_DEPRECATED_END
using GV = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView;
using Traits = NodalIndexSetDefaultTraits< GV >;
public:
......@@ -104,9 +101,7 @@ template<class TypeTag>
struct GridGeometry<TypeTag, TTag::CCMpfaModel>
{
private:
DUNE_NO_DEPRECATED_BEGIN
using GridView = GetPropType<TypeTag, Properties::GridView>;
DUNE_NO_DEPRECATED_END
using GridView = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView;
using PrimaryIV = GetPropType<TypeTag, Properties::PrimaryInteractionVolume>;
using SecondaryIV = GetPropType<TypeTag, Properties::SecondaryInteractionVolume>;
using NodalIndexSet = GetPropType<TypeTag, Properties::DualGridNodalIndexSet>;
......
......@@ -26,8 +26,6 @@
#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>
......@@ -58,9 +56,7 @@ 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
using GridView = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView;
public:
using type = CCTpfaFVGridGeometry<GridView, enableCache>;
};
......
......@@ -28,8 +28,6 @@
#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>
......@@ -85,9 +83,7 @@ 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 GridView = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView;
using Traits = StaggeredFreeFlowDefaultFVGridGeometryTraits<GridView, upwindSchemeOrder>;
public:
using type = StaggeredFVGridGeometry<GridView, enableCache, Traits>;
......
......@@ -29,8 +29,6 @@
#ifndef DUMUX_FACETCOUPLING_BOX_PROPERTIES_HH
#define DUMUX_FACETCOUPLING_BOX_PROPERTIES_HH
#include <dune/common/deprecated.hh>
#include <dumux/common/properties.hh>
#include <dumux/discretization/box.hh>
......@@ -100,9 +98,7 @@ struct GridGeometry<TypeTag, TTag::BoxFacetCouplingModel>
{
private:
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
DUNE_NO_DEPRECATED_BEGIN
using GridView = GetPropType<TypeTag, Properties::GridView>;
DUNE_NO_DEPRECATED_END
using GridView = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = BoxFacetCouplingFVGridGeometry<Scalar, GridView, enableCache>;
......
......@@ -26,8 +26,6 @@
#ifndef DUMUX_POROUSMEDIUMFLOW_BOXDFM_MODEL_HH
#define DUMUX_POROUSMEDIUMFLOW_BOXDFM_MODEL_HH
#include <dune/common/deprecated.hh>
#include <dumux/discretization/box.hh>
#include "fvgridgeometry.hh"
......@@ -48,9 +46,7 @@ struct GridGeometry<TypeTag, TTag::BoxDfmModel>
{
private:
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
DUNE_NO_DEPRECATED_BEGIN
using GridView = GetPropType<TypeTag, Properties::GridView>;
DUNE_NO_DEPRECATED_END
using GridView = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = BoxDfmFVGridGeometry<Scalar, GridView, enableCache>;
......
......@@ -19,8 +19,6 @@
#ifndef DUMUX_SEQUENTIAL_PROPERTIES_HH
#define DUMUX_SEQUENTIAL_PROPERTIES_HH
#include <dune/common/deprecated.hh>
#include <dumux/common/properties.hh>
#include <dumux/common/properties/model.hh>
#include <dumux/common/properties/grid.hh>
......@@ -134,47 +132,27 @@ public:
using type = DummyTraits;
};
DUNE_NO_DEPRECATED_BEGIN
//! Use the leaf grid view if not defined otherwise
template<class TypeTag>
struct GridView<TypeTag, TTag::SequentialModel>
{
private:
using Grid = GetPropType<TypeTag, Properties::Grid>;
public:
using type = typename Grid::LeafGridView;
};
DUNE_NO_DEPRECATED_END
//! Default number of intersections for quadrilaterals
template<class TypeTag>
struct MaxIntersections<TypeTag, TTag::SequentialModel>
{
private:
DUNE_NO_DEPRECATED_BEGIN
using GridView = GetPropType<TypeTag, Properties::GridView>;
DUNE_NO_DEPRECATED_END
enum
{
dim = GridView::dimension
};
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
public:
static const int value = 2*dim;
static constexpr int value = 2*GridView::dimension;
};
//! A simplified grid geometry for compatibility with new style models
template<class TypeTag>
struct GridGeometry<TypeTag, TTag::SequentialModel>
{
DUNE_NO_DEPRECATED_BEGIN
using GV = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView;
struct MockFVGridGeometry
: public DefaultMapperTraits<GetPropType<TypeTag, Properties::GridView>>
: public DefaultMapperTraits<GV>
{
static constexpr Dumux::DiscretizationMethod discMethod = Dumux::DiscretizationMethod::cctpfa;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = GV;
};
DUNE_NO_DEPRECATED_END
public:
using type = MockFVGridGeometry;
};
......@@ -196,10 +174,7 @@ template<class TypeTag>
struct SolutionTypes<TypeTag, TTag::SequentialModel>
{
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
DUNE_NO_DEPRECATED_BEGIN
using GridView = GetPropType<TypeTag, Properties::GridView>;
DUNE_NO_DEPRECATED_END
using Grid = typename GridView::Grid;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using Variables = GetPropType<TypeTag, Properties::Variables>;
enum
......
......@@ -153,7 +153,7 @@ int main(int argc, char** argv) try
// problem defined in `problem_1p.hh`. Let us now write this solution to a VTK file using the Dune
// `VTKWriter`. Moreover, we add the permeability distribution to the writer.
// [[codeblock]]
using GridView = GetPropType<OnePTypeTag, Properties::GridView>;
using GridView = typename GridGeometry::GridView;
Dune::VTKWriter<GridView> onepWriter(leafGridView);
onepWriter.addCellData(p, "p");
......
......@@ -64,7 +64,7 @@ class TracerFluidSystem : public FluidSystems::Base<GetPropType<TypeTag, Propert
// Some convenience aliases to be used inside this class.
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 FVElementGeometry = typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView;
using SubControlVolume = typename FVElementGeometry::SubControlVolume;
......
......@@ -178,9 +178,7 @@ int main(int argc, char** argv) try
const Scalar offsetX = (numCellsX % 2 == 0) ? 0.0 : 0.5*((xMax - xMin) / numCellsX);
DUNE_NO_DEPRECATED_BEGIN
using GridView = GetPropType<TypeTag, Properties::GridView>;
DUNE_NO_DEPRECATED_END
using GridView = typename GridGeometry::GridView;
using Element = typename GridView::template Codim<0>::Entity;
using GlobalPosition = typename Element::Geometry::GlobalCoordinate;
......
......@@ -81,7 +81,7 @@ template <class TypeTag>
class DarcySubProblem : public PorousMediumFlowProblem<TypeTag>
{
using ParentType = PorousMediumFlowProblem<TypeTag>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using GridView = typename GetPropType<TypeTag, Properties::GridGeometry>::GridView;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
using NumEqVector = GetPropType<TypeTag, Properties::NumEqVector>;
......
......@@ -77,10 +77,10 @@ template <class TypeTag>
class StokesSubProblem : public NavierStokesProblem<TypeTag>
{
using ParentType = NavierStokesProblem<TypeTag>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>;
using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>;
using GridView = typename GridGeometry::GridView;
using FVElementGeometry = typename GridGeometry::LocalView;
using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace;
using Element = typename GridView::template Codim<0>::Entity;
......
......@@ -72,9 +72,7 @@ struct GridGeometry<TypeTag, TTag::TubesTestCCTpfa>
{
private:
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
DUNE_NO_DEPRECATED_BEGIN
using GridView = GetPropType<TypeTag, Properties::GridView>;
DUNE_NO_DEPRECATED_END
using GridView = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView;
using ElementMapper = ReorderingDofMapper<GridView>;
using VertexMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
......@@ -89,9 +87,7 @@ struct GridGeometry<TypeTag, TTag::TubesTestBox>
{
private:
static constexpr bool enableCache = getPropValue<TypeTag, Properties::EnableGridGeometryCache>();
DUNE_NO_DEPRECATED_BEGIN
using GridView = GetPropType<TypeTag, Properties::GridView>;
DUNE_NO_DEPRECATED_END
using GridView = typename GetPropType<TypeTag, Properties::Grid>::LeafGridView;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using ElementMapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView>;
......
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