[Gradient w.r.t MeshFunction]

An oversight perhaps is using a DG space V^p_\text{DG} of degree p=0. Naturally the broken gradient operator defined on a mesh \mathcal{T}_h = \{\kappa\} is \nabla_h := \nabla|_{\kappa \in \mathcal{T}_h} when applied to a function \nabla_h u_h(x) = 0, \forall u_h \in V^0_\text{DG}. So the trick would be to decide how to interpolate your piecewise constant data to something which varies intra-cell. Or choose some other method for interpolation/projection of your cell-wise data which varies whilst conforming with continuity inter-cell.

1 Like