v0.14.0
Loading...
Searching...
No Matches
test_T2s_47.cpp
Go to the documentation of this file.
3#include <iostream>
4using namespace FTensor;
5using namespace std;
6
8 const Tensor2_symmetric<double, 3> &t2s_2) {
9
10 Index<'i', 3> i;
11 Index<'j', 3> j;
12 Index<'k', 3> k;
13 Index<'l', 3> l;
14
16 t4s(i, j, k, l) = t2s_1(i, k) ^ t2s_2(j, l);
17
18 for (int ii = 0; ii != 3; ++ii)
19 for (int jj = 0; jj != 3; ++jj)
20 for (int kk = 0; kk != 3; ++kk)
21 for (int ll = 0; ll != 3; ++ll) {
22
23 auto small_eval = [&](auto n1, auto n2, auto n3, auto n4) {
24 return t2s_1(n1, n3) * t2s_2(n2, n4);
25 };
26
27 const auto n1 = ii;
28 const auto n2 = jj;
29 const auto n3 = kk;
30 const auto n4 = ll;
31
32 const double t =
33 small_eval(n1, n2, n3, n4) + small_eval(n2, n1, n3, n4) +
34 small_eval(n1, n2, n4, n3) + small_eval(n2, n1, n4, n3);
35
36 test_for_zero(t4s(ii, jj, kk, ll) - t, "t2s_1(i, k) ^ t2s_2(j, k)");
37
38 }
39}
Tensors class implemented by Walter Landry.
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
constexpr double t
plate stiffness
Definition plate.cpp:58
void test_T2s_47(const Tensor2_symmetric< double, 3 > &t2s_1, const Tensor2_symmetric< double, 3 > &t2s_2)
void test_for_zero(const T &t, const std::string &s)