* @relatesalso Tensor<0,dim,Number>
*/
template <int dim, typename Number, typename Other>
-DEAL_II_CONSTEXPR DEAL_II_CUDA_HOST_DEV DEAL_II_ALWAYS_INLINE
+DEAL_II_CONSTEXPR DEAL_II_CUDA_HOST_DEV inline DEAL_II_ALWAYS_INLINE
typename ProductType<Other, Number>::type
operator*(const Other &object, const Tensor<0, dim, Number> &t)
{
* @relatesalso Tensor<0,dim,Number>
*/
template <int dim, typename Number, typename Other>
-DEAL_II_CONSTEXPR DEAL_II_CUDA_HOST_DEV DEAL_II_ALWAYS_INLINE
+DEAL_II_CONSTEXPR DEAL_II_CUDA_HOST_DEV inline DEAL_II_ALWAYS_INLINE
typename ProductType<Number, Other>::type
operator*(const Tensor<0, dim, Number> &t, const Other &object)
{
* @relatesalso Tensor
*/
template <int rank, int dim, typename Number, typename OtherNumber>
-DEAL_II_CUDA_HOST_DEV DEAL_II_CONSTEXPR DEAL_II_ALWAYS_INLINE
- Tensor<rank,
+DEAL_II_CUDA_HOST_DEV DEAL_II_CONSTEXPR inline DEAL_II_ALWAYS_INLINE
+ Tensor<rank,
dim,
typename ProductType<typename EnableIfScalar<Number>::type,
OtherNumber>::type>
- operator*(const Number &factor, const Tensor<rank, dim, OtherNumber> &t)
+ operator*(const Number &factor, const Tensor<rank, dim, OtherNumber> &t)
{
// simply forward to the operator above
return t * factor;
typename T1,
typename T2,
typename T3>
-DEAL_II_CONSTEXPR
+DEAL_II_CONSTEXPR inline DEAL_II_ALWAYS_INLINE
typename ProductType<T1, typename ProductType<T2, T3>::type>::type
contract3(const TensorT1<rank_1, dim, T1> & left,
const TensorT2<rank_1 + rank_2, dim, T2> &middle,
Assert(is_same && !is_not_same, ExcInternalError());
}
{
- DEAL_II_CONSTEXPR const double initializer_1[3] = {1., 0., 0.};
- DEAL_II_CONSTEXPR const Tensor<1, 3> c_1{initializer_1};
- DEAL_II_CONSTEXPR const double initializer_2[3] = {0., 1., 0.};
- DEAL_II_CONSTEXPR const Tensor<1, 3> c_2{initializer_2};
-
- DEAL_II_CONSTEXPR const auto c_cross = cross_product_3d(c_1, c_2);
- DEAL_II_CONSTEXPR const double initializer_ref[3] = {0., 0., 1.};
- DEAL_II_CONSTEXPR const Tensor<1, 3> ref{initializer_ref};
- DEAL_II_CONSTEXPR const bool is_same = (c_cross == ref);
- DEAL_II_CONSTEXPR const bool is_not_same = (c_cross != ref);
+ constexpr double initializer_1[3] = {1., 0., 0.};
+ constexpr Tensor<1, 3> c_1{initializer_1};
+ constexpr double initializer_2[3] = {0., 1., 0.};
+ constexpr Tensor<1, 3> c_2{initializer_2};
+
+ DEAL_II_CONSTEXPR const auto c_cross = cross_product_3d(c_1, c_2);
+ constexpr double initializer_ref[3] = {0., 0., 1.};
+ constexpr Tensor<1, 3> ref{initializer_ref};
+ DEAL_II_CONSTEXPR const bool is_same = (c_cross == ref);
+ DEAL_II_CONSTEXPR const bool is_not_same = (c_cross != ref);
Assert(is_same && !is_not_same, ExcInternalError());
}
deallog << "Used memory: " << used_memory << std::endl;
{
- DEAL_II_CONSTEXPR const double a_init[3][3] = {{1., 0., 0.},
- {2., 1., 0.},
- {3., 2., 1.}};
- DEAL_II_CONSTEXPR const Tensor<2, 3> a{a_init};
- DEAL_II_CONSTEXPR const auto inverted = invert(a);
- DEAL_II_CONSTEXPR const double ref_init[3][3] = {{1., 0., 0.},
- {-2., 1., 0.},
- {1., -2., 1}};
- DEAL_II_CONSTEXPR const Tensor<2, 3> ref{ref_init};
+ constexpr double a_init[3][3] = {{1., 0., 0.}, {2., 1., 0.}, {3., 2., 1.}};
+ constexpr Tensor<2, 3> a{a_init};
+ DEAL_II_CONSTEXPR const auto inverted = invert(a);
+ constexpr double ref_init[3][3] = {{1., 0., 0.},
+ {-2., 1., 0.},
+ {1., -2., 1}};
+ constexpr Tensor<2, 3> ref{ref_init};
Assert(inverted == ref, ExcInternalError());
}
{
- DEAL_II_CONSTEXPR const double a_init[3][3] = {{1., 0., 0.},
- {2., 1., 0.},
- {3., 2., 1.}};
- DEAL_II_CONSTEXPR const Tensor<2, 3> a{a_init};
- DEAL_II_CONSTEXPR const auto transposed = transpose(a);
- DEAL_II_CONSTEXPR const double ref_init[3][3] = {{1., 2., 3.},
- {0., 1., 2.},
- {0., 0., 1}};
- DEAL_II_CONSTEXPR const Tensor<2, 3> ref{ref_init};
+ constexpr double a_init[3][3] = {{1., 0., 0.}, {2., 1., 0.}, {3., 2., 1.}};
+ constexpr Tensor<2, 3> a{a_init};
+ DEAL_II_CONSTEXPR const auto transposed = transpose(a);
+ constexpr double ref_init[3][3] = {{1., 2., 3.}, {0., 1., 2.}, {0., 0., 1}};
+ constexpr Tensor<2, 3> ref{ref_init};
Assert(transposed == ref, ExcInternalError());
DEAL_II_CONSTEXPR const auto dummy = scalar_product(a, ref);
DEAL_II_CONSTEXPR const auto dummy_2 = contract<0, 0>(a, ref);