Bridge++
Ver. 2.0.2
gradientFlow_RungeKutta_4th.cpp
Go to the documentation of this file.
1
14
#include "
gradientFlow_RungeKutta_4th.h
"
15
16
const
std::string
GradientFlow_RungeKutta_4th::class_name
=
"GradientFlow_RungeKutta_4th"
;
17
18
//====================================================================
19
void
GradientFlow_RungeKutta_4th::flow
(
double
& t,
double
& Estep,
Field_G
& U)
20
{
21
//- aliases
22
Field_G
& w0 = U;
23
Field_G
& w5 = U;
24
25
Field_G
& w1 =
m_w1
;
26
Field_G
& w2 =
m_w2
;
27
Field_G
& w3 =
m_w3
;
28
Field_G
& w4 =
m_w4
;
29
30
Field_G
& z0 =
m_z0
;
31
Field_G
& z1 =
m_z1
;
32
Field_G
& z2 =
m_z2
;
33
Field_G
& z3 =
m_z3
;
34
35
Field_G
& zt =
m_zt
;
36
37
//- step 0
38
// calculate gradient of m_action Z_0 (SA)
39
m_action
->
force
(z0, w0);
40
41
copy
(zt, z0);
42
scal
(zt, 0.5);
43
44
// W_1=e^{Z_0/2}*U (SA)
45
mult_exp_Field_G
(w1, Estep, zt, w0,
m_Nprec
);
46
47
//- step 1
48
// Z_1
49
m_action
->
force
(z1, w1);
50
51
copy
(zt, z1);
52
scal
(zt, 0.5);
53
54
// W_2=e^{(1/2)*Z_1}*W_0
55
mult_exp_Field_G
(w2, Estep, zt, w0,
m_Nprec
);
56
57
//- step 2
58
// Z_2
59
m_action
->
force
(z2, w2);
60
61
// Z_2 - (1/2)*Z_0
62
copy
(zt, z2);
63
axpy
(zt, -0.5, z0);
64
65
// W_3=e^{Z_2 - (1/2)*Z_0}*W_1 NB. not W_0
66
mult_exp_Field_G
(w3, Estep, zt, w1,
m_Nprec
);
67
68
//- step 3
69
// Z_3
70
m_action
->
force
(z3, w3);
71
72
// 3*Z_0+2*Z_1+2*Z_2-Z_3
73
copy
(zt, z0);
74
scal
(zt, 0.25);
75
axpy
(zt, 1.0 / 6.0, z1);
76
axpy
(zt, 1.0 / 6.0, z2);
77
axpy
(zt, -1.0 / 12.0, z3);
78
79
// W_4=e^{(1/12)*(3*Z_0+2*Z_1+2*Z_2-Z_3)}*W_0
80
mult_exp_Field_G
(w4, Estep, zt, w0,
m_Nprec
);
81
82
//- step 4 (extra step)
83
// 1/12*(-Z_0+2*Z_1+2*Z_2+3*Z_3)
84
copy
(zt, z0);
85
scal
(zt, -1.0 / 12.0);
86
axpy
(zt, 1.0 / 6.0, z1);
87
axpy
(zt, 1.0 / 6.0, z2);
88
axpy
(zt, 0.25, z3);
89
90
// V_t=e^{(1/12)*(-Z_0+2*Z_1+2*Z_2+3*Z_3)}*W_4 NB. not W_0
91
mult_exp_Field_G
(w5, Estep, zt, w4,
m_Nprec
);
92
93
t += Estep;
94
}
95
96
97
//====================================================================
98
//============================================================END=====
Action::force
virtual void force(Field &)=0
returns force for molcular dynamical update of conjugate momenta.
GradientFlow_RungeKutta_4th::m_w1
Field_G m_w1
Definition:
gradientFlow_RungeKutta_4th.h:44
axpy
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
Definition:
field.cpp:380
GradientFlow_RungeKutta_4th::m_z3
Field_G m_z3
Definition:
gradientFlow_RungeKutta_4th.h:45
copy
void copy(Field &y, const Field &x)
copy(y, x): y = x
Definition:
field.cpp:212
GradientFlow_RungeKutta_4th::m_z2
Field_G m_z2
Definition:
gradientFlow_RungeKutta_4th.h:45
GradientFlow_RungeKutta_4th::m_z1
Field_G m_z1
Definition:
gradientFlow_RungeKutta_4th.h:45
GradientFlow_RungeKutta_4th::m_action
Action * m_action
Definition:
gradientFlow_RungeKutta_4th.h:39
GradientFlow_RungeKutta_4th::flow
void flow(double &t, double &Estep, Field_G &U)
Definition:
gradientFlow_RungeKutta_4th.cpp:19
GradientFlow_RungeKutta_4th::m_Nprec
int m_Nprec
Definition:
gradientFlow_RungeKutta_4th.h:40
GradientFlow_RungeKutta_4th::m_w3
Field_G m_w3
Definition:
gradientFlow_RungeKutta_4th.h:44
GradientFlow_RungeKutta_4th::m_zt
Field_G m_zt
Definition:
gradientFlow_RungeKutta_4th.h:46
gradientFlow_RungeKutta_4th.h
GradientFlow_RungeKutta_4th::m_z0
Field_G m_z0
Definition:
gradientFlow_RungeKutta_4th.h:45
GradientFlow_RungeKutta_4th::m_w4
Field_G m_w4
Definition:
gradientFlow_RungeKutta_4th.h:44
GradientFlow_RungeKutta_4th::m_w2
Field_G m_w2
Definition:
gradientFlow_RungeKutta_4th.h:44
scal
void scal(Field &x, const double a)
scal(x, a): x = a * x
Definition:
field.cpp:261
mult_exp_Field_G
void mult_exp_Field_G(Field_G &W, const double alpha, const Field_G &iP, const Field_G &U, const int Nprec)
Definition:
field_G_imp.cpp:496
GradientFlow_RungeKutta_4th::class_name
static const std::string class_name
Definition:
gradientFlow_RungeKutta_4th.h:33
Field_G
SU(N) gauge field.
Definition:
field_G.h:38
src
lib
Measurements
Gauge
gradientFlow_RungeKutta_4th.cpp
Generated on Sat Feb 10 2024 14:20:00 for Bridge++ by
1.8.17