Open FlyingCat2023 opened 6 days ago
First, we're fundamentally limited by https://kokkos.org/kokkos-core-wiki/ProgrammingGuide/View.html?highlight=trivial#what-types-of-data-may-a-view-contain
But you're correct that we're more restrictive since https://github.com/ECP-copa/Cabana/pull/203. The discussion there is pretty good, but I'm happy to discuss further
Thank for replying. As in #203 Rfbird asked for use cases, here I provide one that uses truncated hierarchical B-spline (THB) which is typical for many particle in cell (PIC) solvers. The THB spline is uniquely defined by the grid topology around its knot/grid node. If we consider it as a property of the node, an AOSOA data structure will be helpful to manage the data of the grids including the splines.
For some reasons I would like to use a class as the Datatype. However, I found it is not supported in Cabana_MemberTypes.hpp. What is the background of forcing its member to be arithmetic types?
template <std::size_t M, typename T, typename... Types> struct CheckMemberTypesImpl { using type = T; static_assert( std::is_trivial::value,
"Member types must be trivial" );
using value_type = typename std::remove_all_extents::type;
static_assert( std::is_arithmetic::value,
"Member value types must be arithmetic" );
}; //! \endcond