View source: R/flownet_finitedifferences.R
index_offset | R Documentation |
Find indices of neighbouring nodes in a rectangular grid with or without ghost nodes. Nodes are numbered row-wise. Function assumes that these nodes exist, e.g. no check is conducted to see if this is so...
index_offset(i, nx, ny, dix = 0, diy = 0, i0 = 0, real_only = FALSE, ...)
i |
array with node indices |
nx |
number of real nodes in x and y directions |
ny |
number of real nodes in x and y directions |
dix, diy |
index offsets 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 of indices of neightbouring nodes
nx <- 4 ny <- 3 i <- c(1, 11, 20) index_offset(i, nx, ny, dix = 1) index_offset(i, nx, ny, diy = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.