Strange behaviour of grad(gfu_potential)


I try to take the gradient of a scalar field. When looking at the result with ParaView i see very strange Glyphs.
See the attached picture. I can’t figure out where I made a mistake?

With best regards,



i noticed the same strange behavior when i want to visualize the global load vector (rhs) as a GridFunction in Paraview.

Has somebody found a solution yet ?

Best regards

When u is an order 1 H1 function, its gradient is piecewise constant, but not continuous, so you get different gradients from different elements. I think that explains the picture from your first post.

As for visualizing the rhs, did you just copy the vector into a gridfunction? That does not work, the right hand side is a dual vector, not a FEM function.