v0.14.0
Loading...
Searching...
No Matches
src
ftensor
tests
conformance
test_T0.cpp
Go to the documentation of this file.
1
#include "
../../src/FTensor.hpp
"
2
#include "
test_for_zero.hpp
"
3
#include <iostream>
4
using namespace
FTensor
;
5
using namespace
std
;
6
7
void
test_T0
(
const
int
&T,
Tensor0<double *>
&t0_1,
8
const
Tensor0<double *>
&t0_2)
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
}
N2
static Number< 2 > N2
Definition
BasicFeTools.hpp:101
N1
static Number< 1 > N1
Definition
BasicFeTools.hpp:100
N0
static Number< 0 > N0
Definition
BasicFeTools.hpp:99
FTensor.hpp
Tensors class implemented by Walter Landry.
FTensor::Number
Definition
Number.hpp:12
FTensor::Tensor0
Definition
Tensor0.hpp:17
FTensor
Tensors class implemented by Walter Landry.
Definition
FTensor.hpp:51
std
Definition
enable_if.hpp:6
test_T0
void test_T0(const int &T, Tensor0< double * > &t0_1, const Tensor0< double * > &t0_2)
Definition
test_T0.cpp:7
test_for_zero.hpp
test_for_zero
void test_for_zero(const T &t, const std::string &s)
Definition
test_for_zero.hpp:7
Generated by
Doxygen
1.10.0 and hosted at