v0.14.0
src
ftensor
src
FTensor
Tensor3_antisymmetric
Tensor3_antisymmetric_constructor.hpp
Go to the documentation of this file.
1
/* A helper class that allows simple initialization of the
2
Tensor3_antisymmetric, but only if it has the correct number of
3
elements. */
4
5
#pragma once
6
7
namespace
FTensor
8
{
9
template
<
class
T,
int
Tensor_Dim0,
int
Tensor_Dim12>
10
class
Tensor3_antisymmetric_constructor
;
11
12
template
<
class
T>
class
Tensor3_antisymmetric_constructor
<T, 2, 2>
13
{
14
public
:
15
Tensor3_antisymmetric_constructor
(T data[2][1], T d001, T d101)
16
{
17
data[0][0] = d001;
18
data[1][0] = d101;
19
}
20
};
21
22
template
<
class
T>
class
Tensor3_antisymmetric_constructor
<T, 3, 3>
23
{
24
public
:
25
Tensor3_antisymmetric_constructor
(T data[3][3], T d001, T d002, T d012,
26
T d101, T d102, T d112, T d201, T d202,
27
T d212)
28
{
29
data[0][0] = d001;
30
data[1][0] = d101;
31
data[2][0] = d201;
32
33
data[0][1] = d002;
34
data[1][1] = d102;
35
data[2][1] = d202;
36
37
data[0][2] = d012;
38
data[1][2] = d112;
39
data[2][2] = d212;
40
}
41
};
42
43
template
<
class
T>
class
Tensor3_antisymmetric_constructor
<T, 4, 4>
44
{
45
public
:
46
Tensor3_antisymmetric_constructor
(T data[10][4], T d001, T d002, T d003,
47
T d012, T d013, T d023, T d101, T d102,
48
T d103, T d112, T d113, T d123, T d201,
49
T d202, T d203, T d212, T d213, T d223)
50
{
51
data[0][0] = d001;
52
data[0][1] = d002;
53
data[0][2] = d003;
54
data[0][3] = d012;
55
data[0][4] = d013;
56
data[0][5] = d023;
57
58
data[1][0] = d001;
59
data[1][1] = d002;
60
data[1][2] = d003;
61
data[1][3] = d012;
62
data[1][4] = d013;
63
data[1][5] = d023;
64
65
data[2][0] = d001;
66
data[2][1] = d002;
67
data[2][2] = d003;
68
data[2][3] = d012;
69
data[2][4] = d013;
70
data[2][5] = d023;
71
72
data[3][0] = d001;
73
data[3][1] = d002;
74
data[3][2] = d003;
75
data[3][3] = d012;
76
data[3][4] = d013;
77
data[3][5] = d023;
78
}
79
};
80
}
FTensor
JSON compatible output.
Definition:
Christof_constructor.hpp:6
FTensor::Tensor3_antisymmetric_constructor< T, 4, 4 >::Tensor3_antisymmetric_constructor
Tensor3_antisymmetric_constructor(T data[10][4], T d001, T d002, T d003, T d012, T d013, T d023, T d101, T d102, T d103, T d112, T d113, T d123, T d201, T d202, T d203, T d212, T d213, T d223)
Definition:
Tensor3_antisymmetric_constructor.hpp:46
FTensor::Tensor3_antisymmetric_constructor< T, 3, 3 >::Tensor3_antisymmetric_constructor
Tensor3_antisymmetric_constructor(T data[3][3], T d001, T d002, T d012, T d101, T d102, T d112, T d201, T d202, T d212)
Definition:
Tensor3_antisymmetric_constructor.hpp:25
FTensor::Tensor3_antisymmetric_constructor< T, 2, 2 >::Tensor3_antisymmetric_constructor
Tensor3_antisymmetric_constructor(T data[2][1], T d001, T d101)
Definition:
Tensor3_antisymmetric_constructor.hpp:15
FTensor::Tensor3_antisymmetric_constructor
Definition:
Tensor3_antisymmetric_constructor.hpp:10
Generated by
Doxygen
1.8.17 and hosted at