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

Implement std::tuple_element and std::tuple_size for ProductManifold

parent ba7a411e
No related branches found
No related tags found
1 merge request!144Steps towards using LocalIntegralEnergy instead of problem-specific energy classes
......@@ -3,6 +3,9 @@
- The `RigidBodyMotion` class has been removed. Please use
`ProductManifold<RealTuple,Rotation>` from now on.
- You can use `std::tuple_element` and `std::tuple_size` with
`ProductManifold`s now.
- Building the module requires CMake version 3.16 now, to be in line
with the current core modules.
......
......@@ -485,4 +485,27 @@ namespace Dune::GFE
std::tuple<TargetSpaces ...> data_;
};
}
namespace std
{
/** \brief Make std::tuple_element work for ProductManifold
*
* As a container it is essentially a std::tuple after all.
*/
template <size_t i, typename ... Args>
struct tuple_element<i,Dune::GFE::ProductManifold<Args...> >
{
using type = typename std::tuple_element<i, std::tuple<Args...> >::type;
};
/** \brief Make std::tuple_size work for ProductManifold
*
* As a container it is essentially a std::tuple after all.
*/
template <typename ... Args>
struct tuple_size<Dune::GFE::ProductManifold<Args...> >
: std::integral_constant<std::size_t, sizeof...(Args)>
{};
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment