Hi everyone,
I’m using macOS Mojave (10.14.6), miniconda, and FEniCS 2018 with Python.
I’m solving the wave equation (which does not matter here, it can be an arbitrary time-dependent PDE). This works, everything is fine. But I want to save the solution for every time-step in a variable, or something else, such that I can use it later and pass it to other subroutines. The TimeSeries won’t work here for me, so I tried to save it in a Python list as follows:
solution = []
compute solution y0 for time t = 0
solution(append(y0))
compute solution y1 for time t += dt
solution.append(y1)
loop over each time-step:
compute new solution y
solution.append(y)
But somehow this won’t work and I don’t know why. So is there a better way to store the solution of a time-dependent PDE?