v0.15.0
Loading...
Searching...
No Matches
test_T2_28.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_28 (const Tensor2< double, 4, 3 > &t2_4, const Tensor2< double, 3, 4 > &t2_5)
 

Function Documentation

◆ test_T2_28()

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

Definition at line 7 of file test_T2_28.cpp.

9{
10 Index<'i', 4> i;
11 Index<'j', 3> j;
12 Index<'k', 3> k;
13
15 t2_a(i, j) = t2_5(j, i);
16
18 t2(j, k) = t2_4(i, j) * t2_a(i, k);
19
20 for(int jj = 0; jj < 3; ++jj)
21 for(int kk = 0; kk < 3; ++kk)
22 {
24 t2(jj, kk)
25 - (t2_4(0, jj) * t2_a(0, kk) + t2_4(1, jj) * t2_a(1, kk)
26 + t2_4(2, jj) * t2_a(2, kk) + t2_4(3, jj) * t2_a(3, kk)),
27 "T2(i,j)*T2(i,k)(" + std::to_string(jj) + "," + std::to_string(kk)
28 + ")");
29 }
30}
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
void test_for_zero(const T &t, const std::string &s)