View source: R/flownet_finitedifferences.R
index_edge | R Documentation |
Get an array of the indices of nodes near an edge of a rectangular grid. For node numbering, see function 'findiff_sparse_elements()'.
index_edge(nx, ny, edge, real_only = FALSE, i0 = 0, offset = 0, ...)
nx, ny |
number of real nodes in x and y-direction |
edge |
edge number, numbered clockwise. '1' for left (negative x-face), '2' for top (positive y-face), '3' for right (positive x-face) and '4' for bottom (negative y-face) |
real_only |
if 'TRUE', only real nodes are numbered. if 'FALSE', all ghost nodes are included in the numbering as well |
i0 |
node starting number (index of first node minus 1) |
offset |
row (in case 'edge = 2' or 'edge = 4', or column (in case 'edge = 1' or 'edge = 3') offset from edge |
... |
additional optional arguments |
array of indices of ghost nodes on selected edge
#real nodes + ghost nodes index_edge(4, 3, 1) index_edge(4, 3, 2, offset = 1) #real nodes only index_edge(4, 3, 1, real_only = TRUE) index_edge(4, 3, 2, offset = 1, real_only = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.