From 0c996420ab97e22ab36c5fdff6d76c1f2ecc32ad Mon Sep 17 00:00:00 2001 From: Bernd Flemisch <bernd@iws.uni-stuttgart.de> Date: Fri, 22 Dec 2017 10:53:58 +0100 Subject: [PATCH] [headercheck] fix includes, branch between different Dune versions --- dumux/discretization/cellcentered/mpfa/darcyslaw.hh | 4 ++-- .../cellcentered/mpfa/dualgridindexset.hh | 4 ++++ dumux/discretization/cellcentered/mpfa/fourierslaw.hh | 3 +++ .../discretization/cellcentered/mpfa/localfacedata.hh | 2 ++ .../cellcentered/mpfa/omethod/interactionvolume.hh | 1 + .../freeflow/navierstokes/staggered/fluxoverplane.hh | 11 ++++++++++- dumux/io/cpgridcreator.hh | 3 ++- dumux/io/staggeredvtkoutputmodule.hh | 3 +++ .../2p/thermalconductivityjohansen.hh | 1 + tutorial/solution/ex3/h2omycompressiblecomponent.hh | 3 ++- 10 files changed, 30 insertions(+), 5 deletions(-) diff --git a/dumux/discretization/cellcentered/mpfa/darcyslaw.hh b/dumux/discretization/cellcentered/mpfa/darcyslaw.hh index 487f56ca21..9f4943bff4 100644 --- a/dumux/discretization/cellcentered/mpfa/darcyslaw.hh +++ b/dumux/discretization/cellcentered/mpfa/darcyslaw.hh @@ -25,8 +25,8 @@ #ifndef DUMUX_DISCRETIZATION_CC_MPFA_DARCYS_LAW_HH #define DUMUX_DISCRETIZATION_CC_MPFA_DARCYS_LAW_HH -#include <dune/common/densevector.hh> -#include <dune/common/densematrix.hh> +#include <dune/common/dynvector.hh> +#include <dune/common/dynmatrix.hh> #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> diff --git a/dumux/discretization/cellcentered/mpfa/dualgridindexset.hh b/dumux/discretization/cellcentered/mpfa/dualgridindexset.hh index d1bc781ab8..52817810a3 100644 --- a/dumux/discretization/cellcentered/mpfa/dualgridindexset.hh +++ b/dumux/discretization/cellcentered/mpfa/dualgridindexset.hh @@ -24,6 +24,10 @@ #ifndef DUMUX_DISCRETIZATION_MPFA_DUALGRID_INDEX_SET_HH #define DUMUX_DISCRETIZATION_MPFA_DUALGRID_INDEX_SET_HH +#include <cassert> +#include <vector> +#include <algorithm> + namespace Dumux { diff --git a/dumux/discretization/cellcentered/mpfa/fourierslaw.hh b/dumux/discretization/cellcentered/mpfa/fourierslaw.hh index 308d6fa395..1c769cf146 100644 --- a/dumux/discretization/cellcentered/mpfa/fourierslaw.hh +++ b/dumux/discretization/cellcentered/mpfa/fourierslaw.hh @@ -24,6 +24,9 @@ #ifndef DUMUX_DISCRETIZATION_CC_MPFA_FOURIERS_LAW_HH #define DUMUX_DISCRETIZATION_CC_MPFA_FOURIERS_LAW_HH +#include <dune/common/dynvector.hh> +#include <dune/common/dynmatrix.hh> + #include <dumux/common/properties.hh> #include <dumux/discretization/methods.hh> diff --git a/dumux/discretization/cellcentered/mpfa/localfacedata.hh b/dumux/discretization/cellcentered/mpfa/localfacedata.hh index a7225683f9..886677085a 100644 --- a/dumux/discretization/cellcentered/mpfa/localfacedata.hh +++ b/dumux/discretization/cellcentered/mpfa/localfacedata.hh @@ -25,6 +25,8 @@ #ifndef DUMUX_DISCRETIZATION_CC_MPFA_LOCAL_FACE_DATA_HH #define DUMUX_DISCRETIZATION_CC_MPFA_LOCAL_FACE_DATA_HH +#include <cassert> + namespace Dumux { /*! diff --git a/dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh b/dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh index 3d9b18b6d3..0730d11aca 100644 --- a/dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh +++ b/dumux/discretization/cellcentered/mpfa/omethod/interactionvolume.hh @@ -33,6 +33,7 @@ #include <dumux/discretization/cellcentered/mpfa/interactionvolumedatahandle.hh> #include <dumux/discretization/cellcentered/mpfa/interactionvolumebase.hh> +#include <dumux/discretization/cellcentered/mpfa/interactionvolume.hh> #include <dumux/discretization/cellcentered/mpfa/dualgridindexset.hh> #include <dumux/discretization/cellcentered/mpfa/localfacedata.hh> #include <dumux/discretization/cellcentered/mpfa/methods.hh> diff --git a/dumux/freeflow/navierstokes/staggered/fluxoverplane.hh b/dumux/freeflow/navierstokes/staggered/fluxoverplane.hh index d6698cd3a9..735115deaa 100644 --- a/dumux/freeflow/navierstokes/staggered/fluxoverplane.hh +++ b/dumux/freeflow/navierstokes/staggered/fluxoverplane.hh @@ -26,6 +26,7 @@ #include <numeric> +#include <dune/common/version.hh> #include <dune/common/fvector.hh> #include <dune/geometry/type.hh> #include <dune/geometry/affinegeometry.hh> @@ -210,7 +211,11 @@ public: static PlaneGeometryType makePlane(const GlobalPosition& p0, const GlobalPosition& p1) { const std::vector< Dune::FieldVector< Scalar, dim > > corners = {p0, p1}; +#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) return PlaneGeometryType(Dune::GeometryTypes::line, corners); +#else + return PlaneGeometryType(Dune::GeometryType::simplex, corners); +#endif } /*! @@ -228,7 +233,11 @@ public: const GlobalPosition& p3) { const std::vector< Dune::FieldVector< Scalar, dim > > corners = {p0, p1, p2, p3}; - return PlaneGeometryType(Dune::GeometryTypes::quadrilateral, corners); +#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6) + return PlaneGeometryType(Dune::GeometryTypes::quadrilaterial, corners); +#else + return PlaneGeometryType(Dune::GeometryType::cube, corners); +#endif } /*! diff --git a/dumux/io/cpgridcreator.hh b/dumux/io/cpgridcreator.hh index a33ef9fcda..87247965cf 100644 --- a/dumux/io/cpgridcreator.hh +++ b/dumux/io/cpgridcreator.hh @@ -30,7 +30,8 @@ #include <opm/parser/eclipse/Parser/ParseContext.hpp> #include <opm/parser/eclipse/Deck/Deck.hpp> -#include <dumux/common/basicproperties.hh> +#include <dumux/common/properties.hh> +#include <dumux/common/parameters.hh> namespace Dumux { diff --git a/dumux/io/staggeredvtkoutputmodule.hh b/dumux/io/staggeredvtkoutputmodule.hh index 571cf331d4..5a89283d56 100644 --- a/dumux/io/staggeredvtkoutputmodule.hh +++ b/dumux/io/staggeredvtkoutputmodule.hh @@ -32,6 +32,9 @@ namespace Dumux { +template<class Scalar, int dim> +class PointCloudVtkWriter; + /*! * \ingroup InputOutput * \brief A VTK output module to simplify writing dumux simulation data to VTK format diff --git a/dumux/material/fluidmatrixinteractions/2p/thermalconductivityjohansen.hh b/dumux/material/fluidmatrixinteractions/2p/thermalconductivityjohansen.hh index 86bec470bc..ca5ea29cdf 100644 --- a/dumux/material/fluidmatrixinteractions/2p/thermalconductivityjohansen.hh +++ b/dumux/material/fluidmatrixinteractions/2p/thermalconductivityjohansen.hh @@ -25,6 +25,7 @@ #define THERMALCONDUCTIVITY_JOHANSEN_HH #include <cmath> +#include <algorithm> namespace Dumux { diff --git a/tutorial/solution/ex3/h2omycompressiblecomponent.hh b/tutorial/solution/ex3/h2omycompressiblecomponent.hh index 47822a8647..e1495370c8 100644 --- a/tutorial/solution/ex3/h2omycompressiblecomponent.hh +++ b/tutorial/solution/ex3/h2omycompressiblecomponent.hh @@ -277,7 +277,8 @@ public: int compJIdx) { assert(0 <= phaseIdx && phaseIdx < numPhases); - assert(0 <= compIdx && compIdx < numComponents); + assert(0 <= compIIdx && compIIdx < numComponents); + assert(0 <= compJIdx && compJIdx < numComponents); const Scalar T = fluidState.temperature(phaseIdx); const Scalar p = fluidState.pressure(phaseIdx); -- GitLab