[x] Vast majority of effort in the bubble shear demo goes into interpolating velocity u.interpolate(velocity_expression(mesh, t))
The reason is that t in velocity_expression is hardcoded as a float so a lot of time is spent recompiling it. Instead, it should be wrapped in Constant (or Function of R). This made it much faster.
Doing u.dat.data[:] = u_numpy, where u_numpy is the velocity computed with numpy also works and is actually faster than the above, but it's not very firedrake-y, so I went with the above method
[x] The first computed metric in metric advection should be normalised I think
[x] Wrong description in Line 416
[x] Mention explicit timestepping and CFL condition in the exercise rubric
[ ] Recompute initial condition on the first adapted mesh, rather than projecting the one computed on the uniform mesh. This may actually give a slightly higher error in the end - put it in the exercise rubric?
u.interpolate(velocity_expression(mesh, t))
t
invelocity_expression
is hardcoded as afloat
so a lot of time is spent recompiling it. Instead, it should be wrapped inConstant
(orFunction
of R). This made it much faster.u.dat.data[:] = u_numpy
, whereu_numpy
is the velocity computed withnumpy
also works and is actually faster than the above, but it's not very firedrake-y, so I went with the above method