|
| template<int rank, int dim, typename Number , typename OtherNumber , std::enable_if_t< !std::is_integral< typename ProductType< Number, OtherNumber >::type >::value, int > = 0> |
| constexpr Tensor< rank, dim, typename ProductType< Number, OtherNumber >::type > | internal::TensorImplementation::division_operator (const Tensor< rank, dim, Number > &t, const OtherNumber &factor) |
| |
|
| template<int rank_, int dim, typename Number > |
| std::ostream & | operator<< (std::ostream &out, const Tensor< rank_, dim, Number > &p) |
| |
| template<int dim, typename Number > |
| std::ostream & | operator<< (std::ostream &out, const Tensor< 0, dim, Number > &p) |
| |
|
| template<int dim, typename Number , typename Other > |
| constexpr ProductType< Other, Number >::type | operator* (const Other &object, const Tensor< 0, dim, Number > &t) |
| |
| template<int dim, typename Number , typename Other > |
| constexpr ProductType< Number, Other >::type | operator* (const Tensor< 0, dim, Number > &t, const Other &object) |
| |
| template<int dim, typename Number , typename OtherNumber > |
| constexpr ProductType< Number, OtherNumber >::type | operator* (const Tensor< 0, dim, Number > &src1, const Tensor< 0, dim, OtherNumber > &src2) |
| |
| template<int dim, typename Number , typename OtherNumber > |
| constexpr Tensor< 0, dim, typename ProductType< Number, typename EnableIfScalar< OtherNumber >::type >::type > | operator/ (const Tensor< 0, dim, Number > &t, const OtherNumber &factor) |
| |
| template<int dim, typename Number , typename OtherNumber > |
| constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE Tensor< 0, dim, typename ProductType< Number, OtherNumber >::type > | operator+ (const Tensor< 0, dim, Number > &p, const Tensor< 0, dim, OtherNumber > &q) |
| |
| template<int dim, typename Number , typename OtherNumber > |
| constexpr DEAL_II_HOST_DEVICE_ALWAYS_INLINE Tensor< 0, dim, typename ProductType< Number, OtherNumber >::type > | operator- (const Tensor< 0, dim, Number > &p, const Tensor< 0, dim, OtherNumber > &q) |
| |
| template<int rank, int dim, typename Number , typename OtherNumber > |
| constexpr Tensor< rank, dim, typename ProductType< Number, typename EnableIfScalar< OtherNumber >::type >::type > | operator* (const Tensor< rank, dim, Number > &t, const OtherNumber &factor) |
| |
| template<int rank, int dim, typename Number , typename OtherNumber > |
| constexpr Tensor< rank, dim, typename ProductType< typename EnableIfScalar< Number >::type, OtherNumber >::type > | operator* (const Number &factor, const Tensor< rank, dim, OtherNumber > &t) |
| |
| template<int rank, int dim, typename Number , typename OtherNumber > |
| constexpr Tensor< rank, dim, typename ProductType< Number, typename EnableIfScalar< OtherNumber >::type >::type > | operator/ (const Tensor< rank, dim, Number > &t, const OtherNumber &factor) |
| |
| template<int rank, int dim, typename Number , typename OtherNumber > |
| constexpr Tensor< rank, dim, typename ProductType< Number, OtherNumber >::type > | operator+ (const Tensor< rank, dim, Number > &p, const Tensor< rank, dim, OtherNumber > &q) |
| |
| template<int rank, int dim, typename Number , typename OtherNumber > |
| constexpr Tensor< rank, dim, typename ProductType< Number, OtherNumber >::type > | operator- (const Tensor< rank, dim, Number > &p, const Tensor< rank, dim, OtherNumber > &q) |
| |
| template<int dim, typename Number , typename OtherNumber > |
| constexpr Tensor< 0, dim, typename ProductType< Number, OtherNumber >::type > | schur_product (const Tensor< 0, dim, Number > &src1, const Tensor< 0, dim, OtherNumber > &src2) |
| |
| template<int rank, int dim, typename Number , typename OtherNumber > |
| constexpr Tensor< rank, dim, typename ProductType< Number, OtherNumber >::type > | schur_product (const Tensor< rank, dim, Number > &src1, const Tensor< rank, dim, OtherNumber > &src2) |
| |
|
| template<int dim, typename Number > |
| Number | l1_norm (const Tensor< 2, dim, Number > &t) |
| |
| template<int dim, typename Number > |
| Number | linfty_norm (const Tensor< 2, dim, Number > &t) |
| |
The dot product (single contraction) for tensors. This function return a tensor of rank \((\text{rank}_1 + \text{rank}_2 - 2)\) that is the contraction of the last index of a tensor src1 of rank rank_1 with the first index of a tensor src2 of rank rank_2:
\[
\text{result}_{i_1,\ldots,i_{r1},j_1,\ldots,j_{r2}}
= \sum_{k}
\text{left}_{i_1,\ldots,i_{r1}, k}
\text{right}_{k, j_1,\ldots,j_{r2}}
\]
- Note
- For the Tensor class, the multiplication operator only performs a contraction over a single pair of indices. This is in contrast to the multiplication operator for SymmetricTensor, for which the corresponding
operator*() performs a double contraction. The origin of the difference in how operator*() is implemented between Tensor and SymmetricTensor is that for the former, the product between two Tensor objects of same rank and dimension results in another Tensor object – that it, operator*() corresponds to the multiplicative group action within the group of tensors. On the other hand, there is no corresponding multiplicative group action with the set of symmetric tensors because, in general, the product of two symmetric tensors is a nonsymmetric tensor. As a consequence, for a mathematician, it is clear that operator*() for symmetric tensors must have a different meaning: namely the dot or scalar product that maps two symmetric tensors of rank 2 to a scalar. This corresponds to the double-dot (colon) operator whose meaning is then extended to the product of any two even-ranked symmetric tensors.
-
In case the contraction yields a tensor of rank 0, that is, if
rank_1==rank_2==1, then a scalar number is returned as an unwrapped number type. Return the \(l_1\) norm of the given rank-2 tensor, where \(\|\mathbf T\|_1 = \max_j \sum_i |T_{ij}|\) (maximum of the sums over columns).
Definition at line 3035 of file tensor.h.