25#ifndef GENERIC_VECTOR_H
26#define GENERIC_VECTOR_H
36template<
typename T,
unsigned D,
typename IMPL>
45 static constexpr unsigned d = D;
46 static constexpr unsigned size() {
return D; }
50 return *
static_cast<const IMPL*
>(
this)->getComponentPointer(iDim);
55 return *
static_cast<IMPL*
>(
this)->getComponentPointer(iDim);
58 template<
typename IMPL_>
61 for (
unsigned iDim=0; iDim < D; ++iDim) {
64 return *
static_cast<IMPL*
>(
this);
67 template<
typename U,
typename IMPL_>
70 for (
unsigned iDim=0; iDim < D; ++iDim) {
73 return *
static_cast<IMPL*
>(
this);
76 template<
typename IMPL_>
79 for (
unsigned iDim=0; iDim < D; ++iDim) {
82 return *
static_cast<IMPL*
>(
this);
85 template<
typename U,
typename IMPL_>
88 for (
unsigned iDim=0; iDim < D; ++iDim) {
91 return *
static_cast<IMPL*
>(
this);
97 for (
unsigned iDim=0; iDim < D; ++iDim) {
100 return *
static_cast<IMPL*
>(
this);
106 for (
unsigned iDim=0; iDim < D; ++iDim) {
109 return *
static_cast<IMPL*
>(
this);
115 for (
unsigned iDim=0; iDim < D; ++iDim) {
118 return *
static_cast<IMPL*
>(
this);
124 for (
unsigned iDim=0; iDim < D; ++iDim) {
127 return *
static_cast<IMPL*
>(
this);
131 template<
typename IMPL_>
135 for (
unsigned iDim=0; iDim < D; ++iDim) {
141 template<
typename IMPL_>
144 for (
unsigned iDim=0; iDim < D; ++iDim) {
145 if (
operator[](iDim) != rhs[iDim]) {
Top level namespace for all of OpenLB.
Generic vector of values supporting basic arithmetic.
GenericVector(GenericVector &&)=delete
GenericVector(const GenericVector &)=delete
constexpr const T & operator[](unsigned iDim) const any_platform
constexpr GenericVector()=default
constexpr IMPL & operator*=(const GenericVector< U, D, IMPL_ > &rhs) any_platform
static constexpr unsigned size()
constexpr bool operator!=(const GenericVector< T, D, IMPL_ > &rhs) const any_platform
constexpr IMPL & operator-=(const GenericVector< T, D, IMPL_ > &rhs) any_platform
constexpr bool operator==(const GenericVector< T, D, IMPL_ > &rhs) const any_platform
constexpr IMPL & operator+=(const GenericVector< U, D, IMPL_ > &rhs) any_platform
constexpr meta::enable_if_arithmetic_t< U, IMPL & > operator/=(const U &rhs) any_platform
GenericVector & operator=(GenericVector &&rhs)=delete
static constexpr unsigned d