Instead of explicitly creating `u_out` and assigning the projection you could have directly used the `Function` returned by `project` to write to file. I think that's more elegant and would also avoid the copy happening in `assign`.