v0.14.0
Functions
test_T4_008.cpp File Reference
#include "../../../src/FTensor.hpp"
#include "../test_for_zero.hpp"
#include <iostream>

Go to the source code of this file.

Functions

void test_T4_008 ()
 

Function Documentation

◆ test_T4_008()

void test_T4_008 ( )

Definition at line 7 of file test_T4_008.cpp.

7  {
8 
13 
15 
16  for (int ii = 0; ii != 3;++ii)
17  for (int jj = 0; jj != 3;++jj)
18  for (int kk = 0; kk != 3;++kk)
19  for (int ll = 0; ll != 3;++ll)
20  t_4(ii, jj, kk, ll) = 1 + ii + 10 * jj + 100 * kk + 1000 * ll;
21 
24  for (int ii = 0; ii != 3;++ii)
25  for (int jj = ii; jj != 3;++jj) {
26  ts_2(ii, jj) = 1 + ii + 10 * jj;
27  t_2(ii, jj) = 1 + ii + 10 * jj;
28  t_2(jj, ii) = 1 + ii + 10 * jj;
29  }
30 
32  t_2_2(k, l) = t_4(i, j, k, l) * ts_2(i, j);
33  t_2_2(k, l) -= t_4(i, j, k, l) * t_2(i, j);
34  for (int ii = 0; ii != 3; ++ii)
35  for (int jj = 0; jj != 3; ++jj) {
36  test_for_zero(t_2_2(ii, jj), "T4(i,j,k,l)*Ts2(i,j)(" + to_string(ii) +
37  "," + to_string(jj) + ")");
38  }
39 
40 
41 }
FTensor::Tensor2_symmetric
Definition: Tensor2_symmetric_value.hpp:13
FTensor::Tensor2< double, 3, 3 >
test_for_zero
void test_for_zero(const T &t, const std::string &s)
Definition: test_for_zero.hpp:7
FTensor::Tensor4
Definition: Tensor4_value.hpp:18
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Index< 'i', 3 >
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21