v0.14.0
Functions
test_T2_25.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_T2_25 (const Tensor2< double, 4, 3 > &t2_4, const Tensor2< double, 3, 4 > &t2_5)
 

Function Documentation

◆ test_T2_25()

void test_T2_25 ( const Tensor2< double, 4, 3 > &  t2_4,
const Tensor2< double, 3, 4 > &  t2_5 
)

Definition at line 7 of file test_T2_25.cpp.

9 {
12 
14  t2_a(i, j) = t2_5(j, i);
15 
16  test_for_zero((t2_4(i, j) * t2_a(i, j)
17  - (t2_4(0, 0) * t2_a(0, 0) + t2_4(0, 1) * t2_a(0, 1)
18  + t2_4(0, 2) * t2_a(0, 2) + t2_4(1, 0) * t2_a(1, 0)
19  + t2_4(1, 1) * t2_a(1, 1) + t2_4(1, 2) * t2_a(1, 2)
20  + t2_4(2, 0) * t2_a(2, 0) + t2_4(2, 1) * t2_a(2, 1)
21  + t2_4(2, 2) * t2_a(2, 2) + t2_4(3, 0) * t2_a(3, 0)
22  + t2_4(3, 1) * t2_a(3, 1) + t2_4(3, 2) * t2_a(3, 2)))
23  * 1e-5,
24  "T2(i,j)*T2(i,j)");
25 
26  test_for_zero((t2_4(i, j) * t2_5(j, i)
27  - (t2_4(0, 0) * t2_5(0, 0) + t2_4(0, 1) * t2_5(1, 0)
28  + t2_4(0, 2) * t2_5(2, 0) + t2_4(1, 0) * t2_5(0, 1)
29  + t2_4(1, 1) * t2_5(1, 1) + t2_4(1, 2) * t2_5(2, 1)
30  + t2_4(2, 0) * t2_5(0, 2) + t2_4(2, 1) * t2_5(1, 2)
31  + t2_4(2, 2) * t2_5(2, 2) + t2_4(3, 0) * t2_5(0, 3)
32  + t2_4(3, 1) * t2_5(1, 3) + t2_4(3, 2) * t2_5(2, 3)))
33  * 1e-5,
34  "T2(i,j)*T2(j,i)");
35 }
FTensor::Tensor2
Definition: Tensor2_value.hpp:16
test_for_zero
void test_for_zero(const T &t, const std::string &s)
Definition: test_for_zero.hpp:7
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Index
Definition: Index.hpp:23
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19