diff --git a/dune/gdt/discretefunction/default.hh b/dune/gdt/discretefunction/default.hh index b4f9735e5321dd66122ab411d2095676cc326b44..7eaa1a2105c8c3f7434db352473d4addb94c5e2d 100644 --- a/dune/gdt/discretefunction/default.hh +++ b/dune/gdt/discretefunction/default.hh @@ -215,6 +215,31 @@ private: }; // class DiscreteFunction +template <class SpaceType, class VectorType> +ConstDiscreteFunction<SpaceType, VectorType> +make_const_discrete_function(const SpaceType& space, const VectorType& vector, + const std::string nm = "gdt.constdiscretefunction") +{ + return ConstDiscreteFunction<SpaceType, VectorType>(space, vector, nm); +} + + +template <class SpaceType, class VectorType> +DiscreteFunction<SpaceType, VectorType> make_discrete_function(const SpaceType& space, VectorType& vector, + const std::string nm = "gdt.discretefunction") +{ + return DiscreteFunction<SpaceType, VectorType>(space, vector, nm); +} + + +template <class VectorType, class SpaceType> +DiscreteFunction<SpaceType, VectorType> make_discrete_function(const SpaceType& space, + const std::string nm = "gdt.discretefunction") +{ + return DiscreteFunction<SpaceType, VectorType>(space, nm); +} + + } // namespace GDT } // namespace Dune