From 57cdca8e8a89fe45c54a6c424be950ad13b0a0f6 Mon Sep 17 00:00:00 2001 From: Bernd Flemisch <bernd@iws.uni-stuttgart.de> Date: Wed, 9 Oct 2019 12:30:01 +0200 Subject: [PATCH] [cleanup][examples] replace local names `FVGridGeometry` by `GridGeometry` --- examples/1ptracer/main.cc | 4 ++-- examples/1ptracer/problem_1p.hh | 8 ++++---- examples/1ptracer/problem_tracer.hh | 10 +++++----- examples/1ptracer/spatialparams_1p.hh | 16 ++++++++-------- examples/1ptracer/spatialparams_tracer.hh | 16 ++++++++-------- examples/2pinfiltration/main.cc | 4 ++-- examples/2pinfiltration/problem.hh | 8 ++++---- examples/2pinfiltration/spatialparams.hh | 14 +++++++------- examples/shallowwaterfriction/problem.hh | 10 +++++----- examples/shallowwaterfriction/spatialparams.hh | 16 ++++++++-------- 10 files changed, 53 insertions(+), 53 deletions(-) diff --git a/examples/1ptracer/main.cc b/examples/1ptracer/main.cc index ba44ca3f76..9baf89af4b 100644 --- a/examples/1ptracer/main.cc +++ b/examples/1ptracer/main.cc @@ -87,8 +87,8 @@ int main(int argc, char** argv) try // #### Set-up // We create and initialize the finite volume grid geometry, the problem, the linear system, including the jacobian matrix, the residual and the solution vector and the gridvariables. // We need the finite volume geometry to build up the subcontrolvolumes (scv) and subcontrolvolume faces (scvf) for each element of the grid partition. - using FVGridGeometry = GetPropType<OnePTypeTag, Properties::GridGeometry>; - auto fvGridGeometry = std::make_shared<FVGridGeometry>(leafGridView); + using GridGeometry = GetPropType<OnePTypeTag, Properties::GridGeometry>; + auto fvGridGeometry = std::make_shared<GridGeometry>(leafGridView); fvGridGeometry->update(); // In the problem, we define the boundary and initial conditions. diff --git a/examples/1ptracer/problem_1p.hh b/examples/1ptracer/problem_1p.hh index 82dd98a0cb..c56bab36eb 100644 --- a/examples/1ptracer/problem_1p.hh +++ b/examples/1ptracer/problem_1p.hh @@ -72,10 +72,10 @@ template<class TypeTag> struct SpatialParams<TypeTag, TTag::IncompressibleTest> { // We define convenient shortcuts to the properties `GridGeometry` and `Scalar`: - using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; + using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using Scalar = GetPropType<TypeTag, Properties::Scalar>; // Finally, we set the spatial parameters: - using type = OnePTestSpatialParams<FVGridGeometry, Scalar>; + using type = OnePTestSpatialParams<GridGeometry, Scalar>; }; // The local residual contains analytic derivative methods for incompressible flow: @@ -120,14 +120,14 @@ class OnePTestProblem : public PorousMediumFlowProblem<TypeTag> using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; using FVElementGeometry = typename GetPropType<TypeTag, Properties::GridGeometry>::LocalView; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; - using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; + using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; static constexpr int dimWorld = GridView::dimensionworld; public: // This is the constructor of our problem class: - OnePTestProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) + OnePTestProblem(std::shared_ptr<const GridGeometry> fvGridGeometry) : ParentType(fvGridGeometry) {} // First, we define the type of boundary conditions depending on location. Two types of boundary conditions diff --git a/examples/1ptracer/problem_tracer.hh b/examples/1ptracer/problem_tracer.hh index bebaa7abde..e7ced7bd19 100644 --- a/examples/1ptracer/problem_tracer.hh +++ b/examples/1ptracer/problem_tracer.hh @@ -73,9 +73,9 @@ struct Problem<TypeTag, TTag::TracerTest> { using type = TracerTestProblem<TypeT template<class TypeTag> struct SpatialParams<TypeTag, TTag::TracerTest> { - using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; + using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using Scalar = GetPropType<TypeTag, Properties::Scalar>; - using type = TracerTestSpatialParams<FVGridGeometry, Scalar>; + using type = TracerTestSpatialParams<GridGeometry, Scalar>; }; // We define that mass fractions are used to define the concentrations @@ -151,19 +151,19 @@ class TracerTestProblem : public PorousMediumFlowProblem<TypeTag> using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; using GridView = GetPropType<TypeTag, Properties::GridView>; - using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; + using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; using SpatialParams = GetPropType<TypeTag, Properties::SpatialParams>; - using Element = typename FVGridGeometry::GridView::template Codim<0>::Entity; + using Element = typename GridGeometry::GridView::template Codim<0>::Entity; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; //We create a bool saying whether mole or mass fractions are used static constexpr bool useMoles = getPropValue<TypeTag, Properties::UseMoles>(); public: // This is the constructor of our problem class: - TracerTestProblem(std::shared_ptr<const FVGridGeometry> fvGridGeom) + TracerTestProblem(std::shared_ptr<const GridGeometry> fvGridGeom) : ParentType(fvGridGeom) { // We print out whether mole or mass fractions are used diff --git a/examples/1ptracer/spatialparams_1p.hh b/examples/1ptracer/spatialparams_1p.hh index 885f21d1ba..5096115b4c 100644 --- a/examples/1ptracer/spatialparams_1p.hh +++ b/examples/1ptracer/spatialparams_1p.hh @@ -34,25 +34,25 @@ namespace Dumux { // In the `OnePTestSpatialParams` class, we define all functions needed to describe the porous matrix, e.g. porosity and permeability for the 1p_problem. -template<class FVGridGeometry, class Scalar> +template<class GridGeometry, class Scalar> class OnePTestSpatialParams -: public FVSpatialParamsOneP<FVGridGeometry, Scalar, - OnePTestSpatialParams<FVGridGeometry, Scalar>> +: public FVSpatialParamsOneP<GridGeometry, Scalar, + OnePTestSpatialParams<GridGeometry, Scalar>> { // We introduce `using` declarations that are derived from the property system, which we need in this class. - using GridView = typename FVGridGeometry::GridView; - using FVElementGeometry = typename FVGridGeometry::LocalView; + using GridView = typename GridGeometry::GridView; + using FVElementGeometry = typename GridGeometry::LocalView; using SubControlVolume = typename FVElementGeometry::SubControlVolume; using Element = typename GridView::template Codim<0>::Entity; - using ParentType = FVSpatialParamsOneP<FVGridGeometry, Scalar, - OnePTestSpatialParams<FVGridGeometry, Scalar>>; + using ParentType = FVSpatialParamsOneP<GridGeometry, Scalar, + OnePTestSpatialParams<GridGeometry, Scalar>>; static constexpr int dimWorld = GridView::dimensionworld; using GlobalPosition = typename SubControlVolume::GlobalPosition; public: using PermeabilityType = Scalar; - OnePTestSpatialParams(std::shared_ptr<const FVGridGeometry> fvGridGeometry) + OnePTestSpatialParams(std::shared_ptr<const GridGeometry> fvGridGeometry) : ParentType(fvGridGeometry), K_(fvGridGeometry->gridView().size(0), 0.0) { // ### Generation of the random permeability field diff --git a/examples/1ptracer/spatialparams_tracer.hh b/examples/1ptracer/spatialparams_tracer.hh index 6a13799bde..3959ff40a3 100644 --- a/examples/1ptracer/spatialparams_tracer.hh +++ b/examples/1ptracer/spatialparams_tracer.hh @@ -33,25 +33,25 @@ namespace Dumux { // In the `TracerTestSpatialParams` class, we define all functions needed to describe spatially dependent parameters for the `tracer_problem`. -template<class FVGridGeometry, class Scalar> +template<class GridGeometry, class Scalar> class TracerTestSpatialParams -: public FVSpatialParamsOneP<FVGridGeometry, Scalar, - TracerTestSpatialParams<FVGridGeometry, Scalar>> +: public FVSpatialParamsOneP<GridGeometry, Scalar, + TracerTestSpatialParams<GridGeometry, Scalar>> { - using GridView = typename FVGridGeometry::GridView; - using FVElementGeometry = typename FVGridGeometry::LocalView; + using GridView = typename GridGeometry::GridView; + using FVElementGeometry = typename GridGeometry::LocalView; using SubControlVolume = typename FVElementGeometry::SubControlVolume; using SubControlVolumeFace = typename FVElementGeometry::SubControlVolumeFace; using Element = typename GridView::template Codim<0>::Entity; - using ParentType = FVSpatialParamsOneP<FVGridGeometry, Scalar, - TracerTestSpatialParams<FVGridGeometry, Scalar>>; + using ParentType = FVSpatialParamsOneP<GridGeometry, Scalar, + TracerTestSpatialParams<GridGeometry, Scalar>>; static const int dimWorld = GridView::dimensionworld; using GlobalPosition = typename Dune::FieldVector<Scalar, dimWorld>; public: - TracerTestSpatialParams(std::shared_ptr<const FVGridGeometry> fvGridGeometry) + TracerTestSpatialParams(std::shared_ptr<const GridGeometry> fvGridGeometry) : ParentType(fvGridGeometry) {} // ### Properties of the porous matrix diff --git a/examples/2pinfiltration/main.cc b/examples/2pinfiltration/main.cc index 46b31e111b..471286b6fe 100644 --- a/examples/2pinfiltration/main.cc +++ b/examples/2pinfiltration/main.cc @@ -102,8 +102,8 @@ int main(int argc, char** argv) try // We create and initialize the finite volume grid geometry, the problem, the linear system, including the jacobian matrix, the residual and the solution vector and the gridvariables. // // We need the finite volume geometry to build up the subcontrolvolumes (scv) and subcontrolvolume faces (scvf) for each element of the grid partition. - using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; - auto fvGridGeometry = std::make_shared<FVGridGeometry>(leafGridView); + using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; + auto fvGridGeometry = std::make_shared<GridGeometry>(leafGridView); fvGridGeometry->update(); // In the problem, we define the boundary and initial conditions. diff --git a/examples/2pinfiltration/problem.hh b/examples/2pinfiltration/problem.hh index 913962b7f8..34d35e08ed 100644 --- a/examples/2pinfiltration/problem.hh +++ b/examples/2pinfiltration/problem.hh @@ -106,11 +106,11 @@ namespace Dumux { { // We define convenient shortcuts to the properties GridGeometry and Scalar: private: - using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; + using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using Scalar = GetPropType<TypeTag, Properties::Scalar>; // Finally we set the spatial parameters: public: - using type = TwoPTestSpatialParams<FVGridGeometry, Scalar>; + using type = TwoPTestSpatialParams<GridGeometry, Scalar>; }; // We enable caching for the grid volume variables, the grid flux variables and the FV grid geometry. The cache @@ -139,7 +139,7 @@ class PointSourceProblem : public PorousMediumFlowProblem<TypeTag> using Scalar = GetPropType<TypeTag, Properties::Scalar>; using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>; using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>; - using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; + using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using PointSource = GetPropType<TypeTag, Properties::PointSource>; using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; @@ -157,7 +157,7 @@ class PointSourceProblem : public PorousMediumFlowProblem<TypeTag> public: // This is the constructor of our problem class: - PointSourceProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) + PointSourceProblem(std::shared_ptr<const GridGeometry> fvGridGeometry) : ParentType(fvGridGeometry) { // We read in the values for the initial condition of our simulation: diff --git a/examples/2pinfiltration/spatialparams.hh b/examples/2pinfiltration/spatialparams.hh index c261ac81e4..ec0402c039 100644 --- a/examples/2pinfiltration/spatialparams.hh +++ b/examples/2pinfiltration/spatialparams.hh @@ -32,17 +32,17 @@ namespace Dumux { //In the TwoPTestSpatialParams class we define all functions needed to describe the porous matrix, e.g. porosity and permeability -template<class FVGridGeometry, class Scalar> +template<class GridGeometry, class Scalar> class TwoPTestSpatialParams -: public FVSpatialParams<FVGridGeometry, Scalar, TwoPTestSpatialParams<FVGridGeometry, Scalar>> +: public FVSpatialParams<GridGeometry, Scalar, TwoPTestSpatialParams<GridGeometry, Scalar>> { //we introduce using declarations that are derived from the property system which we need in this class - using GridView = typename FVGridGeometry::GridView; + using GridView = typename GridGeometry::GridView; using Element = typename GridView::template Codim<0>::Entity; - using FVElementGeometry = typename FVGridGeometry::LocalView; + using FVElementGeometry = typename GridGeometry::LocalView; using SubControlVolume = typename FVElementGeometry::SubControlVolume; - using ThisType = TwoPTestSpatialParams<FVGridGeometry, Scalar>; - using ParentType = FVSpatialParams<FVGridGeometry, Scalar, ThisType>; + using ThisType = TwoPTestSpatialParams<GridGeometry, Scalar>; + using ParentType = FVSpatialParams<GridGeometry, Scalar, ThisType>; static constexpr int dimWorld = GridView::dimensionworld; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; @@ -54,7 +54,7 @@ public: using MaterialLawParams = typename MaterialLaw::Params; using PermeabilityType = Scalar; - TwoPTestSpatialParams(std::shared_ptr<const FVGridGeometry> fvGridGeometry) + TwoPTestSpatialParams(std::shared_ptr<const GridGeometry> fvGridGeometry) : ParentType(fvGridGeometry) { //we get the position of the lens from the params.input file. The lens is defined by the position of the lower left and the upper right corner diff --git a/examples/shallowwaterfriction/problem.hh b/examples/shallowwaterfriction/problem.hh index 91f9b47cfa..c9349e9d35 100644 --- a/examples/shallowwaterfriction/problem.hh +++ b/examples/shallowwaterfriction/problem.hh @@ -68,14 +68,14 @@ template<class TypeTag> struct SpatialParams<TypeTag, TTag::RoughChannel> { private: - // We define convenient shortcuts to the properties FVGridGeometry, Scalar, ElementVolumeVariables and VolumeVariables: - using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; + // We define convenient shortcuts to the properties GridGeometry, Scalar, ElementVolumeVariables and VolumeVariables: + using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using Scalar = GetPropType<TypeTag, Properties::Scalar>; using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView; using VolumeVariables = typename ElementVolumeVariables::VolumeVariables; // Finally we set the spatial parameters: public: - using type = RoughChannelSpatialParams<FVGridGeometry, Scalar, VolumeVariables>; + using type = RoughChannelSpatialParams<GridGeometry, Scalar, VolumeVariables>; }; // We enable caching for the FV grid geometry and the grid volume variables. The cache @@ -103,7 +103,7 @@ class RoughChannelProblem : public ShallowWaterProblem<TypeTag> using BoundaryTypes = GetPropType<TypeTag, Properties::BoundaryTypes>; using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Indices = typename GetPropType<TypeTag, Properties::ModelTraits>::Indices; - using FVGridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; + using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; using NeumannFluxes = GetPropType<TypeTag, Properties::NumEqVector>; using ElementVolumeVariables = typename GetPropType<TypeTag, Properties::GridVolumeVariables>::LocalView; using GridVariables = GetPropType<TypeTag, Properties::GridVariables>; @@ -119,7 +119,7 @@ class RoughChannelProblem : public ShallowWaterProblem<TypeTag> public: // This is the constructor of our problem class. - RoughChannelProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) + RoughChannelProblem(std::shared_ptr<const GridGeometry> fvGridGeometry) : ParentType(fvGridGeometry) { // We read the parameters from the params.input file. diff --git a/examples/shallowwaterfriction/spatialparams.hh b/examples/shallowwaterfriction/spatialparams.hh index a6e6f315af..16f013e04e 100644 --- a/examples/shallowwaterfriction/spatialparams.hh +++ b/examples/shallowwaterfriction/spatialparams.hh @@ -34,23 +34,23 @@ namespace Dumux { //In the RoughChannelSpatialParams class we define all functions needed to describe the spatial distributed parameters. -template<class FVGridGeometry, class Scalar, class VolumeVariables> +template<class GridGeometry, class Scalar, class VolumeVariables> class RoughChannelSpatialParams -: public FVSpatialParams<FVGridGeometry, Scalar, - RoughChannelSpatialParams<FVGridGeometry, Scalar, VolumeVariables>> +: public FVSpatialParams<GridGeometry, Scalar, + RoughChannelSpatialParams<GridGeometry, Scalar, VolumeVariables>> { // We introduce using declarations that are derived from the property system which we need in this class - using ThisType = RoughChannelSpatialParams<FVGridGeometry, Scalar, VolumeVariables>; - using ParentType = FVSpatialParams<FVGridGeometry, Scalar, ThisType>; - using GridView = typename FVGridGeometry::GridView; - using FVElementGeometry = typename FVGridGeometry::LocalView; + using ThisType = RoughChannelSpatialParams<GridGeometry, Scalar, VolumeVariables>; + using ParentType = FVSpatialParams<GridGeometry, Scalar, ThisType>; + using GridView = typename GridGeometry::GridView; + using FVElementGeometry = typename GridGeometry::LocalView; using SubControlVolume = typename FVElementGeometry::SubControlVolume; using Element = typename GridView::template Codim<0>::Entity; using GlobalPosition = typename Element::Geometry::GlobalCoordinate; public: // In the constructor be read some values from the `params.input` and initialize the friciton law. - RoughChannelSpatialParams(std::shared_ptr<const FVGridGeometry> fvGridGeometry) + RoughChannelSpatialParams(std::shared_ptr<const GridGeometry> fvGridGeometry) : ParentType(fvGridGeometry) { gravity_ = getParam<Scalar>("Problem.Gravity"); -- GitLab