From 0205fb96e6958c4940d9c5822c869c113222ee2b Mon Sep 17 00:00:00 2001 From: hanchuan <> Date: Sat, 17 Apr 2021 20:47:00 +0200 Subject: [PATCH] [numeqvector] Deprecate NumEqVector property. To be replaces by Dumux::NumEqVector trait --- dumux/common/properties.hh | 2 +- dumux/common/properties/model.hh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dumux/common/properties.hh b/dumux/common/properties.hh index 7e8616f4a4..e1b02f1938 100644 --- a/dumux/common/properties.hh +++ b/dumux/common/properties.hh @@ -48,7 +48,7 @@ struct Grid { using type = UndefinedProperty; }; //!< The DUNE template<class TypeTag, class MyTypeTag> struct PrimaryVariables { using type = UndefinedProperty; }; //!< A vector of primary variables 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, ... +struct [[deprecated("NumEqVector will be removed after 3.4. Implemented in dumux/common/numeqvector.hh instead.")]] 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 ModelTraits { using type = UndefinedProperty; }; //!< Traits class encapsulating model specifications template<class TypeTag, class MyTypeTag> diff --git a/dumux/common/properties/model.hh b/dumux/common/properties/model.hh index ea9bb59c10..ef00b49990 100644 --- a/dumux/common/properties/model.hh +++ b/dumux/common/properties/model.hh @@ -45,13 +45,18 @@ struct ModelProperties {}; template<class TypeTag> struct Scalar<TypeTag, TTag::ModelProperties> { using type = double; }; +DUNE_NO_DEPRECATED_BEGIN //! Set the default vector with size number of equations to a field vector template<class TypeTag> struct NumEqVector<TypeTag, TTag::ModelProperties> { using type = Dune::FieldVector<GetPropType<TypeTag, Properties::Scalar>, GetPropType<TypeTag, Properties::ModelTraits>::numEq()>; }; +DUNE_NO_DEPRECATED_END +DUNE_NO_DEPRECATED_BEGIN //! Set the default primary variable vector to a vector of size of number of equations +//! TODO: this needs to be adapted after release 3.4 when Properties::NumEqVector is removed. template<class TypeTag> struct PrimaryVariables<TypeTag, TTag::ModelProperties> { using type = GetPropType<TypeTag, Properties::NumEqVector>; }; +DUNE_NO_DEPRECATED_END //! do not specific any model-specific default parameters here template<class TypeTag> -- GitLab