Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fluiddyn
fluidsim
Commits
c5069a3a63fd
Commit
c8fc77e3
authored
Mar 08, 2021
by
Jason Reneuve
Browse files
fix dimensions pairing
parent
cb73749f191c
Changes
1
Hide whitespace changes
Inline
Side-by-side
fluidsim/base/output/spatiotemporal_spectra.py
View file @
c5069a3a
...
@@ -123,7 +123,7 @@ class SpatioTemporalSpectra(SpecificOutput):
...
@@ -123,7 +123,7 @@ class SpatioTemporalSpectra(SpecificOutput):
ikzmax
=
int
(
ikzmax
)
ikzmax
=
int
(
ikzmax
)
# dimensions order in Fourier space
# dimensions order in Fourier space
self
.
dims_order
=
oper
.
oper_fft
.
get_dimX_K
()
self
.
dims_order
=
np
.
array
(
oper
.
oper_fft
.
get_dimX_K
()
)
# data directory
# data directory
if
mpi
.
rank
==
0
:
if
mpi
.
rank
==
0
:
...
@@ -178,11 +178,10 @@ class SpatioTemporalSpectra(SpecificOutput):
...
@@ -178,11 +178,10 @@ class SpatioTemporalSpectra(SpecificOutput):
else
:
else
:
# no files were found : initialize from params
# no files were found : initialize from params
# pair kx,ky,kz with k0,k1,k2
# pair kx,ky,kz with k0,k1,k2
order
=
np
.
array
(
self
.
dims_order
)
iksmax
=
np
.
array
([
ikzmax
,
ikymax
,
ikxmax
])
iksmax
=
np
.
array
([
ikzmax
,
ikymax
,
ikxmax
])
iksmin
=
np
.
array
([
1
-
ikzmax
,
1
-
ikymax
,
0
])
iksmin
=
np
.
array
([
1
-
ikzmax
,
1
-
ikymax
,
0
])
ik0max
,
ik1max
,
ik2max
=
[
iksmax
[
order
==
j
].
item
()
for
j
in
range
(
3
)
]
ik0max
,
ik1max
,
ik2max
=
iksmax
[
self
.
dims_order
]
ik0min
,
ik1min
,
ik2min
=
[
iksmin
[
order
==
j
].
item
()
for
j
in
range
(
3
)
]
ik0min
,
ik1min
,
ik2min
=
iksmin
[
self
.
dims_order
]
# local probes indices
# local probes indices
k0_adim_loc
,
k1_adim_loc
,
k2_adim_loc
=
oper
.
oper_fft
.
get_k_adim_loc
()
k0_adim_loc
,
k1_adim_loc
,
k2_adim_loc
=
oper
.
oper_fft
.
get_k_adim_loc
()
...
@@ -345,8 +344,8 @@ class SpatioTemporalSpectra(SpecificOutput):
...
@@ -345,8 +344,8 @@ class SpatioTemporalSpectra(SpecificOutput):
ikzmin
=
1
-
ikzmax
ikzmin
=
1
-
ikzmax
iksmax
=
np
.
array
([
ikzmax
,
ikymax
,
ikxmax
])
iksmax
=
np
.
array
([
ikzmax
,
ikymax
,
ikxmax
])
iksmin
=
np
.
array
([
1
-
ikzmax
,
1
-
ikymax
,
0
])
iksmin
=
np
.
array
([
1
-
ikzmax
,
1
-
ikymax
,
0
])
ik0max
,
ik1max
,
ik2max
=
[
iksmax
[
order
==
j
].
item
()
for
j
in
range
(
3
)
]
ik0max
,
ik1max
,
ik2max
=
iksmax
[
order
]
ik0min
,
ik1min
,
ik2min
=
[
iksmin
[
order
==
j
].
item
()
for
j
in
range
(
3
)
]
ik0min
,
ik1min
,
ik2min
=
iksmin
[
order
]
spect_shape
=
(
spect_shape
=
(
ik0max
+
1
-
ik0min
,
ik0max
+
1
-
ik0min
,
ik1max
+
1
-
ik1min
,
ik1max
+
1
-
ik1min
,
...
...
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