data.vtu (1.4 KB)

Above vtu file consists of four quad cells and contains a displacement u (vector) and pressure (scalar) field. Bilinear FE basis functions are used for interpolating the nodal values.

When I apply gradient filter to displacement field and probe it at points inside cell, the gradient components do not match with bilinear interpolation formula, however, the displacement matches. In FE-program, calculation is as follows:

u = N_i u_i ( i = 1,…,4 and N_i bilinear basis functions)

grad_u = grad(N_i) u_i

Example:

Point of evaluation (p) = -0.629564, 3.43459

u(p) = 0.385659, 22.127

(same as probing in paraview)

grad_u(p) = -0.621251, 0.0447329, 0.816307, 2.12841

(paraview = -0.546745, 0.0430582, 1.36277, 2.11613)

As you can see, the displacement at point p is correct and matches bilinear interpolation formula. However, the (in-plane) components of the gradient mismatch.

That said, is the gradient computation in paraview not based on the same interpolation functions as the ones used for interpolating the function itself?