Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: Curl, Gradi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 5600 of 6261
Post > Topic >>

Re: Curl, Gradient and Divergence

by "Kenneth P. Bowman" <k-bowman@[EMAIL PROTECTED] > Apr 4, 2008 at 08:33 AM

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
 




 2 Posts in Topic:
Curl, Gradient and Divergence
AleDiPappa@[EMAIL PROTECT  2008-04-04 03:49:32 
Re: Curl, Gradient and Divergence
"Kenneth P. Bowman&q  2008-04-04 08:33:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 20:56:47 CDT 2008.