v0.14.0
src
ftensor
src
FTensor
Tensor2_antisymmetric
Tensor2_antisymmetric_constructor.hpp
Go to the documentation of this file.
1
/* A helper class that allows simple initialization of the
2
Tensor2_antisymmetric, but only if it has the correct number of elements. */
3
4
#pragma once
5
6
namespace
FTensor
7
{
8
template
<
class
T,
int
Tensor_Dim>
class
Tensor2_antisymmetric_constructor
;
9
10
template
<
class
T>
class
Tensor2_antisymmetric_constructor
<T, 2>
11
{
12
public
:
13
Tensor2_antisymmetric_constructor
(T data[(1 * 2) / 2], T d01)
14
{
15
data[0] = d01;
16
}
17
};
18
19
template
<
class
T>
class
Tensor2_antisymmetric_constructor
<T, 3>
20
{
21
public
:
22
Tensor2_antisymmetric_constructor
(T data[(2 * 3) / 2], T d01, T d02, T d12)
23
{
24
data[0] = d01;
25
data[1] = d02;
26
data[2] = d12;
27
}
28
};
29
30
template
<
class
T>
class
Tensor2_antisymmetric_constructor
<T, 4>
31
{
32
public
:
33
Tensor2_antisymmetric_constructor
(T data[(3 * 4) / 2], T d01, T d02, T d03,
34
T d12, T d13, T d23)
35
{
36
data[0] = d01;
37
data[1] = d02;
38
data[2] = d03;
39
data[3] = d12;
40
data[4] = d13;
41
data[5] = d23;
42
}
43
};
44
}
FTensor
JSON compatible output.
Definition:
Christof_constructor.hpp:6
FTensor::Tensor2_antisymmetric_constructor
Definition:
Tensor2_antisymmetric_constructor.hpp:8
FTensor::Tensor2_antisymmetric_constructor< T, 3 >::Tensor2_antisymmetric_constructor
Tensor2_antisymmetric_constructor(T data[(2 *3)/2], T d01, T d02, T d12)
Definition:
Tensor2_antisymmetric_constructor.hpp:22
FTensor::Tensor2_antisymmetric_constructor< T, 2 >::Tensor2_antisymmetric_constructor
Tensor2_antisymmetric_constructor(T data[(1 *2)/2], T d01)
Definition:
Tensor2_antisymmetric_constructor.hpp:13
FTensor::Tensor2_antisymmetric_constructor< T, 4 >::Tensor2_antisymmetric_constructor
Tensor2_antisymmetric_constructor(T data[(3 *4)/2], T d01, T d02, T d03, T d12, T d13, T d23)
Definition:
Tensor2_antisymmetric_constructor.hpp:33
Generated by
Doxygen
1.8.17 and hosted at