Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fluiddyn
fluidsim
Commits
9929ed42d316
Commit
67474410
authored
Apr 03, 2021
by
Pierre Augier
Browse files
Fix animate phys_fields
parent
e27bea0abb52
Pipeline
#20223
passed with stage
in 16 minutes and 22 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
doc/examples/milestone/run_simul.py
View file @
9929ed42
"""
# A simple MILESTONE simulation
Launch for example with:
```
python run_simul.py -nypc 20 -np 2
```
Notes for profiling:
https://github.com/benfred/py-spy
...
...
fluidsim/base/output/phys_fields2d.py
View file @
9929ed42
...
...
@@ -179,8 +179,6 @@ class MoviesBasePhysFields2D(MoviesBase2D):
)
field
=
field
[::
step
,
::
step
]
# tricky: https://stackoverflow.com/questions/29009743/using-set-array-with-pyplot-pcolormesh-ruins-figure
field
=
field
[:
-
1
,
:
-
1
]
# Update figure, quiver and colorbar
self
.
_im
.
set_array
(
field
.
flatten
())
...
...
@@ -301,8 +299,6 @@ class PhysFieldsBase2D(PhysFieldsBase):
uy
,
_
=
self
.
get_field_to_plot_from_state
(
"uy"
)
if
mpi
.
rank
==
0
:
field
=
field
[:
-
1
,
:
-
1
]
# Update figure, quiver and colorbar
self
.
movies
.
_im
.
set_array
(
field
.
flatten
())
if
self
.
_has_uxuy
:
...
...
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