Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
FerFlow.jl
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Fernando Pérez Panadero
FerFlow.jl
Commits
7b2d14d5
Commit
7b2d14d5
authored
Feb 12, 2025
by
Fernando Pérez Panadero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixes. Stable io version.
parent
78447fa4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
157 additions
and
129 deletions
+157
-129
src/meas.jl
src/meas.jl
+19
-3
src/utils.jl
src/utils.jl
+138
-126
No files found.
src/meas.jl
View file @
7b2d14d5
...
...
@@ -316,7 +316,7 @@ function Two_pt_lagrange() # Will be 2pt lagrange mult
pptilde_t0
[
:
,
noi
,
f
]
.=
zero
(
ComplexF64
)
@timeit
"Volume sum"
begin
pphat_t0
[
:
,
noi
,
f
]
.=
-
scalar_contraction
(
psi
)
pptilde_t0
[
:
,
noi
,
f
]
.=
gammazero_contraction
(
psi
)
pptilde_t0
[
:
,
noi
,
f
]
.=
dot_contraction
(
dws
.
st
,
psi
)
end
_
,
epslist
=
flw_adapt
(
U
,
psi
,
int
,
params
[
"Frontflow"
][
"t_zero"
],
gp
,
dpar
[
f
],
lp
,
ymws
,
dws
)
...
...
@@ -337,7 +337,7 @@ function Two_pt_lagrange() # Will be 2pt lagrange mult
pptilde_t
[
:
,
noi
,
fl
,
f
]
.=
zero
(
ComplexF64
)
@timeit
"Volume sum"
begin
pphat_t
[
:
,
noi
,
fl
,
f
]
.=
-
scalar_contraction
(
psi
)
pptilde_t
[
:
,
noi
,
fl
,
f
]
.=
gammazero_contraction
(
psi
)
pptilde_t
[
:
,
noi
,
fl
,
f
]
.=
dot_contraction
(
dws
.
st
,
psi
)
end
ymws
.
U1
.=
U
flw
(
U
,
psi
,
int
,
1
,
params
[
"Frontflow"
][
"epsilon"
],
gp
,
dpar
[
f
],
lp
,
ymws
,
dws
)
...
...
@@ -349,7 +349,7 @@ function Two_pt_lagrange() # Will be 2pt lagrange mult
pptilde_t
[
:
,
noi
,
end
,
f
]
.=
zero
(
ComplexF64
)
@timeit
"Volume sum"
begin
pphat_t
[
:
,
noi
,
end
,
f
]
.=
-
scalar_contraction
(
psi
)
pptilde_t
[
:
,
noi
,
end
,
f
]
.=
gammazero_contraction
(
psi
)
pptilde_t
[
:
,
noi
,
end
,
f
]
.=
dot_contraction
(
dws
.
st
,
psi
)
end
@timeit
"CPU to GPU"
copyto!
(
U
,
U_CPU
)
...
...
@@ -387,6 +387,22 @@ function scalar_contraction(psi)
return
reshape
(
Array
(
CUDA
.
reduce
(
+
,
ymws
.
rm
;
dims
=
(
1
,
2
,
3
))),
lp
.
iL
[
end
])
end
function
krnl_dot_contraction
!
(
cm
,
st
,
psi
,
lp
)
@inbounds
begin
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
r
=
Int64
(
CUDA
.
blockIdx
()
.
x
)
I
=
point_coord
((
b
,
r
),
lp
)
cm
[
I
]
=
dot
(
st
[
b
,
r
],
psi
[
b
,
r
])
end
return
nothing
end
function
dot_contraction
(
st
,
psi
)
CUDA
.
@sync
begin
CUDA
.
@cuda
threads
=
lp
.
bsz
blocks
=
lp
.
rsz
krnl_dot_contraction!
(
ymws
.
cm
,
st
,
psi
,
lp
)
end
return
reshape
(
Array
(
CUDA
.
reduce
(
+
,
ymws
.
cm
;
dims
=
(
1
,
2
,
3
))),
lp
.
iL
[
end
])
end
function
krnl_gammazero_contraction
!
(
cm
,
psi
,
lp
)
@inbounds
begin
b
=
Int64
(
CUDA
.
threadIdx
()
.
x
)
...
...
src/utils.jl
View file @
7b2d14d5
...
...
@@ -73,49 +73,49 @@ function read_ff(name::String)
CN
=
Vector
{
ComplexF64
}(
undef
,
1
);
RN
=
Vector
{
Float64
}(
undef
,
1
);
pp_corr
=
Array
{
Float64
}(
undef
,
1
,
iL
[
4
],
N_noiseff
,
Nf
);
ap_corr
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noiseff
,
Nf
);
pphat0
=
Array
{
Float64
}(
undef
,
1
,
iL
[
4
],
N_noiseff
,
Nf
);
pptilde0
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noiseff
,
Nf
);
pp_corr_t
=
Array
{
Float64
}(
undef
,
1
,
iL
[
4
],
N_noiseff
,
nsteps
+
1
,
Nf
);
ap_corr_t
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noiseff
,
nsteps
+
1
,
Nf
);
pphat_t
=
Array
{
Float64
}(
undef
,
1
,
iL
[
4
],
N_noiseff
,
nsteps
+
1
,
Nf
);
pptilde_t
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noiseff
,
nsteps
+
1
,
Nf
);
Eoft
=
Array
{
Complex
{
Float64
}}(
undef
,
1
,
1
+
nsteps
,
iL
[
4
]);
Eoft0
=
Array
{
Complex
{
Float64
}}(
undef
,
1
,
iL
[
4
]);
Qt
=
Array
{
Complex
{
Float64
}}(
undef
,
1
,
1
+
nsteps
,
iL
[
4
]);
Qt0
=
Array
{
Complex
{
Float64
}}(
undef
,
1
,
iL
[
4
]);
pp_corr_tfl
=
Array
{
Float64
}(
undef
,
1
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
ap_corr_tfl
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
Sigma
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
Sigma_cfl
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
Sigma2
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
Sigma2_cfl
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
ChiDchi
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
ChiDchi_cfl
=
Array
{
ComplexF64
}(
undef
,
1
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
pp_corr_mc
=
Array
{
Float64
}(
undef
,
0
,
iL
[
4
],
N_noiseff
,
Nf
);
ap_corr_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noiseff
,
Nf
);
pphat0_mc
=
Array
{
Float64
}(
undef
,
0
,
iL
[
4
],
N_noiseff
,
Nf
);
pptilde0_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noiseff
,
Nf
);
pp
hat_t_mc
=
Array
{
Float64
}(
undef
,
0
,
iL
[
4
],
N_noiseff
,
nsteps
+
1
,
Nf
);
pptilde_t_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noiseff
,
nsteps
+
1
,
Nf
);
pp
_corr_t_mc
=
Array
{
Float64
}(
undef
,
0
,
iL
[
4
],
N_noiseff
,
nsteps
+
1
,
Nf
);
ap_corr_t_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noiseff
,
nsteps
+
1
,
Nf
);
Eoft_mc
=
Array
{
Complex
{
Float64
}}(
undef
,
0
,
1
+
nsteps
,
iL
[
4
]);
Eoft0_mc
=
Array
{
Complex
{
Float64
}}(
undef
,
0
,
iL
[
4
]);
Qt_mc
=
Array
{
Complex
{
Float64
}}(
undef
,
0
,
1
+
nsteps
,
iL
[
4
]);
Qt0_mc
=
Array
{
Complex
{
Float64
}}(
undef
,
0
,
iL
[
4
]);
pp_corr_tfl_mc
=
Array
{
Float64
}(
undef
,
0
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
ap_corr_tfl_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
Sigma_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
Sigma_cfl_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
Sigma2_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
Sigma2_cfl_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
ChiDchi_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
ChiDchi_cfl_mc
=
Array
{
ComplexF64
}(
undef
,
0
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
pp_corr
=
Array
{
Float64
}(
undef
,
iL
[
4
],
N_noiseff
,
Nf
);
ap_corr
=
Array
{
ComplexF64
}(
undef
,
iL
[
4
],
N_noiseff
,
Nf
);
pphat0
=
Array
{
Float64
}(
undef
,
iL
[
4
],
N_noiseff
,
Nf
);
pptilde0
=
Array
{
ComplexF64
}(
undef
,
iL
[
4
],
N_noiseff
,
Nf
);
pp_corr_t
=
Array
{
Float64
}(
undef
,
iL
[
4
],
N_noiseff
,
nsteps
+
1
,
Nf
);
ap_corr_t
=
Array
{
ComplexF64
}(
undef
,
iL
[
4
],
N_noiseff
,
nsteps
+
1
,
Nf
);
pphat_t
=
Array
{
Float64
}(
undef
,
iL
[
4
],
N_noiseff
,
nsteps
+
1
,
Nf
);
pptilde_t
=
Array
{
ComplexF64
}(
undef
,
iL
[
4
],
N_noiseff
,
nsteps
+
1
,
Nf
);
Eoft
=
Array
{
Complex
{
Float64
}}(
undef
,
1
+
nsteps
,
iL
[
4
]);
Eoft0
=
Array
{
Complex
{
Float64
}}(
undef
,
iL
[
4
]);
Qt
=
Array
{
Complex
{
Float64
}}(
undef
,
1
+
nsteps
,
iL
[
4
]);
Qt0
=
Array
{
Complex
{
Float64
}}(
undef
,
iL
[
4
]);
pp_corr_tfl
=
Array
{
Float64
}(
undef
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
ap_corr_tfl
=
Array
{
ComplexF64
}(
undef
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
Sigma
=
Array
{
ComplexF64
}(
undef
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
Sigma_cfl
=
Array
{
ComplexF64
}(
undef
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
Sigma2
=
Array
{
ComplexF64
}(
undef
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
Sigma2_cfl
=
Array
{
ComplexF64
}(
undef
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
ChiDchi
=
Array
{
ComplexF64
}(
undef
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
ChiDchi_cfl
=
Array
{
ComplexF64
}(
undef
,
iL
[
4
],
N_noisebf
,
nflow
,
Nf
);
pp_corr_mc
=
[
Vector
{
Float64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noiseff
,
_
in
1
:
Nf
]
ap_corr_mc
=
[
Vector
{
ComplexF64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noiseff
,
_
in
1
:
Nf
]
pphat0_mc
=
[
Vector
{
Float64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noiseff
,
_
in
1
:
Nf
]
pptilde0_mc
=
[
Vector
{
ComplexF64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noiseff
,
_
in
1
:
Nf
]
pp
_corr_t_mc
=
[
Vector
{
Float64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noiseff
,
_
in
1
:
nsteps
+
1
,
_
in
1
:
Nf
]
ap_corr_t_mc
=
[
Vector
{
ComplexF64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noiseff
,
_
in
1
:
nsteps
+
1
,
_
in
1
:
Nf
]
pp
hat_t_mc
=
[
Vector
{
Float64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noiseff
,
_
in
1
:
nsteps
+
1
,
_
in
1
:
Nf
]
pptilde_t_mc
=
[
Vector
{
ComplexF64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noiseff
,
_
in
1
:
nsteps
+
1
,
_
in
1
:
Nf
]
Eoft_mc
=
[
Vector
{
Complex
{
Float64
}}()
for
_
in
1
:
1
+
nsteps
,
_
in
1
:
iL
[
4
]]
Eoft0_mc
=
[
Vector
{
Complex
{
Float64
}}()
for
_
in
1
:
iL
[
4
]]
Qt_mc
=
[
Vector
{
Complex
{
Float64
}}()
for
_
in
1
:
1
+
nsteps
,
_
in
1
:
iL
[
4
]]
Qt0_mc
=
[
Vector
{
Complex
{
Float64
}}()
for
_
in
1
:
iL
[
4
]]
pp_corr_tfl_mc
=
[
Vector
{
Float64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noisebf
,
_
in
1
:
nflow
,
_
in
1
:
Nf
]
ap_corr_tfl_mc
=
[
Vector
{
ComplexF64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noisebf
,
_
in
1
:
nflow
,
_
in
1
:
Nf
]
Sigma_mc
=
[
Vector
{
ComplexF64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noisebf
,
_
in
1
:
nflow
,
_
in
1
:
Nf
]
Sigma_cfl_mc
=
[
Vector
{
ComplexF64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noisebf
,
_
in
1
:
nflow
,
_
in
1
:
Nf
]
Sigma2_mc
=
[
Vector
{
ComplexF64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noisebf
,
_
in
1
:
nflow
,
_
in
1
:
Nf
]
Sigma2_cfl_mc
=
[
Vector
{
ComplexF64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noisebf
,
_
in
1
:
nflow
,
_
in
1
:
Nf
]
ChiDchi_mc
=
[
Vector
{
ComplexF64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noisebf
,
_
in
1
:
nflow
,
_
in
1
:
Nf
]
ChiDchi_cfl_mc
=
[
Vector
{
ComplexF64
}()
for
_
in
1
:
iL
[
4
],
_
in
1
:
N_noisebf
,
_
in
1
:
nflow
,
_
in
1
:
Nf
]
while
BDIO_get_uinfo
(
file
)
!=
8
BDIO_seek!
(
file
)
...
...
@@ -126,97 +126,97 @@ function read_ff(name::String)
for
f
in
1
:
Nf
for
noi
in
1
:
N_noiseff
BDIO_read
(
file
,
TvecR
)
pp_corr
[
1
,
:
,
noi
,
f
]
.=
TvecR
pp_corr
[
:
,
noi
,
f
]
.=
TvecR
BDIO_read
(
file
,
TvecC
)
ap_corr
[
1
,
:
,
noi
,
f
]
.=
TvecC
ap_corr
[
:
,
noi
,
f
]
.=
TvecC
BDIO_read
(
file
,
TvecR
)
pphat0
[
1
,
:
,
noi
,
f
]
.=
TvecR
pphat0
[
:
,
noi
,
f
]
.=
TvecR
BDIO_read
(
file
,
TvecC
)
pptilde0
[
1
,
:
,
noi
,
f
]
.=
TvecC
pptilde0
[
:
,
noi
,
f
]
.=
TvecC
for
fl
in
1
:
nsteps
+
1
BDIO_read
(
file
,
TvecR
)
pp_corr_t
[
1
,
:
,
noi
,
fl
,
f
]
.=
TvecR
pp_corr_t
[
:
,
noi
,
fl
,
f
]
.=
TvecR
BDIO_read
(
file
,
TvecC
)
ap_corr_t
[
1
,
:
,
noi
,
fl
,
f
]
.=
TvecC
ap_corr_t
[
:
,
noi
,
fl
,
f
]
.=
TvecC
BDIO_read
(
file
,
TvecR
)
pphat_t
[
1
,
:
,
noi
,
fl
,
f
]
.=
TvecR
pphat_t
[
:
,
noi
,
fl
,
f
]
.=
TvecR
BDIO_read
(
file
,
TvecC
)
pptilde_t
[
1
,
:
,
noi
,
fl
,
f
]
.=
TvecC
pptilde_t
[
:
,
noi
,
fl
,
f
]
.=
TvecC
end
end
end
BDIO_read
(
file
,
TvecC
)
Eoft0
[
1
,
:
]
.=
TvecC
Eoft0
[
:
]
.=
TvecC
BDIO_read
(
file
,
TvecC
)
Qt0
[
1
,
:
]
.=
TvecC
Qt0
[
:
]
.=
TvecC
for
fl
in
1
:
nsteps
+
1
BDIO_read
(
file
,
TvecC
)
Eoft
[
1
,
:
]
.=
TvecC
Eoft
[
fl
,
:
]
.=
TvecC
BDIO_read
(
file
,
TvecC
)
Qt
[
1
,
:
]
.=
TvecC
Qt
[
fl
,
:
]
.=
TvecC
end
for
f
in
1
:
Nf
for
noi
in
1
:
N_noisebf
for
fl
in
1
:
nflow
BDIO_read
(
file
,
TvecR
)
pp_corr_tfl
[
1
,
:
,
noi
,
fl
,
f
]
.=
TvecR
pp_corr_tfl
[
:
,
noi
,
fl
,
f
]
.=
TvecR
BDIO_read
(
file
,
TvecC
)
ap_corr_tfl
[
1
,
:
,
noi
,
fl
,
f
]
.=
TvecC
ap_corr_tfl
[
:
,
noi
,
fl
,
f
]
.=
TvecC
BDIO_read
(
file
,
TvecC
)
Sigma
[
1
,
:
,
noi
,
fl
,
f
]
.=
TvecC
Sigma
[
:
,
noi
,
fl
,
f
]
.=
TvecC
BDIO_read
(
file
,
TvecC
)
Sigma_cfl
[
1
,
:
,
noi
,
fl
,
f
]
.=
TvecC
Sigma_cfl
[
:
,
noi
,
fl
,
f
]
.=
TvecC
BDIO_read
(
file
,
TvecC
)
Sigma2
[
1
,
:
,
noi
,
fl
,
f
]
.=
TvecC
Sigma2
[
:
,
noi
,
fl
,
f
]
.=
TvecC
BDIO_read
(
file
,
TvecC
)
Sigma2_cfl
[
1
,
:
,
noi
,
fl
,
f
]
.=
TvecC
Sigma2_cfl
[
:
,
noi
,
fl
,
f
]
.=
TvecC
BDIO_read
(
file
,
TvecC
)
ChiDchi
[
1
,
:
,
noi
,
fl
,
f
]
.=
TvecC
ChiDchi
[
:
,
noi
,
fl
,
f
]
.=
TvecC
BDIO_read
(
file
,
TvecC
)
ChiDchi_cfl
[
1
,
:
,
noi
,
fl
,
f
]
.=
TvecC
ChiDchi_cfl
[
:
,
noi
,
fl
,
f
]
.=
TvecC
end
end
end
Eoft0_mc
=
[
Eoft0_mc
;
Eoft0
]
Eoft_mc
=
[
Eoft_mc
;
Eoft
]
Qt0_mc
=
[
Qt0_mc
;
Qt0
]
Qt_mc
=
[
Qt_mc
;
Qt
]
p
p_corr_mc
=
[
pp_corr_mc
;
pp_corr
]
ap_corr_mc
=
[
ap_corr_mc
;
ap_corr
]
p
phat0_mc
=
[
pphat0_mc
;
pphat0
]
p
ptilde0_mc
=
[
pptilde0_mc
;
pptilde0
]
p
p_corr_t_mc
=
[
pp_corr_t_mc
;
pp_corr_t
]
ap_corr_t_mc
=
[
ap_corr_t_mc
;
ap_corr_t
]
p
phat_t_mc
=
[
pphat_t_mc
;
pphat_t
]
p
ptilde_t_mc
=
[
pptilde_t_mc
;
pptilde_t
]
p
p_corr_tfl_mc
=
[
pp_corr_tfl_mc
;
pp_corr_tfl
]
ap_corr_tfl_mc
=
[
ap_corr_tfl_mc
;
ap_corr_tfl
]
Sigma_mc
=
[
Sigma_mc
;
Sigma
]
Sigma_cfl_mc
=
[
Sigma_cfl_mc
;
Sigma_cfl
]
Sigma2_mc
=
[
Sigma2_mc
;
Sigma2
]
Sigma2_cfl_mc
=
[
Sigma2_cfl_mc
;
Sigma2_cfl
]
ChiDchi_mc
=
[
ChiDchi_mc
;
ChiDchi
]
ChiDchi_cfl_mc
=
[
ChiDchi_cfl_mc
;
ChiDchi_cfl
]
push!
.
(
Eoft0_mc
,
Eoft0
)
push!
.
(
Eoft_mc
,
Eoft
)
push!
.
(
Qt0_mc
,
Qt0
)
push!
.
(
Qt_mc
,
Qt
)
p
ush!
.
(
pp_corr_mc
,
pp_corr
)
push!
.
(
ap_corr_mc
,
ap_corr
)
p
ush!
.
(
pphat0_mc
,
pphat0
)
p
ush!
.
(
pptilde0_mc
,
pptilde0
)
p
ush!
.
(
pp_corr_t_mc
,
pp_corr_t
)
push!
.
(
ap_corr_t_mc
,
ap_corr_t
)
p
ush!
.
(
pphat_t_mc
,
pphat_t
)
p
ush!
.
(
pptilde_t_mc
,
pptilde_t
)
p
ush!
.
(
pp_corr_tfl_mc
,
pp_corr_tfl
)
push!
.
(
ap_corr_tfl_mc
,
ap_corr_tfl
)
push!
.
(
Sigma_mc
,
Sigma
)
push!
.
(
Sigma_cfl_mc
,
Sigma_cfl
)
push!
.
(
Sigma2_mc
,
Sigma2
)
push!
.
(
Sigma2_cfl_mc
,
Sigma2_cfl
)
push!
.
(
ChiDchi_mc
,
ChiDchi
)
push!
.
(
ChiDchi_cfl_mc
,
ChiDchi_cfl
)
BDIO_seek!
(
file
)
BDIO_seek!
(
file
)
...
...
@@ -224,7 +224,7 @@ function read_ff(name::String)
BDIO_close!
(
file
)
return
Eoft0_mc
,
Eoft_mc
,
Qt0_mc
,
Qt
,
pp_corr_mc
,
ap_corr_mc
,
pp_corr_t_mc
,
ap_corr_t_mc
,
pp_corr_tfl_mc
,
ap_corr_tfl_mc
,
Sigma_mc
,
Sigma_cfl_mc
,
Sigma2_mc
,
Sigma2_cfl_mc
,
ChiDchi_mc
,
ChiDchi_cfl_mc
,
pphat_t_mc
,
pptilde_t_mc
,
pphat0_mc
,
pptilde0_mc
return
Eoft0_mc
,
Eoft_mc
,
Qt0_mc
,
Qt
_mc
,
pp_corr_mc
,
ap_corr_mc
,
pp_corr_t_mc
,
ap_corr_t_mc
,
pp_corr_tfl_mc
,
ap_corr_tfl_mc
,
Sigma_mc
,
Sigma_cfl_mc
,
Sigma2_mc
,
Sigma2_cfl_mc
,
ChiDchi_mc
,
ChiDchi_cfl_mc
,
pphat_t_mc
,
pptilde_t_mc
,
pphat0_mc
,
pptilde0_mc
end
...
...
@@ -235,48 +235,60 @@ Loads in the variables 'Eoft','Eoft0','Qt','Qt0', 'pp_corr', 'ap_corr', 'pp_corr
'uwreal' quantities. Noise average has been performed. The indices are, when corresponding, eucliden time and flow times
"""
function
uwff
(
file
::
String
)
Eoft0_mc
,
Eoft_mc
,
Qt0_mc
,
Qt
,
pp_corr_mc
,
ap_corr_mc
,
pp_corr_t_mc
,
ap_corr_t_mc
,
pp_corr_tfl_mc
,
ap_corr_tfl_mc
,
Sigma_mc
,
Sigma_cfl_mc
,
Sigma2_mc
,
Sigma2_cfl_mc
,
ChiDchi_mc
,
ChiDchi_cfl_mc
,
pphat_t_mc
,
pptilde_t_mc
,
pphat0_mc
,
pptilde0_mc
=
read_ff
(
file
)
Eoft0_mc
,
Eoft_mc
,
Qt0_mc
,
Qt
_mc
,
pp_corr_mc
,
ap_corr_mc
,
pp_corr_t_mc
,
ap_corr_t_mc
,
pp_corr_tfl_mc
,
ap_corr_tfl_mc
,
Sigma_mc
,
Sigma_cfl_mc
,
Sigma2_mc
,
Sigma2_cfl_mc
,
ChiDchi_mc
,
ChiDchi_cfl_mc
,
pphat_t_mc
,
pptilde_t_mc
,
pphat0_mc
,
pptilde0_mc
=
read_ff
(
file
)
runame
=
String
(
split
(
split
(
file
,
"/"
)[
end
],
"."
)[
1
])
T
=
size
(
pp_corr_mc
)[
2
]
Nsff
=
size
(
pp_corr_mc
)[
3
]
nsteps
=
size
(
pp_corr_t_mc
)[
4
]
-
1
Nsbf
=
size
(
pp_corr_tfl_mc
)[
3
]
Nfl
=
size
(
pp_corr_tfl_mc
)[
4
]
Nf
=
size
(
pp_corr_mc
)[
4
]
global
Eoft
=
[
uwreal
(
real
.
(
Eoft_mc
[
:
,
i
,
j
]),
runame
)
for
j
in
1
:
T
,
i
in
1
:
nsteps
+
1
]
global
Eoft0
=
[
uwreal
(
real
.
(
Eoft0_mc
[
:
,
j
]),
runame
)
for
j
in
1
:
T
]
global
Qt
=
[
uwreal
(
real
.
(
Qt_mc
[
:
,
i
,
j
]),
runame
)
for
j
in
1
:
T
,
i
in
1
:
nsteps
+
1
]
global
Qt0
=
[
uwreal
(
real
.
(
Qt0_mc
[
:
,
j
]),
runame
)
for
j
in
1
:
T
]
global
pp_corr
=
[
uwreal
(
sum
(
pp_corr_mc
,
dims
=
3
)[
:
,
i
,
1
,
f
]
./
Nsff
,
runame
)
for
i
in
1
:
T
,
for
f
in
1
:
Nf
]
global
ap_corr
=
[
uwreal
(
real
.
(
sum
(
ap_corr_mc
,
dims
=
3
)[
:
,
i
,
1
,
f
]
./
Nsff
),
runame
)
for
i
in
1
:
T
,
for
f
in
1
:
Nf
]
global
pphat0
=
[
uwreal
(
sum
(
pphat0_mc
,
dims
=
3
)[
:
,
i
,
1
,
f
]
./
Nsff
,
runame
)
for
i
in
1
:
T
,
for
f
in
1
:
Nf
]
global
pptilde0
=
[
uwreal
(
real
.
(
sum
(
pptilde0_mc
,
dims
=
3
)[
:
,
i
,
1
,
f
]
./
Nsff
),
runame
)
for
i
in
1
:
T
,
for
f
in
1
:
Nf
]
global
pp_corr
=
[
uwreal
(
sum
(
pp_corr_mc
,
dims
=
3
)[
:
,
i
,
1
,
f
]
./
Nsff
,
runame
)
for
i
in
1
:
T
,
for
f
in
1
:
Nf
]
global
ap_corr
=
[
uwreal
(
real
.
(
sum
(
ap_corr_mc
,
dims
=
3
)[
:
,
i
,
1
,
f
]
./
Nsff
),
runame
)
for
i
in
1
:
T
,
for
f
in
1
:
Nf
]
global
pp_corr_t
=
[
uwreal
(
sum
(
pp_corr_t_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
,
f
]
./
Nsff
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
nsteps
+
1
,
for
f
in
1
:
Nf
]
global
ap_corr_t
=
[
uwreal
(
real
.
(
sum
(
ap_corr_t_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
,
f
]
./
Nsff
),
runame
)
for
i
in
1
:
T
,
k
in
1
:
nsteps
+
1
,
for
f
in
1
:
Nf
]
global
pphat_t
=
[
uwreal
(
sum
(
pphat_t_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
,
f
]
./
Nsff
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
nsteps
+
1
,
for
f
in
1
:
Nf
]
global
pptilde_t
=
[
uwreal
(
real
.
(
sum
(
pptilde_t_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
,
f
]
./
Nsff
),
runame
)
for
i
in
1
:
T
,
k
in
1
:
nsteps
+
1
,
for
f
in
1
:
Nf
]
global
pp_corr_tfl
=
[
uwreal
(
sum
(
pp_corr_tfl_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
,
f
]
./
Nsbf
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
for
f
in
1
:
Nf
]
global
ap_corr_tfl
=
[
uwreal
(
real
.
(
sum
(
ap_corr_tfl_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
,
f
]
./
Nsbf
),
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
for
f
in
1
:
Nf
]
global
Sigma
=
[
uwreal
(
real
.
(
sum
(
Sigma_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
,
f
]
./
Nsbf
),
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
for
f
in
1
:
Nf
]
global
Sigma_cfl
=
[
uwreal
(
real
.
(
sum
(
Sigma_cfl_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
,
f
]
./
Nsbf
),
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
for
f
in
1
:
Nf
]
global
Sigma2
=
[
uwreal
(
real
.
(
sum
(
Sigma2_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
,
f
]
./
Nsbf
),
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
for
f
in
1
:
Nf
]
global
Sigma2_cfl
=
[
uwreal
(
real
.
(
sum
(
Sigma2_cfl_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
,
f
]
./
Nsbf
),
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
for
f
in
1
:
Nf
]
global
ChiDchi
=
[
uwreal
(
real
.
(
sum
(
ChiDchi_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
,
f
]
./
Nsbf
),
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
for
f
in
1
:
Nf
]
global
ChiDchi_cfl
=
[
uwreal
(
real
.
(
sum
(
ChiDchi_cfl_mc
,
dims
=
3
)[
:
,
i
,
1
,
k
,
f
]
./
Nsbf
),
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
for
f
in
1
:
Nf
]
T
=
size
(
pp_corr_mc
)[
1
]
Nsff
=
size
(
pp_corr_mc
)[
2
]
nsteps
=
size
(
pp_corr_t_mc
)[
3
]
-
1
Nsbf
=
size
(
pp_corr_tfl_mc
)[
2
]
Nfl
=
size
(
pp_corr_tfl_mc
)[
3
]
Nf
=
size
(
pp_corr_mc
)[
3
]
global
Eoft
=
[
uwreal
(
real
.
(
Eoft_mc
[
i
,
j
])
,
runame
)
for
j
in
1
:
T
,
i
in
1
:
nsteps
+
1
]
global
Eoft0
=
[
uwreal
(
real
.
(
Eoft0_mc
[
j
])
,
runame
)
for
j
in
1
:
T
]
global
Qt
=
[
uwreal
(
real
.
(
Qt_mc
[
i
,
j
])
,
runame
)
for
j
in
1
:
T
,
i
in
1
:
nsteps
+
1
]
global
Qt0
=
[
uwreal
(
real
.
(
Qt0_mc
[
j
])
,
runame
)
for
j
in
1
:
T
]
pp_corr_mc
=
sum
(
pp_corr_mc
,
dims
=
2
)[
:
,
1
,
:
]
./
Nsff
global
pp_corr
=
[
uwreal
(
pp_corr_mc
[
i
,
f
]
,
runame
)
for
i
in
1
:
T
,
f
in
1
:
Nf
]
ap_corr_mc
=
real
.
(
sum
(
ap_corr_mc
,
dims
=
2
)[
:
,
1
,
:
]
./
Nsff
)
global
ap_corr
=
[
uwreal
(
ap_corr_mc
[
i
,
f
]
,
runame
)
for
i
in
1
:
T
,
f
in
1
:
Nf
]
global
pphat0
=
[
uwreal
(
sum
(
pphat0_mc
,
dims
=
2
)[
i
,
1
,
f
]
./
Nsff
,
runame
)
for
i
in
1
:
T
,
f
in
1
:
Nf
]
global
pptilde0
=
[
uwreal
(
real
.
(
sum
(
pptilde0_mc
,
dims
=
2
)[
i
,
1
,
f
]
./
Nsff
)
,
runame
)
for
i
in
1
:
T
,
f
in
1
:
Nf
]
pp_corr_t_mc
=
sum
(
pp_corr_t_mc
,
dims
=
2
)[
:
,
1
,
:
,
:
]
./
Nsff
global
pp_corr_t
=
[
uwreal
(
pp_corr_t_mc
[
i
,
k
,
f
]
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
nsteps
+
1
,
f
in
1
:
Nf
]
ap_corr_t_mc
=
real
.
(
sum
(
ap_corr_t_mc
,
dims
=
2
)[
:
,
1
,
:
,
:
]
./
Nsff
)
global
ap_corr_t
=
[
uwreal
(
ap_corr_t_mc
[
i
,
k
,
f
]
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
nsteps
+
1
,
f
in
1
:
Nf
]
pphat_t_mc
=
sum
(
pphat_t_mc
,
dims
=
2
)[
:
,
1
,
:
,
:
]
./
Nsff
global
pphat_t
=
[
uwreal
(
pphat_t_mc
[
i
,
k
,
f
]
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
nsteps
+
1
,
f
in
1
:
Nf
]
pptilde_t_mc
=
real
.
(
sum
(
pptilde_t_mc
,
dims
=
2
)[
:
,
1
,
:
,
:
]
./
Nsff
)
global
pptilde_t
=
[
uwreal
(
pptilde_t_mc
[
i
,
k
,
f
]
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
nsteps
+
1
,
f
in
1
:
Nf
]
pp_corr_tfl_mc
=
sum
(
pp_corr_tfl_mc
,
dims
=
2
)[
:
,
1
,
:
,
:
]
./
Nsff
global
pp_corr_tfl
=
[
uwreal
(
pp_corr_tfl_mc
[
i
,
k
,
f
]
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
f
in
1
:
Nf
]
ap_corr_tfl_mc
=
real
.
(
sum
(
ap_corr_tfl_mc
,
dims
=
2
)[
:
,
1
,
:
,
:
]
./
Nsff
)
global
ap_corr_tfl
=
[
uwreal
(
ap_corr_tfl_mc
[
i
,
k
,
f
]
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
f
in
1
:
Nf
]
Sigma_mc
=
real
.
(
sum
(
Sigma_mc
,
dims
=
2
)[
:
,
1
,
:
,
:
]
./
Nsbf
)
global
Sigma
=
[
uwreal
(
Sigma_mc
[
i
,
k
,
f
]
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
f
in
1
:
Nf
]
Sigma_cfl_mc
=
real
.
(
sum
(
Sigma_cfl_mc
,
dims
=
2
)[
:
,
1
,
:
,
:
]
./
Nsbf
)
global
Sigma_cfl
=
[
uwreal
(
Sigma_cfl_mc
[
i
,
k
,
f
]
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
f
in
1
:
Nf
]
Sigma2_mc
=
real
.
(
sum
(
Sigma2_mc
,
dims
=
2
)[
:
,
1
,
:
,
:
]
./
Nsbf
)
global
Sigma2
=
[
uwreal
(
Sigma2_mc
[
i
,
k
,
f
]
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
f
in
1
:
Nf
]
Sigma2_cfl_mc
=
real
.
(
sum
(
Sigma2_cfl_mc
,
dims
=
2
)[
:
,
1
,
:
,
:
]
./
Nsbf
)
global
Sigma2_cfl
=
[
uwreal
(
Sigma2_cfl_mc
[
i
,
k
,
f
]
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
f
in
1
:
Nf
]
ChiDchi_mc
=
real
.
(
sum
(
ChiDchi_mc
,
dims
=
2
)[
:
,
1
,
:
,
:
]
./
Nsbf
)
global
ChiDchi
=
[
uwreal
(
ChiDchi_mc
[
i
,
k
,
f
]
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
f
in
1
:
Nf
]
ChiDchi_cfl_mc
=
real
.
(
sum
(
ChiDchi_cfl_mc
,
dims
=
2
)[
:
,
1
,
:
,
:
]
./
Nsbf
)
global
ChiDchi_cfl
=
[
uwreal
(
ChiDchi_cfl_mc
[
i
,
k
,
f
]
,
runame
)
for
i
in
1
:
T
,
k
in
1
:
Nfl
,
f
in
1
:
Nf
]
return
nothing
end
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