UCLA Mathematics : Math 270E
void getStreamFcnAndStaggeredVelocity(double hx, double hy, DoubleArray2D& Omega, DoubleArray2D& Psi, DoubleArray2D& U, DoubleArray2D& V)
Computes the stream function and staggered grid velocity from a given vorticity distribution
Documentation
Computes the stream function and staggered grid velocity from a given vorticity distribution. The computation assumes that the values of the vorticity are associated with a uniform rectangular grid that has mPanel panels in the x direction and nPanel panels in the y direction.
The stream function is computed at the nodes of grid, while the velocity field is computed at the edges of cells associated with the grid.
The input and output DoubleArray2D arguments must be constructed externally and be of the appropriate size.
Note!!! The arrays for the U and the V velocity are different sizes; a consequence of the staggered grid velocity arrangement.
Header: StaggeredGridUtilities.h
Source: StaggeredGridUtilities.cpp