v0.14.0
Loading...
Searching...
No Matches
src
ftensor
tests
conformance
T2s
test_T2s_47.cpp
Go to the documentation of this file.
1
#include "
../../../src/FTensor.hpp
"
2
#include "
../test_for_zero.hpp
"
3
#include <iostream>
4
using namespace
FTensor
;
5
using namespace
std
;
6
7
void
test_T2s_47
(
const
Tensor2_symmetric<double, 3>
&t2s_1,
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
15
Ddg<double, 3, 3>
t4s;
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
}
FTensor.hpp
Tensors class implemented by Walter Landry.
FTensor::Ddg
Definition
Ddg_value.hpp:8
FTensor::Index
Definition
Index.hpp:24
FTensor::Tensor2_symmetric
Definition
Tensor2_symmetric_value.hpp:14
i
FTensor::Index< 'i', SPACE_DIM > i
Definition
hcurl_divergence_operator_2d.cpp:27
l
FTensor::Index< 'l', 3 > l
Definition
matrix_function.cpp:21
j
FTensor::Index< 'j', 3 > j
Definition
matrix_function.cpp:19
k
FTensor::Index< 'k', 3 > k
Definition
matrix_function.cpp:20
FTensor
Tensors class implemented by Walter Landry.
Definition
FTensor.hpp:51
std
Definition
enable_if.hpp:6
t
constexpr double t
plate stiffness
Definition
plate.cpp:58
test_T2s_47
void test_T2s_47(const Tensor2_symmetric< double, 3 > &t2s_1, const Tensor2_symmetric< double, 3 > &t2s_2)
Definition
test_T2s_47.cpp:7
test_for_zero.hpp
test_for_zero
void test_for_zero(const T &t, const std::string &s)
Definition
test_for_zero.hpp:7
Generated by
Doxygen
1.12.0 and hosted at