# Discretizing gradient in upwind differencing, hamilton-jacobi equation

In the presentation here about Level set methods

http://www.cs.au.dk/~bang/smokeandwater2006/Lecture9_IntroToWaterAndLS.ppt

the author constructs a linear PDE

$\frac{\partial \phi}{\partial t} + \triangledown \phi \cdot V = 0$

In order to solve this numerically, first the author uses forward Euler time step for discretization. Then, he "discretizes the gradient" and mentions various choices for this, one of which being

$\frac{\phi_i - \phi^n_{i-1}}{\Delta t} = 1$

Other choices he mentions are discretizations equaling 0, or 0.5. I do not understand how these values, 1, 0, 0.5 are chosen.

I know gradient is a vector calculated using partial derivatives, at a specific point x_0, y_0, .. which can also result in a scalar if we want to calculate them for a certain direction, then we take a dot product. It does not make any sense to me discretization of a gradient can automatically be made equal to a specific value.

Any ideas?

-

On slide 21, the author picks a concrete example with concrete values of the potential function at certain grid points, the "magical numbers" on slide 22 come from there (the values -0.5 and 0.5 are the prescribed values of the potential function at the nodes). The three standard ways of discretization correspond to the forward, backward and central difference approximation to the differential. For every difference approximation, you can calculate the number for the potential function $\phi$ at node $j$ from the prescribed values from slide 21.