Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where appropriate replace the use of std::array with Vector #39

Open
EmilyBourne opened this issue Jan 7, 2025 · 0 comments
Open

Where appropriate replace the use of std::array with Vector #39

EmilyBourne opened this issue Jan 7, 2025 · 0 comments

Comments

@EmilyBourne
Copy link
Member

Where appropriate replace the use of std::array with Vector as defined here:

template <class ElementType, class... Dims>
class Vector : public ddc::detail::TaggedVector<ElementType, Dims...>
{
public:
/**
* @brief A constructor for a Vector to build from individual elements:
* E.g. Vector<double, X, Y>(1.0, 2.0)
*
* or to build from component vectors
* E.g. Vector<double, X, Y>(vec_x, vec_y)
*
* @param[in] p The element of the Vector.
*/
template <class... Params>
KOKKOS_FUNCTION Vector(Params... p) : ddc::detail::TaggedVector<ElementType, Dims...>(p...)
{
}
};
/// A type describing a vector whose elements are doubles e.g. (E_x, E_y)
template <class... Dims>
using DVector = Vector<double, Dims...>;

This issue should be tackled after #38. All functions operating on Vectors should then include static_assertions to ensure that they are correctly mixing covariant/contravariant objects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant