View source: R/flownet_finitedifferences.R
index_vector2grid | R Documentation |
Function takes a vector of node indices (numbered row-wise) and returns a list of their x and y indices.
index_vector2grid(i, nx, ny, i0 = 0, real_only = FALSE, ...)
i |
array with node indices |
nx, ny |
number of real nodes in x and y directions |
i0 |
node index offset |
real_only |
if 'TRUE', only real nodes are numbered and ghost nodes are ignored in numbering |
... |
additional arguments to pass |
a list with two fields: 'ix' and 'iy' with indices in x and y directions
#convert to grid positions nx <- 4 ny <- 3 i <- seq(1, (nx + 2)*(ny + 2) - 4) index_vector2grid(i, nx, ny)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.