This instance will be upgraded to Heptapod 0.31.0 (final) on 2022-05-24 at 14:00 UTC+2 (a few minutes of down time)

Commit 67474410 authored by Pierre Augier's avatar Pierre Augier
Browse files

Fix animate phys_fields

parent e27bea0abb52
Pipeline #20223 passed with stage
in 16 minutes and 22 seconds
"""
# 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
......
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment