v0.14.0
Loading...
Searching...
No Matches
test_T0.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_T0 (const int &T, Tensor0< double * > &t0_1, const Tensor0< double * > &t0_2)
 

Function Documentation

◆ test_T0()

void test_T0 ( const int & T,
Tensor0< double * > & t0_1,
const Tensor0< double * > & t0_2 )

Definition at line 7 of file test_T0.cpp.

9{
10 Number<0> N0;
11 Number<1> N1;
12 Number<2> N2;
13
14 /* Tensor0 test cases. */
15
16 t0_1 = T + t0_2;
17 test_for_zero(t0_1 - T - t0_2, "T+T0");
18 t0_1 += 10 + t0_2;
19 test_for_zero(t0_1 - (10 + T + 2 * t0_2), "T0+=T");
20 t0_1 -= 5 + 3 * t0_2;
21 test_for_zero(t0_1 - (5 + T - t0_2), "T0-=T");
22 t0_1 *= 2 + t0_2;
23 test_for_zero(t0_1 - (5 + T - t0_2) * (2 + t0_2), "T0*=T");
24 t0_1 /= 7.0 + t0_2;
25 test_for_zero(t0_1 - (5 + T - t0_2) * (2 + t0_2) / (7.0 + t0_2), "T0/=T");
26}
void test_for_zero(const T &t, const std::string &s)