16#ifndef dealii_vector_relations_h
17#define dealii_vector_relations_h
33 namespace VectorRelations
44 template <
int spacedim,
typename Number>
76 template <
int spacedim,
typename Number>
90template <
int spacedim,
typename Number>
95 const Number a_norm = a.
norm();
96 const Number b_norm =
b.norm();
97 Assert(a_norm > 1.e-12 * b_norm && a_norm > 1.e-12 * b_norm,
98 ExcMessage(
"Both vectors need to be non-zero!"));
100 Number argument = (a *
b) / a_norm / b_norm;
113template <
int spacedim,
typename Number>
120 ExcMessage(
"This function can only be used with spacedim==3!"));
123 ExcMessage(
"The axial vector is not a unit vector."));
126 ExcMessage(
"The vectors are not perpendicular to the axial vector."));
128 const Number dot = a *
b;
numbers::NumberTraits< Number >::real_type norm() const
constexpr Tensor< 1, dim, typename ProductType< Number1, Number2 >::type > cross_product_3d(const Tensor< 1, dim, Number1 > &src1, const Tensor< 1, dim, Number2 > &src2)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define Assert(cond, exc)
static ::ExceptionBase & ExcMessage(std::string arg1)
Expression atan2(const Expression &y, const Expression &x)
Expression acos(const Expression &x)
Expression copysign(const Expression &value, const Expression &sign)
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
SymmetricTensor< 2, dim, Number > epsilon(const Tensor< 2, dim, Number > &Grad_u)
Number signed_angle(const Tensor< 1, spacedim, Number > &a, const Tensor< 1, spacedim, Number > &b, const Tensor< 1, spacedim, Number > &axis)
Number angle(const Tensor< 1, spacedim, Number > &a, const Tensor< 1, spacedim, Number > &b)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)