nodal_coordinates_real_rectangular: Get coordinates of all real nodes in the finite difference...

View source: R/flownet_rectangular.R

nodal_coordinates_real_rectangularR Documentation

Get coordinates of all real nodes in the finite difference grid

Description

Function obtains the x,y positions of all real nodes in a rectangular finite difference grid

Usage

nodal_coordinates_real_rectangular(
  nx,
  ny,
  x0 = 0,
  y0 = 0,
  x1 = 1,
  y1 = 1,
  domain = NULL,
  ...
)

Arguments

nx, ny

number of real nodes on the grid

x0, x1, y0, y1

x and y-positions of domain edges

domain

array with domain identifiers

...

additional named arguments to pass to function

Value

a tibble with fields 'x' and 'y' for positions, and 'id' to indicate which grid the point belongs to

Examples

df <- nodal_coordinates_real_rectangular(
  nx = c(4, 5),
  ny = c(3, 4),
  x0 = c(0, 4),
  y0 = c(0, 4),
  x1 = c(2, 7),
  y1 = c(3, 5)
)
plot(df$x, df$y, "b")

GJMeijer/soilmech documentation built on May 22, 2022, 10:39 a.m.