AMRKDTree.
locate_neighbors_from_position
(position)[source]¶Given a position, finds the 26 neighbor grids and cell indices.
This is a mostly a wrapper for locate_neighbors.
Parameters: | position: array-like :
|
---|---|
Returns: | grids: Numpy array of Grid objects : cis: List of neighbor cell index tuples : Both of these are neighbors that, relative to the current cell : index (i,j,k), are ordered as: : (i-1, j-1, k-1), (i-1, j-1, k ), (i-1, j-1, k+1), ... : (i-1, j , k-1), (i-1, j , k ), (i-1, j , k+1), ... : (i+1, j+1, k-1), (i-1, j-1, k ), (i+1, j+1, k+1) : That is they start from the lower left and proceed to upper : right varying the third index most frequently. Note that the : center cell (i,j,k) is ommitted. : |