function gu = pressure_exact_grad(R,k,x) % % function gu = pressure_exact_grad(R,k,x) % % This function computes the gradient of the exact pressure field % for the problem where a point source is at the centre of a circle and the pressure % satisfies the boundary condition that it is zero (equation (2.31) in the notes). % % On entry: % % R is the radius of the circle % k is the wavenumber % x is a 2x1 vector, the position vector of the point at which the % radial derivative is required % % On exit: % % gu is the gradient of the pressure at x % rhat = x/norm(x); % make a unit vector in the radial direction gu = pressure_exact_dr(R,k,x)*rhat;