diff --git a/dumux/discretization/box/fvgridgeometry.hh b/dumux/discretization/box/fvgridgeometry.hh index 6e7a8149a34e8339dc197e4a2a2028fe427c0e3c..1717aeef859b26a0ae2c2b51b3151cf80532f284 100644 --- a/dumux/discretization/box/fvgridgeometry.hh +++ b/dumux/discretization/box/fvgridgeometry.hh @@ -66,7 +66,6 @@ class BoxFVGridGeometry : public BaseFVGridGeometry static const int dimWorld = GridView::dimensionworld; using FeCache = Dune::PQkLocalFiniteElementCache; - using FeLocalBasis = typename FeCache::FiniteElementType::Traits::LocalBasisType; using ReferenceElements = typename Dune::ReferenceElements; using GeometryHelper = BoxGeometryHelper; @@ -258,7 +257,6 @@ class BoxFVGridGeometry : public BaseFVGridGeometry using CoordScalar = typename GridView::ctype; using FeCache = Dune::PQkLocalFiniteElementCache; - using FeLocalBasis = typename FeCache::FiniteElementType::Traits::LocalBasisType; using ReferenceElements = typename Dune::ReferenceElements; public: diff --git a/dumux/discretization/box/subcontrolvolume.hh b/dumux/discretization/box/subcontrolvolume.hh index 238ec13cb580bb492dc77d2445ec0e1e38cc1d41..861cf5faa0f30be78538b6d6b2fc60980d890ce3 100644 --- a/dumux/discretization/box/subcontrolvolume.hh +++ b/dumux/discretization/box/subcontrolvolume.hh @@ -23,6 +23,8 @@ #ifndef DUMUX_DISCRETIZATION_BOX_SUBCONTROLVOLUME_HH #define DUMUX_DISCRETIZATION_BOX_SUBCONTROLVOLUME_HH +#include + #include #include #include diff --git a/dumux/discretization/fluxvariablesbase.hh b/dumux/discretization/fluxvariablesbase.hh index c2cbfcfd2d7e68de3f7b157eb5230f2cbf65e342..d2d74d03b7c3c71394ab5380a3b189a8a66dc9ff 100644 --- a/dumux/discretization/fluxvariablesbase.hh +++ b/dumux/discretization/fluxvariablesbase.hh @@ -109,18 +109,17 @@ public: const FVElementGeometry& fvGeometry, const SubControlVolumeFace& scvf) { - //! Give the upwind scheme access to the cached variables //! Forward to the discretization specific implementation return FluxStencil::stencil(element, fvGeometry, scvf); } private: - const Problem* problemPtr_; //! Pointer to the problem - const Element* elementPtr_; //! Pointer to the element at hand - const FVElementGeometry* fvGeometryPtr_; - const SubControlVolumeFace* scvFacePtr_; //! Pointer to the sub control volume face for which the flux variables are created - const ElementVolumeVariables* elemVolVarsPtr_; - const ElementFluxVariablesCache* elemFluxVarsCachePtr_; + const Problem* problemPtr_; //! Pointer to the problem + const Element* elementPtr_; //! Pointer to the element at hand + const FVElementGeometry* fvGeometryPtr_; //! Pointer to the current FVElementGeometry + const SubControlVolumeFace* scvFacePtr_; //! Pointer to the sub control volume face for which the flux variables are created + const ElementVolumeVariables* elemVolVarsPtr_; //! Pointer to the current element volume variables + const ElementFluxVariablesCache* elemFluxVarsCachePtr_; //! Pointer to the current element flux variables cache }; } // end namespace Dumux diff --git a/dumux/discretization/scvoperator.hh b/dumux/discretization/scvoperator.hh index 14f7df1e0d547c4364143560966cc4a9aca328bf..40027c0a9cdf540cb317f01722d639ba797081b6 100644 --- a/dumux/discretization/scvoperator.hh +++ b/dumux/discretization/scvoperator.hh @@ -37,11 +37,10 @@ class SubControlVolumeOperatorImplementation; * \brief The base class for solution dependent spatial parameters. */ template -using SubControlVolumeOperator = SubControlVolumeOperatorImplementation; +using SubControlVolumeOperator DUNE_DEPRECATED_MSG("Use evalSolution() instead") = SubControlVolumeOperatorImplementation; //! Specialization for the box method -template -class SubControlVolumeOperatorImplementation +template SubControlVolumeOperatorImplementation { using ThisType = SubControlVolumeOperatorImplementation; using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); diff --git a/dumux/nonlinear/newtonconvergencewriter.hh b/dumux/nonlinear/newtonconvergencewriter.hh index 099f427dbf34de869f9d839794cc39fa17b4154b..42f349027a687a3192827eda23cd0d7dc8bd74b3 100644 --- a/dumux/nonlinear/newtonconvergencewriter.hh +++ b/dumux/nonlinear/newtonconvergencewriter.hh @@ -51,13 +51,7 @@ public: const std::string& name = "newton_convergence") : writer_(gridView, name, "", "") { - // resize the output fields - for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) - { - def_[eqIdx].resize(size); - delta_[eqIdx].resize(size); - x_[eqIdx].resize(size); - } + resize(gridView, size); if (size == gridView.size(GridView::dimension)) { @@ -83,6 +77,18 @@ public: } } + //! Resizes the output fields. This has to be called whenever the grid changes + void resize(const GridView& gridView, std::size_t size) + { + // resize the output fields + for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) + { + def_[eqIdx].resize(size); + delta_[eqIdx].resize(size); + x_[eqIdx].resize(size); + } + } + //! Reset the convergence writer for a possible next Newton step //! You may set a different id in case you don't want the output to be overwritten by the next step void reset(std::size_t newId = 0UL)