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

Function Documentation

◆ test_T2_26()

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

Definition at line 7 of file test_T2_26.cpp.

9{
10 Index<'i', 3> i;
11 Index<'j', 4> j;
12 Index<'k', 3> k;
13
15 t2(i, k) = t2_5(i, j) * t2_4(j, k);
16
17 for(int ii = 0; ii < 3; ++ii)
18 for(int kk = 0; kk < 3; ++kk)
19 {
21 t2(ii, kk)
22 - (t2_5(ii, 0) * t2_4(0, kk) + t2_5(ii, 1) * t2_4(1, kk)
23 + t2_5(ii, 2) * t2_4(2, kk) + t2_5(ii, 3) * t2_4(3, kk)),
24 "T2(i,j)*T2(j,k)(" + std::to_string(ii) + "," + std::to_string(kk)
25 + ")");
26 }
27}
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)