v0.14.0
Loading...
Searching...
No Matches
test_T0.cpp
Go to the documentation of this file.
2#include "test_for_zero.hpp"
3#include <iostream>
4using namespace FTensor;
5using namespace std;
6
7void test_T0(const int &T, Tensor0<double *> &t0_1,
8 const Tensor0<double *> &t0_2)
9{
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}
static Number< 2 > N2
static Number< 1 > N1
static Number< 0 > N0
Tensors class implemented by Walter Landry.
Tensors class implemented by Walter Landry.
Definition FTensor.hpp:51
void test_T0(const int &T, Tensor0< double * > &t0_1, const Tensor0< double * > &t0_2)
Definition test_T0.cpp:7
void test_for_zero(const T &t, const std::string &s)