v0.15.0
Loading...
Searching...
No Matches
src
ftensor
tests
speed
Number_test.cpp
Go to the documentation of this file.
1
#include "../../FTensor.hpp"
2
#include <iostream>
3
4
using namespace
FTensor
;
5
6
int
main
()
7
{
8
Tensor1<double, 3>
y(0, 1, 2);
9
Tensor1<double, 3>
x(2, 3, 4);
10
Tensor1<double, 3>
n
(5, 6, 7);
11
Tensor2
t2(1, 2, 3, 4, 5, 6, 7, 8, 9);
12
13
const
Index
<
'i'
, 3>
i
;
14
const
Index
<
'j'
>
j
;
15
const
Number<0>
N0;
16
const
Number<1>
N1;
17
const
Number<2>
N2;
18
19
for
(
int
ii = 0; ii < 100000000; ii++)
20
{
21
y(
i
) += (x(
i
) +
n
(
i
) + t2(
i
, N0))
22
// -(x(i)+n(i)+t2(i,N0))+(x(i)+n(i)+t2(i,N0))
23
// -(x(i)+n(i)+t2(i,N0))+(x(i)+n(i)+t2(i,N0))
24
// -(x(i)+n(i)+t2(i,N0))+(x(i)+n(i)+t2(i,N0))
25
// -(x(i)+n(i)+t2(i,N0))+(x(i)+n(i)+t2(i,N0))
26
// -(x(i)+n(i)+t2(i,N0))+(x(i)+n(i)+t2(i,N0))
27
// -(x(i)+n(i)+t2(i,N0))+(x(i)+n(i)+t2(i,N0))
28
// -(x(i)+n(i)+t2(i,N0))+(x(i)+n(i)+t2(i,N0))
29
// -(x(i)+n(i)+t2(i,N0))+(x(i)+n(i)+t2(i,N0))
30
// -(x(i)+n(i)+t2(i,N0))+(x(i)+n(i)+t2(i,N0))
31
// -(x(i)+n(i)+t2(i,N0))+(x(i)+n(i)+t2(i,N0))
32
// -(x(i)+n(i)+t2(i,N0))+(x(i)+n(i)+t2(i,N0))
33
// -(x(i)+n(i)+t2(i,N0))+(x(i)+n(i)+t2(i,N0))
34
// -(x(i)+n(i)+t2(i,N0))+(x(i)+n(i)+t2(i,N0))
35
;
36
}
37
std::cout << y(0) <<
" "
<< y(1) <<
" "
<< y(2) << std::endl;
38
}
main
int main()
Definition
Number_test.cpp:6
FTensor::Index
Definition
Index.hpp:24
FTensor::Number
Definition
Number.hpp:12
FTensor::Tensor1
Definition
Tensor1_value.hpp:9
FTensor::Tensor2
Definition
Tensor2_value.hpp:17
i
FTensor::Index< 'i', SPACE_DIM > i
Definition
hcurl_divergence_operator_2d.cpp:27
n
const double n
refractive index of diffusive medium
Definition
initial_diffusion.cpp:38
j
FTensor::Index< 'j', 3 > j
Definition
matrix_function.cpp:19
FTensor
Tensors class implemented by Walter Landry.
Definition
FTensor.hpp:51
Generated by
Doxygen
1.12.0 and hosted at