getPathToVec builds a series of 3 indices which can be followed using the levelDesc(lev)%neigh array to get the position of a neighboring element in the total list. Usage: given an element at coordinate [0,0,0] with position startPos in the total list, to reach the element at [1,1,1] we do: call getPathToVec([1,1,1], cxDir, path) pos = startPos do k = 1,3 pos = levelDesc(lev)%neigh%nghElems(path(k),pos) end do At the end of the loop pos will point to the requested element
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | vec(3) |
Vector we'd like to build the path to |
||
| integer, | intent(in) | :: | cxDir(:,:) |
Integer stencil direction |
||
| integer, | intent(out) | :: | path(3) |
Output path of iDirs |