v0.14.0
Functions
little.cpp File Reference
#include "../../FTensor.hpp"
#include <iostream>

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 6 of file little.cpp.

7 {
8  Tensor1<double, 3> y(0, 1, 2);
9 
10  // Tensor1<double,3> y(0,1,2);
11  Tensor1<double, 3> x(2, 3, 4);
12  Tensor1<double, 3> n(5, 6, 7);
13  // Tensor2 t2(1,2,3,4,5,6,7,8,9);
14  // Tensor2 t2e(9,8,7,6,5,4,3,2,1);
15  // Tensor2_symmetric t2s(1,2,3,4,5,6);
16  // Tensor2_symmetric t2es(9,8,7,6,5,4);
17 
18  const Index<'i', 3> i;
19  // const Index<'j'> j;
20  // const Index<'k'> k;
21 
22  // y(i)=-n(i)+2.0;
23  // y(i)+=n(i)-2.0;
24  // y(i)-=n(i)*2.0;
25  // y(i)+=2.0;
26  // y(i)-=2.0;
27  // y(i)*=2.0;
28  // y(i)/=2.0;
29  // x(i)=2.0+y(i)-n(i)/2.0;
30  // n(i)=2.0-y(i)+2.0*x(i);
31  // n(i)=-(y(i)+x(i))*n(i)*0.0+1.0;
32  // t2(i,j)=t2(i,j)+2.0*t2e(i,j)-t2(i,j)*2.0;
33  // t2e(i,j)=n(k)*n(i)*(-t2(k,j));
34  // x(i)=t2e(i,j)*n(j) - n(j)*t2e(i,j);
35  // n(i)=t2e(j,i)*n(j) - n(j)*t2e(j,i) + t2s(i,j)*y(j);
36  // n(i)+=(y(i)-x(i))-(y(i)-x(i))+(y(i)-x(i))-(y(i)-x(i))+(y(i)-x(i))-(y(i)-x(i))+(y(i)-x(i))-(y(i)-x(i))+(y(i)-x(i))-(y(i)-x(i))+(y(i)-x(i))-(y(i)-x(i))+(y(i)-x(i))-(y(i)-x(i))+(y(i)-x(i))-(y(i)-x(i));
37  // //
38  // n(i)=(y(i)-x(i))*(y(i)-x(i))*(y(i)-x(i))*(y(i)-x(i))*(y(i)-x(i))*(y(i)-x(i))*(y(i)-x(i))*(y(i)-x(i))*(y(i)-x(i))*(y(i)-x(i))*(y(i)-x(i))*(y(i)-x(i))*(y(i)-x(i))*(y(i)-x(i))*(y(i)-x(i))*(y(i)-x(i))/(n(i)*n(i)*n(i)*n(i)*n(i)*n(i)*n(i)*n(i)*n(i)*n(i)*n(i)*n(i)*n(i)*n(i)*n(i));
39 
40  for(int ii = 0; ii < 100000000; ii++)
41  {
42  // const Index<'i',3> i;
43 
44  // n(i)+=(y(i)-x(i))-(y(i)-x(i))+(y(i)-x(i))-(y(i)-x(i))+(y(i)-x(i))-(y(i)-x(i))+(y(i)-x(i))-(y(i)-x(i))+(y(i)-x(i))-(y(i)-x(i))+(y(i)-x(i))-(y(i)-x(i))+(y(i)-x(i))-(y(i)-x(i))+(y(i)-x(i))-(y(i)-x(i));
45 
46  // y(i)+=x(i)+n(i);
47 
48  y(i) += (x(i) + n(i)) - (x(i) + n(i)) + (x(i) + n(i)) - (x(i) + n(i))
49  + (x(i) + n(i))
50  // -(x(i)+n(i))+(x(i)+n(i))
51  // -(x(i)+n(i))+(x(i)+n(i))
52  // -(x(i)+n(i))+(x(i)+n(i))
53  // -(x(i)+n(i))+(x(i)+n(i))
54  // -(x(i)+n(i))+(x(i)+n(i))
55  // -(x(i)+n(i))+(x(i)+n(i))
56  // -(x(i)+n(i))+(x(i)+n(i))
57  // -(x(i)+n(i))+(x(i)+n(i))
58  // -(x(i)+n(i))+(x(i)+n(i))
59  // -(x(i)+n(i))+(x(i)+n(i))
60  // -(x(i)+n(i))+(x(i)+n(i))
61  ;
62  }
63  std::cout << y(0) << " " << y(1) << " " << y(2) << std::endl;
64  // << x(0) << " " << x(1) << " " << x(2) << endl
65  // << n(0) << " " << n(1) << " " << n(2) << endl
66  // << y(i)*n(i) << endl;
67 }
FTensor::Tensor1< double, 3 >
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Index< 'i', 3 >
convert.n
n
Definition: convert.py:82