grad(f(i,j,k)) = (Where:(f(i+1,j ,k )-f(i-1,j ,k ))/delx, (f(i ,j+1,k )-f(i ,j-1,k ))/dely, (f(i ,j ,k+1)-f(i ,j ,k-1))/delz)
For a two dimensional lattice f, the two component vector field is:delx = x(i+1)-x(i-1) dely = y(j+1)-y(j-1) delz = z(k+1)-z(k-1)
grad(f(i,j)) = ((f(i+1,j )-f(i-1,j ))/delx, (f(i ,j+1)-f(i ,j-1))/dely)
At the lower (i=imin or j=jmin or k=kmin) boundaries of the lattice, a forward difference is used in the component on the boundary:
grad(imin,j,k) = ((f(imin+1,j ,k )-f(imin,j ,k ))/delx, (f(imin ,j+1,k )-f(imin,j ,k ))/dely, (f(imin ,j ,k+1)=f(imin,j ,k ))/delz)
Similarly, at the upper boundaries (i=imax or j=jmax or k=kmax) a backward difference is used for the component on the boundary. The results can be converted into geometry by VectorGen for display in the Render module. The Scale parameter is used to scale the vector values at each node of the lattice. The Channel slider is used to select the desired component if the input lattice is a vector field.
This module has been replaced by GradientLat, which offers more functionality, but is retained for backwards compatibility. The module may be removed from future releases.
Port: Input Field
Type: Lattice
Constraints: 2..3-D.
uniform.
The input lattice
Port: Scale
Type: Dial
A scale factor
Port: Channel
Type: Slider
The vector component if the Input Field is a vector lattice. This is zero-
based.
Port: Gradient
Type: Lattice
Constraints: 2..3-D.
2..3-vector.
float.
uniform.