In article
<833f085f-3c70-41c3-aa28-7a1927e44d0c@[EMAIL PROTECTED]
>,
AleDiPappa@[EMAIL PROTECTED]
wrote:
> I am new idl user and I would like to know if there is any easy way or
> direct function for computing the curl, gradient and divergence of
> vectorial fields.
>
> Regards
To my knowledge there are no general built-in routines to do this;
you need to roll your own. But, it is relatively easy to do by using
the ****FT operator, e.g., the gradient of a 2-D scalar field psi using
centered differences on a regular Cartesian grid is
grad_x = (****FT(psi, -1, 0) - ****FT(psi, 1, 0))/(2 * dx)
grad_y = (****FT(psi, 0, -1) - ****FT(psi, 0, 1))/(2 * dy)
Don't forget to clean up the boundaries.
Ken Bowman


|