function [u_x,u_y,u_z] = Grad3D(u)

% compute 3D gradient field of scalar u

Globals3D;

u_r = D_r * u; u_s = D_s * u; u_t = D_t * u;

u_x = u_r .* r_x + u_s .* s_x + u_t .* t_x;
u_y = u_r .* r_y + u_s .* s_y + u_t .* t_y;
u_z = u_r .* r_z + u_s .* s_z + u_t .* t_z;

end