Moved the P1 FunctionSpace instantiation outside of the time-stepping loop.