I'm using FEniCS to solve a basic diffusion-over-time problem as a proof of concept. I am only using a single linear solver, but when I plot my function with pyplot, I get several multicolored lines, any one of which could represent the true function. How do I eliminate these and just see the one function?
Additionally I would note that over time, all of the function lines approach the same curve.
solve(a == L, u, bcs, solver_parameters=dict(linear_solver='gmres', preconditioner='ilu'))
plot(u)
Got it!
I was solving my PDE over time, with a for loop. I was telling the program to plot the solution every iteration. But telling it to show the solution only every five iterations. This resulted in it showing the past five solutions it had plotted all on top of one another.