[ANN] Trixi.jl v0.3: SciML integration and a new modular approach for easy extension

Depends on what you mean by that (since DG solutions are discontinuous across interfaces). If you just want the local gradients without neighbor coupling, you could write something like

mesh, equations, solver, cache = Trixi.mesh_equations_solver_cache(semi)
derivative_matrix = dg.basis.derivative_matrix
du_dx .= 0
for element in eachelement(dg, cache)
  jacobian_factor = cache.elements.inverse_jacobian[element]
  for j in eachnode(dg), i in eachnode(dg)
    # x derivative
    for ii in eachnode(dg)
      u_node = get_node_vars(u, equations, dg, ii, j, element)
      multiply_add_to_node_vars!(du_dx, jacobian_factor * derivative_matrix[i, ii], u_node, equations, dg, i, j, element)

    # same in y

Note that this uses internal API extensively and I didn’t test it. See

for similar stuff.

Thx! Food for thought.