Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Alberto Ramos Martinez
LatticeGPU.jl
Commits
c453637e
Commit
c453637e
authored
1 month ago
by
Fernando Pérez Panadero
Browse files
Options
Download
Email Patches
Plain Diff
Flow for OBC similar as in oqcd.
parent
65b00fa0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/LatticeGPU.jl
+1
-1
src/LatticeGPU.jl
src/YM/YM.jl
+1
-1
src/YM/YM.jl
src/YM/YMact.jl
+48
-0
src/YM/YMact.jl
src/YM/YMflow.jl
+25
-0
src/YM/YMflow.jl
with
75 additions
and
2 deletions
+75
-2
src/LatticeGPU.jl
View file @
c453637e
...
...
@@ -40,7 +40,7 @@ include("YM/YM.jl")
using
.
YM
export
ztwist
export
YMworkspace
,
GaugeParm
,
force0_wilson!
,
field
,
field_pln
,
randomize!
,
zero!
,
norm2
export
force_gauge
,
MD!
export
force_gauge
,
force_gauge_flw
,
MD!
export
gauge_action
,
hamiltonian
,
plaquette
,
HMC!
,
OMF4!
export
Eoft_clover
,
Eoft_plaq
,
Qtop
export
FlowIntr
,
wfl_euler
,
zfl_euler
,
wfl_rk2
,
zfl_rk2
,
wfl_rk3
,
zfl_rk3
...
...
This diff is collapsed.
Click to expand it.
src/YM/YM.jl
View file @
c453637e
...
...
@@ -165,7 +165,7 @@ include("YMfields.jl")
export
randomize!
,
zero!
,
norm2
include
(
"YMact.jl"
)
export
krnl_plaq!
,
force_gauge
,
force_wilson
export
krnl_plaq!
,
force_gauge
,
force_gauge_flw
,
force_wilson
include
(
"YMhmc.jl"
)
export
gauge_action
,
hamiltonian
,
plaquette
,
HMC!
,
MD!
...
...
This diff is collapsed.
Click to expand it.
src/YM/YMact.jl
View file @
c453637e
...
...
@@ -320,6 +320,22 @@ function krnl_force_impr_pln!(frc1, frc2, U::AbstractArray{T}, c0, c1, Ubnd, cG,
return
nothing
end
function
bnd_rescale_flw!
(
frc1
,
lp
::
SpaceParm
{
N
,
M
,
BC_OPEN
,
D
})
where
{
N
,
M
,
D
}
@inbounds
begin
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
r
=
Int64
(
CUDA
.
blockIdx
()
.
x
)
I
=
point_coord
((
b
,
r
),
lp
)
it
=
I
[
N
]
for
id
in
1
:
N
-
1
if
(((
it
==
1
)
||
(
it
==
lp
.
iL
[
4
])))
frc1
[
b
,
id
,
r
]
=
2
*
frc1
[
b
,
id
,
r
]
end
end
end
return
nothing
end
##
## SF
...
...
@@ -918,6 +934,38 @@ end
force_gauge
(
ymws
::
YMworkspace
,
U
,
c0
,
gp
,
lp
)
=
force_gauge
(
ymws
,
U
,
c0
,
gp
.
cG
[
1
],
gp
,
lp
)
force_gauge
(
ymws
::
YMworkspace
,
U
,
gp
,
lp
)
=
force_gauge
(
ymws
,
U
,
gp
.
c0
,
gp
.
cG
[
1
],
gp
,
lp
)
"""
function force_gauge_flw(ymws::YMworkspace, U, c0, cG, gp::GaugeParm, lp::SpaceParm{N,M,BC_OPEN,D})
Computes the force for the gauge flow with Open Boundaries. An aditional factor two in the boundaries
is included, see
M. Luescher, S. Schaefer: "
Lattice
QCD
with
open
boundary
conditions
and
twisted
-
mass
reweighting
", Comput.Phys.Commun. 184 (2013) 519,
for more details.
"""
function
force_gauge_flw
(
ymws
::
YMworkspace
,
U
,
c0
,
cG
,
gp
::
GaugeParm
,
lp
::
SpaceParm
{
N
,
M
,
BC_OPEN
,
D
})
where
{
NI
,
N
,
M
,
D
}
ztw
=
ztwist
(
gp
,
lp
)
if
abs
(
c0
-
1
)
<
1.0E-10
@timeit
"Wilson gauge force"
begin
force_pln!
(
ymws
.
frc1
,
ymws
.
frc2
,
U
,
gp
.
Ubnd
,
cG
,
ztw
,
lp
::
SpaceParm
)
end
else
@timeit
"Improved gauge force"
begin
force_pln!
(
ymws
.
frc1
,
ymws
.
frc2
,
U
,
gp
.
Ubnd
,
cG
,
ztw
,
lp
::
SpaceParm
,
c0
)
end
end
CUDA
.
@sync
begin
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
bnd_rescale_flw!
(
ymws
.
frc1
,
lp
::
SpaceParm
)
end
return
nothing
end
"""
function force_wilson(ymws::YMworkspace, U, gp::GaugeParm, lp::SpaceParm)
...
...
This diff is collapsed.
Click to expand it.
src/YM/YMflow.jl
View file @
c453637e
...
...
@@ -201,6 +201,31 @@ function flw(U, int::FlowIntr{NI,T}, ns::Int64, eps, gp::GaugeParm, lp::SpacePar
end
flw
(
U
,
int
::
FlowIntr
{
NI
,
T
},
ns
::
Int64
,
gp
::
GaugeParm
,
lp
::
SpaceParm
,
ymws
::
YMworkspace
)
where
{
NI
,
T
}
=
flw
(
U
,
int
,
ns
,
int
.
eps
,
gp
,
lp
,
ymws
)
function
flw
(
U
,
int
::
FlowIntr
{
NI
,
T
},
ns
::
Int64
,
eps
,
gp
::
GaugeParm
,
lp
::
SpaceParm
{
N
,
M
,
BC_OPEN
,
D
},
ymws
::
YMworkspace
)
where
{
NI
,
T
,
N
,
M
,
D
}
@timeit
"Integrating flow equations"
begin
for
i
in
1
:
ns
force_gauge_flw
(
ymws
,
U
,
int
.
c0
,
1
,
gp
,
lp
)
if
int
.
add_zth
add_zth_term
(
ymws
::
YMworkspace
,
U
,
lp
)
end
ymws
.
mom
.=
ymws
.
frc1
U
.=
expm
.
(
U
,
ymws
.
mom
,
2
*
eps
*
int
.
r
)
for
k
in
1
:
NI
force_gauge_flw
(
ymws
,
U
,
int
.
c0
,
1
,
gp
,
lp
)
if
int
.
add_zth
add_zth_term
(
ymws
::
YMworkspace
,
U
,
lp
)
end
ymws
.
mom
.=
int
.
e0
[
k
]
.*
ymws
.
mom
.+
int
.
e1
[
k
]
.*
ymws
.
frc1
U
.=
expm
.
(
U
,
ymws
.
mom
,
2
*
eps
)
end
end
end
return
nothing
end
flw
(
U
,
int
::
FlowIntr
{
NI
,
T
},
ns
::
Int64
,
gp
::
GaugeParm
,
lp
::
SpaceParm
{
N
,
M
,
BC_OPEN
,
D
},
ymws
::
YMworkspace
)
where
{
NI
,
T
,
N
,
M
,
D
}
=
flw
(
U
,
int
,
ns
,
int
.
eps
,
gp
,
lp
,
ymws
)
##
# Adaptive step size integrators
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help