View source: R/flownet_finitedifferences.R
index_grid2vector | R Documentation |
Function takes a vectors of x and y node indices and returns the index (numbered row-wise)
index_grid2vector(ix, iy, nx, ny, i0 = 0, real_only = FALSE, ...)
ix, iy |
arrays with index of position in x and y directions |
nx |
number of real nodes in x and y directions |
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 |
array with node index for each node
#define grid nx <- 4 ny <- 3 #including ghost nodes i <- seq(nodes_total(nx, ny)) ixy <- index_vector2grid(i, nx, ny) index_grid2vector(ixy$ix, ixy$iy, nx, ny) #excluding ghost nodes i <- seq(nodes_total(nx, ny, real_only = TRUE)) ixy <- index_vector2grid(i, nx, ny, real_only = TRUE) index_grid2vector(ixy$ix, ixy$iy, nx, ny, real_only = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.