Compute Q-criterion in Ascent and slice multiple times

I would like to compute Q-criterion and visualise it through multiple slices. Doing this in Ascent would require me to create a pipeline and a scene for each slice.

My current reading of the functionality is each pipeline would have to independently compute Q-criterion for each slice leading to a significant redundancy. Unless there’s a way to share one pipeline output (Q-criterion) with many downstream pipelines (slices).

Is there another way to?

My current approach below. I dislike it because of potential redundancy, but I am also forced to change the name of qcrit on different slices to avoid variable name repetition which is similar to this problem but I think harder to avoid. Please let me know if there’s a better way of doing it currently?

field-velocity = u, v, w

pipeline-qslice-xy = [{'type': 'qcriterion', 'field': 'velocity',
                        'output-name': 'qcrit', 'use-cell-gradient': 'false'},
                       {'type': 'slice',
                        'point': {'x': 0.0, 'y': 0.0, 'z': 0.0},
                        'normal': {'x': 0.0, 'y': 0.0, 'z': 1.0}}]

scene-qcrit-xy = {'type': 'pseudocolor', 'pipeline': 'qslice-xy',
                   'field': 'qcrit',
                   'render-1': {'image-width': 1024,
                                'image-name': 'qcrit-xy-{t:.4f}'}}

pipeline-qslice-yz = [{'type': 'qcriterion', 'field': 'velocity',
                        'output-name': 'qcrit2', 'use-cell-gradient': 'false'},
                       {'type': 'slice',
                        'point': {'x': 0.0, 'y': 0.0, 'z': 0.0},
                        'normal': {'x': 1.0, 'y': 0.0, 'z': 0.0}}]

scene-qcrit-yz = {'type': 'pseudocolor', 'pipeline': 'qslice-yz',
                   'field': 'qcrit2',
                   'render-1': {'image-width': 1024,
                                'image-name': 'qcrit-yz-{t:.4f}'}}

I thought I will be a bit clever and a bit not, by just computing q-criterion explicitly as a field as per @WillT suggestion here for vmag:

But when passing any gradient Ascent plugin:

field-qcrit = -0.5*(grad_u_x)
; that's what I thought I need to do: grad_u_x**2 + grad_v_y**2 + grad_w_z**2 + 2*grad_u_y*grad_v_x + 2*grad_u_z*grad_w_x + 2*grad_v_z*grad_w_y)

pipeline-qslice-xy = [{'type': 'slice', 'point': {'x': 0.0, 'y': 0.0, 'z': 0.0}, 'normal': {'x': 0.0, 'y': 0.0, 'z': 1.0}}]
scene-qcrit-xy = {'type': 'pseudocolor', 'pipeline': 'qslice-xy',
                   'field': 'qcrit',
                   'render-1': {'image-width': 1024, 'image-name': 'qcrit-xy-{t:.4f}'}}

I get an error!

  File "/gpfs/mcc/HT07881/uxq12/shared/venvs/pyfr-mpich-pmix/lib/python3.13/site-packages/pyfr/__main__.py", line 533, in _process_common
    solver = get_solver(backend, mesh, soln, cfg)
  File "/gpfs/mcc/HT07881/uxq12/shared/venvs/pyfr-mpich-pmix/lib/python3.13/site-packages/pyfr/solvers/__init__.py", line 14, in get_solver
    return get_integrator(backend, systemcls, mesh, initsoln, cfg)
  File "/gpfs/mcc/HT07881/uxq12/shared/venvs/pyfr-mpich-pmix/lib/python3.13/site-packages/pyfr/integrators/__init__.py", line 34, in get_integrator
    return integrator(backend, systemcls, mesh, initsoln, cfg)
  File "/gpfs/mcc/HT07881/uxq12/shared/venvs/pyfr-mpich-pmix/lib/python3.13/site-packages/pyfr/integrators/std/controllers.py", line 24, in __init__
    self._run_plugins()
    ~~~~~~~~~~~~~~~~~^^
  File "/gpfs/mcc/HT07881/uxq12/shared/venvs/pyfr-mpich-pmix/lib/python3.13/site-packages/pyfr/integrators/base.py", line 117, in _run_plugins
    plugin(self)
    ~~~~~~^^^^^^
  File "/gpfs/mcc/HT07881/uxq12/shared/venvs/pyfr-mpich-pmix/lib/python3.13/site-packages/pyfr/plugins/ascent.py", line 554, in __call__
    self._renderer.render(_IntegratorAdapter(intg, self.cfgsect))
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/gpfs/mcc/HT07881/uxq12/shared/venvs/pyfr-mpich-pmix/lib/python3.13/site-packages/pyfr/plugins/ascent.py", line 531, in render
    self._eval_exprs(adapter)
    ~~~~~~~~~~~~~~~~^^^^^^^^^
  File "/gpfs/mcc/HT07881/uxq12/shared/venvs/pyfr-mpich-pmix/lib/python3.13/site-packages/pyfr/plugins/ascent.py", line 493, in _eval_exprs
    grad_soln = soln_op @ grad_soln
                ~~~~~~~~^~~~~~~~~~~
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 4 dimensions. The detected shape was (2, 3, 1, 5) + inhomogeneous part.

I appreciate this is a different question, but are gradients supported in current PyFR Ascent plugin? This is all on mixed mesh.