Sunday, March 2, 2014

Del operator in approximation matrix form

Suppose you have a grid of values A, like here the t could be temperature over a surface...

I found this matrix that relates to the del operator in physics as follows:
For higher orders of del such as the Laplacian:
It is a recursive application of the first rule. 
where G is:
This G matrix could be in any number of dimensions, the positive and negative 1/2*delta terms would just surround the identity row through that higher dimensional matrix.

To see why the formula listed works see that A*G is:
See that for a small value of delta, this is an approximation for the gradient in the x direction, that the value of an interior cell is half the difference of the cell on the right and the cell on the left divided by the delta, unless the cell is on the left or right edge, in which case it treats the cell to the left or right respectively as 0.
Similarly G(transpose) *A is the gradient in the y direction.

So the sum of the two is the del operator or the sum of the gradient in the x and y direction of A.

No comments:

Post a Comment