Bridge++
Ver. 2.0.2
gradientFlow_RungeKutta_3rd.cpp
Go to the documentation of this file.
1
14
#include "
gradientFlow_RungeKutta_3rd.h
"
15
16
const
std::string
GradientFlow_RungeKutta_3rd::class_name
=
"GradientFlow_RungeKutta_3rd"
;
17
18
//====================================================================
19
void
GradientFlow_RungeKutta_3rd::flow
(
double
& t,
double
& Estep,
Field_G
& U)
20
{
21
const
double
a0 = 0.25;
22
23
const
double
b0 = -17.0 / 36.0;
24
const
double
b1 = 8.0 / 9.0;
25
26
const
double
c0 = 17.0 / 36.0;
27
const
double
c1 = -8.0 / 9.0;
28
const
double
c2 = 0.75;
29
30
//- aliases
31
Field_G
& w0 = U;
32
Field_G
& w3 = U;
33
34
Field_G
& w1 =
m_w1
;
35
Field_G
& w2 =
m_w2
;
36
37
Field_G
& z0 =
m_z0
;
38
Field_G
& z1 =
m_z1
;
39
Field_G
& z2 =
m_z2
;
40
41
Field_G
& zt =
m_zt
;
42
43
//- step 0
44
// calculate gradient of m_action Z_0 (SA)
45
m_action
->
force
(z0, w0);
46
47
// zt = a0 * z0 = 1/4 z0
48
copy
(zt, z0);
49
scal
(zt, a0);
50
51
// W_1=e^{Z_0/4}*U (SA)
52
mult_exp_Field_G
(w1, Estep, zt, w0,
m_Nprec
);
53
54
//- step 1
55
// Z_1 (SA)
56
m_action
->
force
(z1, w1);
57
58
// zt = b1 * z1 + b0 * z0 = 8/9 z1 - 17/36 z0
59
copy
(zt, z1);
60
scal
(zt, b1);
61
axpy
(zt, b0, z0);
62
63
// W_2=e^{8*Z_1/9-17*Z_0/36}*W_1 (SA)
64
mult_exp_Field_G
(w2, Estep, zt, w1,
m_Nprec
);
65
66
//- step 2
67
// Z_2 (SA)
68
m_action
->
force
(z2, w2);
69
70
// zt = c2 * z2 + c1 * z1 * c0 * z0
71
// = 3/4 z2 - 8/9 z1 + 17/36 z0
72
// = 3/4 z2 - zt_prev
73
copy
(zt, z2);
74
scal
(zt, c2);
75
axpy
(zt, c1, z1);
76
axpy
(zt, c0, z0);
77
78
// V_out=e^{3*Z_2/4-8*Z_1/9+17*Z_0/36}*W_2 (SA)
79
mult_exp_Field_G
(w3, Estep, zt, w2,
m_Nprec
);
80
81
t += Estep;
82
}
83
84
85
//====================================================================
86
//============================================================END=====
GradientFlow_RungeKutta_3rd::m_Nprec
int m_Nprec
Definition:
gradientFlow_RungeKutta_3rd.h:40
GradientFlow_RungeKutta_3rd::flow
void flow(double &t, double &Estep, Field_G &U)
Definition:
gradientFlow_RungeKutta_3rd.cpp:19
GradientFlow_RungeKutta_3rd::m_z1
Field_G m_z1
Definition:
gradientFlow_RungeKutta_3rd.h:45
Action::force
virtual void force(Field &)=0
returns force for molcular dynamical update of conjugate momenta.
GradientFlow_RungeKutta_3rd::m_w1
Field_G m_w1
Definition:
gradientFlow_RungeKutta_3rd.h:44
GradientFlow_RungeKutta_3rd::m_z0
Field_G m_z0
Definition:
gradientFlow_RungeKutta_3rd.h:45
axpy
void axpy(Field &y, const double a, const Field &x)
axpy(y, a, x): y := a * x + y
Definition:
field.cpp:380
copy
void copy(Field &y, const Field &x)
copy(y, x): y = x
Definition:
field.cpp:212
GradientFlow_RungeKutta_3rd::m_z2
Field_G m_z2
Definition:
gradientFlow_RungeKutta_3rd.h:45
GradientFlow_RungeKutta_3rd::m_w2
Field_G m_w2
Definition:
gradientFlow_RungeKutta_3rd.h:44
GradientFlow_RungeKutta_3rd::class_name
static const std::string class_name
Definition:
gradientFlow_RungeKutta_3rd.h:33
GradientFlow_RungeKutta_3rd::m_zt
Field_G m_zt
Definition:
gradientFlow_RungeKutta_3rd.h:46
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_3rd::m_action
Action * m_action
Definition:
gradientFlow_RungeKutta_3rd.h:39
Field_G
SU(N) gauge field.
Definition:
field_G.h:38
gradientFlow_RungeKutta_3rd.h
src
lib
Measurements
Gauge
gradientFlow_RungeKutta_3rd.cpp
Generated on Sat Feb 10 2024 14:20:00 for Bridge++ by
1.8.17