Skip to contents

Create a fm_mesh_1d object.

Usage

fm_mesh_1d(
  loc,
  interval = range(loc),
  boundary = NULL,
  degree = 1,
  free.clamped = FALSE,
  ...
)

Arguments

loc

B-spline knot locations.

interval

Interval domain endpoints.

boundary

Boundary condition specification. Valid conditions are c('neumann', 'dirichlet', 'free', 'cyclic'). Two separate values can be specified, one applied to each endpoint.

degree

The B-spline basis degree. Supported values are 0, 1, and 2.

free.clamped

If TRUE, for 'free' boundaries, clamp the basis functions to the interval endpoints.

...

Additional options, currently unused.

Value

An fm_mesh_1d object

See also

Author

Finn Lindgren finn.lindgren@gmail.com

Examples

if (require("ggplot2")) {
  m <- fm_mesh_1d(c(1, 2, 3, 5, 8, 10),
    boundary = c("neumann", "free"),
    degree = 2
  )
  ggplot() +
    geom_fm(data = m, xlim = c(0.5, 10.5))
}