9{
11
15 "T1(i)*One(i)");
16
20
21
23 "operator<<(T1<3>)");
25
26 std::stringstream ss("[3,7,11]");
27 ss >> t1_1;
31
32 t1_1(
i) = 2 * t1_2(
i);
36 t1_1(
i) += 3 * t1_2(
i);
40 t1_1(
i) -= t1_2(
i) / 2;
60 t1_1(
i) = t1_2(
i) + t1_1(
i);
64 t1_1(
i) = -t1_2(
i) - t1_1(
i);
68 t1_1(
i) = t1_2(
i) + 10;
72 t1_1(
i) = t1_2(
i) - 10;
77 - (t1_2(0) * (t1_2(0) - 10) + t1_2(1) * (t1_2(1) - 10)
78 + t1_2(2) * (t1_2(2) - 10)),
79 "T1(i)*T1(i)");
80 t1_1(
i) = 10 - t1_2(
i);
92
93 t1_1(
i) = (t1_1(
i) & t1_2(
i));
97
99 t1_1.l2()
100 - sqrt(t1_1(0) * t1_1(0) + t1_1(1) * t1_1(1) + t1_1(2) * t1_1(2)),
101 "T1.l2()");
108}
Stateless vector whose components are all equal to one.
Tensor1< T, Tensor_Dim > normalize()
FTensor::Index< 'i', SPACE_DIM > i
void test_for_zero(const T &t, const std::string &s)
void test_ostream(const T &t, const std::string &expected, const std::string &test_name)