v0.14.0
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
2#include <iostream>
3using namespace FTensor;
4using namespace std;
5
7#include "test_T0.hpp"
8#include "test_T1.hpp"
9#include "test_T2.hpp"
10#include "test_T2as.hpp"
11#include "test_T2s.hpp"
12#include "test_T3.hpp"
13#include "test_T3as.hpp"
14#include "test_T3ch.hpp"
15#include "test_T3dg.hpp"
16#include "test_T4.hpp"
17#include "test_T4R.hpp"
18#include "test_T4ddg.hpp"
20
21int main()
22{
23 double t01(12), t02(14);
24
25 Tensor0<double *> t0_1(&t01), t0_2(&t02);
26 Tensor1<double, 3> t1_1(1., 2., 3.), t1_2(4., 5., 6.) /*,t1_3(7., 8., 9.)*/;
27 Tensor2<double, 3, 3> t2_1(10., 20., 30., 40., 50., 60., 70., 80., 90.),
28 t2_2(11., 21., 31., 41., 51., 61., 71., 81., 91.),
29 t2_3(12., 22., 32., 42., 52., 62., 72., 82., 92.);
30 Tensor2<double, 4, 3> t2_4(10.1, 20.2, 30.3, 40.4, 50.5, 60.6, 70.7, 80.8,
31 90.9, 101., 111.1, 121.2);
32 Tensor2<double, 3, 4> t2_5(310.1, 420.2, 530.3, 640.4, 750.5, 560.6, 670.7,
33 280.8, 190.9, 3101., 4111.1, 8121.2);
34 Tensor2_symmetric<double, 3> t2s_1(13., 23., 33., 43., 53., 63.),
35 t2s_2(14., 24., 34., 44., 54., 64.), t2s_3(15., 25., 35., 45., 55., 65.);
36 Tensor3<double, 3, 3, 3> t3_1(333., 334., 335., 336., 337., 338., 339., 340.,
37 341., 433., 434., 435., 436., 437., 438., 439.,
38 440., 441., 533., 534., 535., 536., 537., 538.,
39 539., 540., 541.);
41 333., 334., 335., 336., 337., 338., 339., 340., 341., 433., 434., 435.,
42 436., 437., 438., 439., 440., 441., 533., 534., 535., 536., 537., 538.);
43 Dg<double, 3, 3> t3dg_1(101., 102., 103., 104., 105., 106., 107., 108., 109.,
44 110., 111., 112., 113., 114., 115., 116., 117.,
45 118.),
46 t3dg_2(201., 202., 203., 204., 205., 206., 207., 208., 209., 210., 211.,
47 212., 213., 214., 215., 216., 217., 218.),
48 t3dg_3(301., 302., 303., 304., 305., 306., 307., 308., 309., 310., 311.,
49 312., 313., 314., 315., 316., 317., 318.);
50 Christof<double, 3, 3> t3ch_1(401., 402., 403., 404., 405., 406., 407., 408.,
51 409., 410., 411., 412., 413., 414., 415., 416.,
52 417., 418.),
53 t3ch_2(501., 502., 503., 504., 505., 506., 507., 508., 509., 510., 511.,
54 512., 513., 514., 515., 516., 517., 518.),
55 t3ch_3(601., 602., 603., 604., 605., 606., 607., 608., 609., 610., 611.,
56 612., 613., 614., 615., 616., 617., 618.);
57 Tensor3_antisymmetric<double, 3, 3> t3as_1(701., 702., 703., 704., 705.,
58 706., 707., 708., 709.),
59 t3as_2(801., 802., 803., 804., 805., 806., 807., 808., 809.),
60 t3as_3(901., 902., 903., 904., 905., 906., 907., 908., 909.);
61
62 Tensor4<double, 1, 2, 3, 4> t4_1(1001., 1002., 1003., 1004., 1005., 1006.,
63 1007., 1008., 1009., 1010., 1011., 1012.,
64 1013., 1014., 1015., 1016., 1017., 1018.,
65 1019., 1020., 1021., 1022., 1023., 1024.);
66
67 test_T0(13, t0_1, t0_2);
68 test_T1(t1_1, t1_2);
69 test_T2(t1_1, t1_2, t2_1, t2_2, t2_4, t2_5);
70 test_T2s(t1_1, t1_2, t2_1, t2_2, t2s_1, t2s_2, t2s_3);
71 test_T2as();
72 test_T3(t1_1, t1_2, t2_2, t2_3, t2s_2, t2s_3, t3_1, t3dg_2);
73 test_T3dg(t1_1, t1_2, t2_1, t2_2, t2s_1, t2s_2, t2s_3, t3dg_1, t3dg_2,
74 t3dg_3);
75 test_T3ch(13, t0_1, t0_2, t1_1, t1_2, t2_1, t2_2, t2_3, t2s_1, t2s_2, t2s_3,
76 t3dg_1, t3dg_2, t3dg_3, t3ch_1, t3ch_2, t3ch_3);
77 test_T3as(t1_2, t2_2, t3dg_1, t3dg_2, t3as_1, t3as_2, t3as_3);
78 test_T4ddg(t1_1, t1_2, t2_1, t2_2, t2_3, t2s_1, t2s_2, t2s_3, t3dg_1, t3dg_2,
79 t3dg_3);
80 test_T4R();
81 test_T4(t4_1, t2_4, t2_5, t3_2);
84
85 return 0;
86}
Tensors class implemented by Walter Landry.
int main()
Definition main.cpp:21
Tensors class implemented by Walter Landry.
Definition FTensor.hpp:51
void test_Kornecker_Delta()
void test_Levi_Civita()
void test_T0(const int &T, Tensor0< double * > &t0_1, const Tensor0< double * > &t0_2)
Definition test_T0.cpp:7
void test_T1(Tensor1< double, 3 > &t1_1, const Tensor1< double, 3 > &t1_2)
Definition test_T1.cpp:8
void test_T2(const Tensor1< double, 3 > &t1_1, const Tensor1< double, 3 > &t1_2, const Tensor2< double, 3, 3 > &t2_1, const Tensor2< double, 3, 3 > &t2_2, const Tensor2< double, 4, 3 > &t2_4, const Tensor2< double, 3, 4 > &t2_5)
Definition test_T2.cpp:65
void test_T2as()
Definition test_T2as.cpp:7
void test_T2s(Tensor1< double, 3 > &t1_1, const Tensor1< double, 3 > &t1_2, Tensor2< double, 3, 3 > &t2_1, const Tensor2< double, 3, 3 > &t2_2, Tensor2_symmetric< double, 3 > &t2s_1, const Tensor2_symmetric< double, 3 > &t2s_2, const Tensor2_symmetric< double, 3 > &t2s_3)
Definition test_T2s.cpp:133
void test_T3(const Tensor1< double, 3 > &t1_1, const Tensor1< double, 3 > &t1_2, const Tensor2< double, 3, 3 > &t2_2, const Tensor2< double, 3, 3 > &t2_3, const Tensor2_symmetric< double, 3 > &t2s_2, const Tensor2_symmetric< double, 3 > &t2s_3, const Tensor3< double, 3, 3, 3 > &t3_1, const Dg< double, 3, 3 > &t3dg_2)
Definition test_T3.cpp:24
void test_T3as(const Tensor1< double, 3 > &t1_2, const Tensor2< double, 3, 3 > &t2_2, Dg< double, 3, 3 > &t3dg_1, const Dg< double, 3, 3 > &t3dg_2, Tensor3_antisymmetric< double, 3, 3 > &t3as_1, const Tensor3_antisymmetric< double, 3, 3 > &t3as_2, const Tensor3_antisymmetric< double, 3, 3 > &t3as_3)
Definition test_T3as.cpp:44
void test_T3ch(const int &, Tensor0< double * > &, const Tensor0< double * > &, Tensor1< double, 3 > &t1_1, const Tensor1< double, 3 > &, Tensor2< double, 3, 3 > &t2_1, const Tensor2< double, 3, 3 > &, const Tensor2< double, 3, 3 > &, Tensor2_symmetric< double, 3 > &t2s_1, const Tensor2_symmetric< double, 3 > &, const Tensor2_symmetric< double, 3 > &, Dg< double, 3, 3 > &, const Dg< double, 3, 3 > &t3dg_2, const Dg< double, 3, 3 > &, Christof< double, 3, 3 > &t3ch_1, const Christof< double, 3, 3 > &t3ch_2, const Christof< double, 3, 3 > &)
Definition test_T3ch.cpp:7
void test_T3dg(Tensor1< double, 3 > &t1_1, const Tensor1< double, 3 > &t1_2, Tensor2< double, 3, 3 > &t2_1, const Tensor2< double, 3, 3 > &t2_2, Tensor2_symmetric< double, 3 > &t2s_1, const Tensor2_symmetric< double, 3 > &t2s_2, const Tensor2_symmetric< double, 3 > &t2s_3, Dg< double, 3, 3 > &t3dg_1, const Dg< double, 3, 3 > &t3dg_2, const Dg< double, 3, 3 > &t3dg_3)
Definition test_T3dg.cpp:98
void test_T4(const Tensor4< double, 1, 2, 3, 4 > &t4_1, const Tensor2< double, 4, 3 > &t2_4, const Tensor2< double, 3, 4 > &t2_5, const Tensor3< double, 2, 3, 4 > &t3_2)
Definition test_T4.cpp:26
void test_T4R()
Definition test_T4R.cpp:7
void test_T4ddg(Tensor1< double, 3 > &t1_1, const Tensor1< double, 3 > &t1_2, Tensor2< double, 3, 3 > &t2_1, const Tensor2< double, 3, 3 > &t2_2, const Tensor2< double, 3, 3 > &t2_3, Tensor2_symmetric< double, 3 > &t2s_1, const Tensor2_symmetric< double, 3 > &t2s_2, const Tensor2_symmetric< double, 3 > &t2s_3, Dg< double, 3, 3 > &t3dg_1, const Dg< double, 3, 3 > &t3dg_2, const Dg< double, 3, 3 > &t3dg_3)