Skip to content
Snippets Groups Projects
Commit aa192f67 authored by Oliver Sander's avatar Oliver Sander
Browse files

Copy method 'makeFunction' into namespace Dune::Fufem

The method 'makeFunction' was declared in a namespace 'Functions'.
This leads to unfortunate clashes with code from the dune-functions
module, in particular when using

  using namespace Dune;

This patch introduces a copy of that method in the namespace
Dune::Fufem (never mind the copy: the method is very small).
It also deprecates the method in the old namespace.  That way,
code that currently works still does so in the future, but we
now have a migration path away from that unfortunate 'Functions'
namespace in dune-fufem.

BUG: https://git.imp.fu-berlin.de/agnumpde/dune-fufem/issues/11
parent f999ab17
No related branches found
No related tags found
1 merge request!55Copy method 'makeFunction' into namespace Dune::Fufem
Pipeline #59175 failed
# Master (will become release 2.8)
- ...
## Deprecations and removals
- ...
- The method `makeFunction` has been copied into the namespace `Dune::Fufem`.
Previously, it was declared in the namespace 'Functions'. This lead
to unfortunate clashes with code from the dune-functions module.
Release 2.8 introduces a copy of that method in the namespace
`Dune::Fufem`. It also deprecates the method in the old namespace.
# Release 2.7
No changelog available until Release 2.7
......@@ -295,6 +295,7 @@ namespace Functions
{
template<class B, class C>
DUNE_DEPRECATED_MSG("Use method 'makeFunction' from namespace 'Dune::Fufem' instead!")
BasisGridFunction<B, C> makeFunction(const B& basis, const C& coeff)
{
return BasisGridFunction<B,C>(basis, coeff);
......@@ -302,7 +303,16 @@ BasisGridFunction<B, C> makeFunction(const B& basis, const C& coeff)
} // end namespace Functions
namespace Dune::Fufem
{
template<class B, class C>
BasisGridFunction<B, C> makeFunction(const B& basis, const C& coeff)
{
return BasisGridFunction<B,C>(basis, coeff);
}
} // end namespace Dune::Fufem
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment