next up previous contents index
Next: Timing: timer_, timer_print Up: Useful Functions for Developers Previous: Return Vertex Coordinates for   Contents   Index


Find Corner Indices of List of Cells: to_corners3

Calling Sequence
...

  
to_corners3(list, nj, nk)

Description
Convert an array of cell indices in an (ni-1)-by-(NJ-1)-by-(NK-1) logically rectangular grid of cells into the array of len(LIST)-by-2-by-2-by-2 cell corner indices in the corresponding ni-by-NJ-by-NK array of vertices. The algorithm used is described in section ``More slice3 details''. Note that this computation in Yorick gives an absolute offset for each cell quantity in the grid. In Yorick it is legal to index a multidimensional array with an absolute offset. In Python it is not. However, an array can be flattened if necessary.

Other changes from Yorick were necessitated by row-major order and 0-origin indices, and of course the lack of Yorick array facilities.



Michiel Jan Laurens de Hoon 2003-04-19