diff --git a/dune/stuff/function.hh b/dune/stuff/function.hh index b9f8dad6e426b36f6db960207a7bddd2a817d80f..91c6d1fc6b98ca344ce1f82c814bcabeaa1367e6 100644 --- a/dune/stuff/function.hh +++ b/dune/stuff/function.hh @@ -62,21 +62,20 @@ Dune::ParameterTree createSampleDescription(const std::string type) template <class D, int d, class R, int r> -Dune::shared_ptr<Interface<D, d, R, r>> create(const std::string type, - const Dune::ParameterTree description = Dune::ParameterTree()) +Interface<D, d, R, r>* create(const std::string type, const Dune::ParameterTree description = Dune::ParameterTree()) { if (type == "function.checkerboard") { typedef Stuff::Function::Checkerboard<D, d, R, r> FunctionType; - return Dune::make_shared<FunctionType>(FunctionType::createFromDescription(description)); + return new FunctionType(FunctionType::createFromDescription(description)); } else if (type == "function.expression") { typedef Stuff::Function::Expression<D, d, R, r> FunctionType; - return Dune::make_shared<FunctionType>(FunctionType::createFromDescription(description)); - } else if (type == "function.parametric.separable.default") { + return new FunctionType(FunctionType::createFromDescription(description)); + } else if (type == "function.separable.default") { typedef Stuff::Function::SeparableDefault<D, d, R, r> FunctionType; - return Dune::make_shared<FunctionType>(FunctionType::createFromDescription(description)); - } else if (type == "function.parametric.separable.checkerboard") { + return new FunctionType(FunctionType::createFromDescription(description)); + } else if (type == "function.separable.checkerboard") { typedef Stuff::Function::SeparableCheckerboard<D, d, R, r> FunctionType; - return Dune::make_shared<FunctionType>(FunctionType::createFromDescription(description)); + return new FunctionType(FunctionType::createFromDescription(description)); } else DUNE_THROW(Dune::RangeError, "\n" << Dune::Stuff::Common::colorStringRed("ERROR:") << " unknown function '" << type