v0.15.0
Loading...
Searching...
No Matches
Tensor2_symmetric_carat_Tensor2_symmetric.hpp
Go to the documentation of this file.
1/* Multiply a Tensor2_symmetric cart a Tensor2_symmetric together and yieald DDg
2 * tensor. */
3
4/* A(i,j) ^ B(i,j) -> Ddg */
5
6#pragma once
7
8namespace FTensor {
9
10template <class A, class B, class T, class U, int Dim, char i, char j, char k,
11 char l>
15
16 inline typename promote<T, U>::V eval(const int N1, const int N2,
17 const int N3, const int N4) const {
18 auto small_eval = [&](auto n1, auto n2, auto n3, auto n4) {
19 return iterA(n1, n3) * iterB(n2, n4);
20 };
21 return small_eval(N1, N2, N3, N4) + small_eval(N2, N1, N3, N4) +
22 small_eval(N1, N2, N4, N3) + small_eval(N2, N1, N4, N3);
23 }
24
25public:
30 typename promote<T, U>::V operator()(const int N1, const int N2, const int N3,
31 const int N4) const {
32 return eval(N1, N2, N3, N4);
33 }
34};
35
36template <class A, class B, class T, class U, int Dim, char i, char j, char k,
37 char l>
38Ddg_Expr<Tensor2_symmetric_carat_Tensor2_symmetric<A, B, T, U, Dim, i, j, k, l>,
39 typename promote<T, U>::V, Dim, Dim, i, j, k, l>
47
48} // namespace FTensor
constexpr double a
promote< T, U >::V eval(const int N1, const int N2, const int N3, const int N4) const
promote< T, U >::V operator()(const int N1, const int N2, const int N3, const int N4) const
Tensor2_symmetric_carat_Tensor2_symmetric(const Tensor2_symmetric_Expr< A, T, Dim, i, k > &a, const Tensor2_symmetric_Expr< B, U, Dim, j, l > &b)
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
Tensors class implemented by Walter Landry.
Definition FTensor.hpp:51
Ddg_Expr< Ddg_carat_Ddg_13< A, B, T, U, Dim, Dim23, i, j, k, l, m, n >, typename promote< T, U >::V, Dim, Dim23, i, k, m, n > operator^(const Ddg_Expr< A, T, Dim, Dim, i, j, k, l > &a, const Ddg_Expr< B, U, Dim, Dim23, j, l, m, n > &b)
constexpr AssemblyType A