Bridge++
Ver. 2.0.2
epsilonTensor.cpp
Go to the documentation of this file.
1
14
#include "
epsilonTensor.h
"
15
#include <assert.h>
16
17
// const std::string Parameters::class_name = "EpsilonTensor";
18
19
//====================================================================
20
void
EpsilonTensor::init
()
21
{
22
m_Nepsilon_3
= 3;
23
m_Nepsilon_3_index
= 6;
24
25
m_epsilon_3_index
.resize(
m_Nepsilon_3_index
);
26
for
(
int
n = 0; n <
m_Nepsilon_3_index
; ++n) {
27
m_epsilon_3_index
[n].resize(
m_Nepsilon_3
);
28
}
29
m_epsilon_3_index
[0][0] = 0;
30
m_epsilon_3_index
[0][1] = 1;
31
m_epsilon_3_index
[0][2] = 2;
32
33
m_epsilon_3_index
[1][0] = 1;
34
m_epsilon_3_index
[1][1] = 2;
35
m_epsilon_3_index
[1][2] = 0;
36
37
m_epsilon_3_index
[2][0] = 2;
38
m_epsilon_3_index
[2][1] = 0;
39
m_epsilon_3_index
[2][2] = 1;
40
41
m_epsilon_3_index
[3][0] = 2;
42
m_epsilon_3_index
[3][1] = 1;
43
m_epsilon_3_index
[3][2] = 0;
44
45
m_epsilon_3_index
[4][0] = 1;
46
m_epsilon_3_index
[4][1] = 0;
47
m_epsilon_3_index
[4][2] = 2;
48
49
m_epsilon_3_index
[5][0] = 0;
50
m_epsilon_3_index
[5][1] = 2;
51
m_epsilon_3_index
[5][2] = 1;
52
53
m_epsilon_3_value
.resize(
m_Nepsilon_3_index
);
54
m_epsilon_3_value
[0] = 1;
55
m_epsilon_3_value
[1] = 1;
56
m_epsilon_3_value
[2] = 1;
57
m_epsilon_3_value
[3] = -1;
58
m_epsilon_3_value
[4] = -1;
59
m_epsilon_3_value
[5] = -1;
60
}
61
62
63
//====================================================================
64
int
EpsilonTensor::epsilon_3_index
(
const
int
n,
const
int
i)
const
65
{
66
//- range check
67
assert(n >= 0);
68
assert(n <
m_Nepsilon_3_index
);
69
70
assert(i >= 0);
71
assert(i <
m_Nepsilon_3
);
72
73
return
m_epsilon_3_index
[n][i];
74
}
75
76
77
//====================================================================
78
int
EpsilonTensor::epsilon_3_value
(
const
int
n)
const
79
{
80
//- range check
81
assert(n >= 0);
82
assert(n <
m_Nepsilon_3_index
);
83
84
return
m_epsilon_3_value
[n];
85
}
86
87
88
//====================================================================
89
//============================================================END=====
EpsilonTensor::m_Nepsilon_3_index
int m_Nepsilon_3_index
Definition:
epsilonTensor.h:61
EpsilonTensor::m_epsilon_3_index
std::vector< std::vector< int > > m_epsilon_3_index
Definition:
epsilonTensor.h:63
epsilonTensor.h
EpsilonTensor::epsilon_3_value
int epsilon_3_value(const int n) const
Definition:
epsilonTensor.cpp:78
EpsilonTensor::epsilon_3_index
int epsilon_3_index(const int n, const int i) const
Definition:
epsilonTensor.cpp:64
EpsilonTensor::m_epsilon_3_value
std::vector< int > m_epsilon_3_value
Definition:
epsilonTensor.h:64
EpsilonTensor::m_Nepsilon_3
int m_Nepsilon_3
Definition:
epsilonTensor.h:60
EpsilonTensor::init
void init()
Definition:
epsilonTensor.cpp:20
src
lib
Tools
epsilonTensor.cpp
Generated on Sat Feb 10 2024 14:20:00 for Bridge++ by
1.8.17