kinnala / scikit-fem

Simple finite element assemblers
https://scikit-fem.readthedocs.io
BSD 3-Clause "New" or "Revised" License
512 stars 81 forks source link

skfem.ivp #531

Closed gdmcbain closed 3 years ago

gdmcbain commented 3 years ago

From #529 at 2020-12-24:

Note that we don't have any helper functions for time integration yet. That would be a welcome improvement though, e.g., skfem.ivp or something.

nikosmatsa commented 3 years ago

`if name == 'main':

import matplotlib.pyplot as plt
from skfem.visuals.matplotlib import plot3, show 

def update(event):
    t, u = event

for t, u in evolve(0.0, u_init):
    plot3(m,u)
    plt.show() `

plots me all the graphs but I want only the last one

gdmcbain commented 3 years ago

Try moving the plotting outside the for-loop:

for t, u in evolve(0.0, u_init):
    pass

plot3(m,u)
plt.show()
gdmcbain commented 3 years ago

Oh, I don't think you want plt.show since you've already imported show from skfem.visuals.matplotlib, so just

show()
nikosmatsa commented 3 years ago

close the issue.thnka for everything.you are awesome