Hi Onno, See below for answers. From: <firedrake-bounces@imperial.ac.uk> on behalf of Onno Bokhove <O.Bokhove@leeds.ac.uk> Date: Tuesday, 14 April 2020 at 18:45 To: firedrake <firedrake@imperial.ac.uk> Subject: [firedrake] demo update queries Dear Firedrakers, Some queries: (a1) I have been updating one of the tutorials by adapting the python script of the BL-demo; how can I test its page, and where do I submit it as candidate update? The demos are tested using the following command: py.test tests/demos/test_demos_run.py In order to contribute a new or modified demo (thanks!), you need to make a branch with your changes, push it to GitHub and make a pull request. You need push access to the Firedrake repository on GitHub, which I will give you if you email me your github username. (a2) In essence I updated the demo so that it has reduced output and reproduces the Figure 3 test of an associated publication, which figure I included as target for reproduction by any user, because then the user would know whether the outcome is right; also adding a small python script to visualise the energy (lower panel of Figure 3 attached). Since Figure 3a and 3b contain line plots at multiple times: rather than using an animation in Paraview: how can one with "Plot over line" keep multiple line plots at different time levels in one plot (since this would literally reproduce Figure 3a and 3b)? If you pass any of the plotting commands the keyword argument “axes=a” where “a” is a matplotlib axes object, then the plot will happen on those axes. This can be used to overplot. Also the old demo had some old expired links which I fixed. (b) Finally: with h_n0 = Function(V) on a 2D mesh, how can I find the maximum value on the mesh? This is in preparation for a potential flow test with a nonlinear, 8.4-fold amplification. I now use/added: ... from firedrake.petsc import PETS ... with h_n0.dat.vec_ro as hh: L_inf_err = hh.max()[1] ... but that seems a bit overkill? You do have to do this or the PyOP2 equivalent (using .dat.data_ro) because there isn’t in general a straightforward way of finding the maximum value of a Function from its DoFs. There is for DG0 and CG1, but in other cases the function maximum may not occur at a node. Cheers, David MPI next!?! Thank you and kind regards, Onno