Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fluidsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
This instance will be upgraded to Heptapod 17.11.0rc1 on 2025-04-24 between 17:00 and 18:00 UTC+2
Show more breadcrumbs
fluiddyn
fluidsim
Commits
8075c7b0
Commit
8075c7b0
authored
9 years ago
by
Cyrille Bonamy
Browse files
Options
Downloads
Patches
Plain Diff
plot_corr2_1d dev (plate2d solver)
parent
02fb60c8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fluidsim/solvers/plate2d/output/correlations_freq.py
+32
-14
32 additions, 14 deletions
fluidsim/solvers/plate2d/output/correlations_freq.py
with
32 additions
and
14 deletions
fluidsim/solvers/plate2d/output/correlations_freq.py
+
32
−
14
View file @
8075c7b0
...
...
@@ -187,7 +187,7 @@
def
init_online_plot
(
self
):
fig
,
axe
=
self
.
output
.
figure_axe
(
numfig
=
4100000
)
self
.
axe
=
axe
axe
.
set_xlabel
(
'
Frequency
'
)
axe
.
set_xlabel
(
'
Omega
'
)
axe
.
set_ylabel
(
'
Correlations
'
)
axe
.
set_title
(
'
Correlation, solver
'
+
self
.
output
.
name_solver
+
'
, nh = {0:5d}
'
.
format
(
self
.
params
.
oper
.
nx
))
...
...
@@ -215,7 +215,7 @@
fig
,
axe
=
self
.
output
.
figure_axe
(
numfig
=
4100000
)
self
.
axe
=
axe
axe
.
set_xlabel
(
'
Frequency
'
)
axe
.
set_xlabel
(
'
Omega
'
)
axe
.
set_xlabel
(
'
Correlation
'
)
axe
.
plot
(
corr2
[:,
:],
'
k.
'
)
# axe.set_title('Correlation, solver '+self.output.name_solver +
...
...
@@ -223,11 +223,11 @@
axe
.
hold
(
True
)
fig
,
ax
=
self
.
output
.
figure_axe
(
numfig
=
2333
)
self
.
ax
=
ax
ax
.
set_xlabel
(
'
Frequency
'
)
ax
.
set_ylabel
(
'
Frequency
'
)
ax
.
set_xlabel
(
'
Omega
'
)
ax
.
set_ylabel
(
'
Omega
'
)
pc
=
ax
.
pcolormesh
(
fx
,
fy
,
abs
(
corr
[
4
,
:,
:]))
fig
.
colorbar
(
pc
)
ax
.
hold
(
True
)
fig1
,
ax1
=
self
.
output
.
figure_axe
(
numfig
=
2334
)
self
.
ax1
=
ax1
...
...
@@ -228,11 +228,11 @@
pc
=
ax
.
pcolormesh
(
fx
,
fy
,
abs
(
corr
[
4
,
:,
:]))
fig
.
colorbar
(
pc
)
ax
.
hold
(
True
)
fig1
,
ax1
=
self
.
output
.
figure_axe
(
numfig
=
2334
)
self
.
ax1
=
ax1
ax1
.
set_xlabel
(
'
Frequency
'
)
ax1
.
set_ylabel
(
'
Frequency
'
)
ax1
.
set_xlabel
(
'
Omega
'
)
ax1
.
set_ylabel
(
'
Omega
'
)
pc1
=
ax1
.
pcolormesh
(
fx
,
fy
,
corr
[
3
,
:,
:])
fig1
.
colorbar
(
pc1
)
ax1
.
hold
(
True
)
...
...
@@ -459,10 +459,10 @@
ax
=
plt
.
gca
()
ax
.
set_title
(
'
log10(abs(corr2)); nb_means:
'
+
str
(
self
.
nb_means_times
))
plt
.
xlabel
(
'
Frequency
'
)
plt
.
ylabel
(
'
Frequency
'
)
plt
.
xlabel
(
'
Omega
'
)
plt
.
ylabel
(
'
Omega
'
)
plt
.
pcolormesh
(
fx
,
fy
,
log10corr2
,
vmin
=
log10corr2
.
min
(),
vmax
=
log10corr2
.
max
())
plt
.
colorbar
()
plt
.
axis
([
fx
.
min
(),
fx
.
max
(),
fy
.
min
(),
fy
.
max
()])
...
...
@@ -464,8 +464,26 @@
plt
.
pcolormesh
(
fx
,
fy
,
log10corr2
,
vmin
=
log10corr2
.
min
(),
vmax
=
log10corr2
.
max
())
plt
.
colorbar
()
plt
.
axis
([
fx
.
min
(),
fx
.
max
(),
fy
.
min
(),
fy
.
max
()])
def
plot_corr2_1d
(
self
):
with
h5py
.
File
(
self
.
path_file
,
'
r
'
)
as
f
:
corr2_in_file
=
f
[
'
corr2
'
]
corr2
=
corr2_in_file
[
-
1
]
corr2_diag
=
np
.
empty
(
self
.
nb_omegas
,
dtype
=
np
.
complex128
)
for
io3
in
range
(
self
.
nb_omegas
):
corr2_diag
[
io3
]
=
corr2
[
io3
,
io3
]
fig
=
plt
.
figure
(
num
=
18
)
fig
.
clf
()
ax
=
plt
.
gca
()
ax
.
set_title
(
'
abs(corr2_diag); nb_means:
'
+
str
(
self
.
nb_means_times
))
plt
.
xlabel
(
'
Omega
'
)
plt
.
ylabel
(
'
abs(corr2)
'
)
ax
.
loglog
(
self
.
omegas
,
abs
(
corr2_diag
))
def
plot_corr4
(
self
):
nb_omegas1
=
self
.
iomegas1
.
shape
[
0
]
...
...
@@ -486,8 +504,8 @@
nb_subplot_horiz
=
int
(
round
(
nb_omegas1
/
nb_subplot_vert
))
for
i1
,
io1
in
enumerate
(
self
.
iomegas1
):
plt
.
subplot
(
nb_subplot_vert
,
nb_subplot_horiz
,
i1
+
1
)
plt
.
xlabel
(
'
Frequency
'
)
plt
.
ylabel
(
'
Frequency
'
)
plt
.
xlabel
(
'
Omega
'
)
plt
.
ylabel
(
'
Omega
'
)
plt
.
pcolormesh
(
fx
,
fy
,
np
.
log10
(
abs
(
corr_norm
[
i1
,
:,
:])),
vmin
=
np
.
log10
(
abs
(
corr_norm
.
min
())),
vmax
=
np
.
log10
(
abs
(
corr_norm
.
max
())))
...
...
@@ -500,8 +518,8 @@
str
(
self
.
nb_means_times
))
for
i1
,
io1
in
enumerate
(
self
.
iomegas1
):
plt
.
subplot
(
nb_subplot_vert
,
nb_subplot_horiz
,
i1
+
1
)
plt
.
xlabel
(
'
Frequency
'
)
plt
.
ylabel
(
'
Frequency
'
)
plt
.
xlabel
(
'
Omega
'
)
plt
.
ylabel
(
'
Omega
'
)
plt
.
pcolormesh
(
fx
,
fy
,
np
.
log10
(
abs
(
cum_norm
[
i1
,
:,
:])),
vmin
=
np
.
log10
(
abs
(
cum_norm
.
min
())),
vmax
=
np
.
log10
(
abs
(
cum_norm
.
max
())))
...
...
@@ -514,8 +532,8 @@
str
(
self
.
nb_means_times
))
for
i1
,
io1
in
enumerate
(
self
.
iomegas1
):
plt
.
subplot
(
nb_subplot_vert
,
nb_subplot_horiz
,
i1
+
1
)
plt
.
xlabel
(
'
Frequency
'
)
plt
.
ylabel
(
'
Frequency
'
)
plt
.
xlabel
(
'
Omega
'
)
plt
.
ylabel
(
'
Omega
'
)
plt
.
pcolormesh
(
fx
,
fy
,
np
.
log10
(
abs
(
norm
[
i1
,
:,
:])),
vmin
=
np
.
log10
(
abs
(
norm
.
min
())),
vmax
=
np
.
log10
(
abs
(
norm
.
max
())))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment