Unsteady Stokes with PETSc

Hi,
I am still trying to solve an unsteady stokes equation (Stokes with time stepper - PETSc - #7 by rirane - the problem there got solved but now I have a problem with the time update) The right-hand side is updated in every time step. But the solution seems to “jump” between two states, so something seems to be wrong with the update of rhs. Does somebody know how to update it?

petsc-stokes.edp (1.8 KB)

Even with a single process, the solution is not correct after the first time step. You need to fix your discretization in time.

The time discretization wasn’t the problem.
The right-hand side was the problem.

petsc-stokes.edp (1.9 KB)

Well, the time discretization has a direct effect on the RHS… So if your RHS was wrong, it means that your time discretization was wrong indeed.