diff --git a/dumux/assembly/fvassembler.hh b/dumux/assembly/fvassembler.hh index 7ea5dd824d836e87bafc010b82413c5e807f5a79..032bbe8b14bcfed75fedcd9a2e1e7b1023937f87 100644 --- a/dumux/assembly/fvassembler.hh +++ b/dumux/assembly/fvassembler.hh @@ -51,15 +51,12 @@ template<class TypeTag, DiffMethod diffMethod, bool isImplicit = true> class FVAssembler { using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); using GridVariables = typename GET_PROP_TYPE(TypeTag, GridVariables); - using JacobianMatrix = typename GET_PROP_TYPE(TypeTag, JacobianMatrix); - using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); using LocalResidual = typename GET_PROP_TYPE(TypeTag, LocalResidual); using Element = typename GridView::template Codim<0>::Entity; - using TimeLoop = TimeLoopBase<Scalar>; + using TimeLoop = TimeLoopBase<typename GET_PROP_TYPE(TypeTag, Scalar)>; + using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); static constexpr bool isBox = GET_PROP_VALUE(TypeTag, DiscretizationMethod) == DiscretizationMethods::Box; @@ -68,6 +65,9 @@ class FVAssembler CCLocalAssembler<TypeTag, ThisType, diffMethod, isImplicit>>; public: + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using JacobianMatrix = typename GET_PROP_TYPE(TypeTag, JacobianMatrix); + using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); using ResidualType = SolutionVector; /*! @@ -300,6 +300,22 @@ public: LocalResidual localResidual() const { return LocalResidual(problem_.get(), timeLoop_.get()); } + /*! + * \brief Update the grid variables + */ + void updateGridVariables(const SolutionVector &cursol) + { + gridVariables().update(cursol); + } + + /*! + * \brief Reset the gridVariables + */ + void resetTimeStep(const SolutionVector &cursol) + { + gridVariables().resetTimeStep(cursol); + } + private: // reset the residual vector to 0.0 void resetResidual_() diff --git a/dumux/assembly/staggeredfvassembler.hh b/dumux/assembly/staggeredfvassembler.hh index 4b144c880197922f9fdd7d743eae951f8da9f7a7..f9955bcbd2aabfe8f387c9e2c16bc9ca04411f47 100644 --- a/dumux/assembly/staggeredfvassembler.hh +++ b/dumux/assembly/staggeredfvassembler.hh @@ -51,14 +51,11 @@ template<class TypeTag, DiffMethod diffMethod, bool isImplicit = true> class StaggeredFVAssembler { using Problem = typename GET_PROP_TYPE(TypeTag, Problem); - using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); using GridView = typename GET_PROP_TYPE(TypeTag, GridView); using LocalResidual = typename GET_PROP_TYPE(TypeTag, LocalResidual); - using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); using GridVariables = typename GET_PROP_TYPE(TypeTag, GridVariables); - using JacobianMatrix = typename GET_PROP_TYPE(TypeTag, JacobianMatrix); + using TimeLoop = TimeLoopBase<typename GET_PROP_TYPE(TypeTag, Scalar)>; using SolutionVector = typename GET_PROP_TYPE(TypeTag, SolutionVector); - using TimeLoop = TimeLoopBase<Scalar>; static constexpr int dim = GridView::dimension; @@ -74,6 +71,9 @@ class StaggeredFVAssembler using FaceToCCMatrixBlock = typename GET_PROP(TypeTag, JacobianMatrix)::MatrixBlockFaceToCC; public: + using Scalar = typename GET_PROP_TYPE(TypeTag, Scalar); + using JacobianMatrix = typename GET_PROP_TYPE(TypeTag, JacobianMatrix); + using FVGridGeometry = typename GET_PROP_TYPE(TypeTag, FVGridGeometry); using ResidualType = SolutionVector; //! The constructor for stationary problems @@ -365,6 +365,22 @@ public: bool isStationaryProblem() const { return stationary_; } + /*! + * \brief Update the grid variables + */ + void updateGridVariables(const SolutionVector &cursol) + { + gridVariables().update(cursol); + } + + /*! + * \brief Reset the gridVariables + */ + void resetTimeStep(const SolutionVector &cursol) + { + gridVariables().resetTimeStep(cursol); + } + private: //! reset the residual to 0.0 void resetResidual_()