Skip to contents

[Experimental] Collection function spaces. The interface and object storage model is experimental and may change.

Usage

fm_collect(x, ...)

Arguments

x

list of function space objects, such as fm_mesh_2d(), all of the same type.

...

Currently unused

Value

A fm_collect or fm_collect_list object. Elements of fm_collect:

fun_spaces

fm_list of function space objects

manifold

character; manifold type summary, obtained from the function spaces.

Examples

m <- fm_collect(list(
  A = fmexample$mesh,
  B = fmexample$mesh
))
m2 <- fm_as_collect(m)
m3 <- fm_as_collect_list(list(m, m))
c(fm_dof(m$fun_spaces[[1]]) + fm_dof(m$fun_spaces[[2]]), fm_dof(m))
#> [1] 558 558
fm_basis(m, loc = tibble::tibble(
  loc = fmexample$loc_sf,
  index = c(1, 1, 2, 2, 1, 2, 2, 1, 1, 2)
), full = TRUE)
#> fm_basis object
#>   Projection matrix (A): 10-by-558
#>   Valid evaluations (ok): 10 out of 10
#>   Additional information: 
fm_basis(m, loc = tibble::tibble(
  loc = rbind(c(0, 0), c(0.1, 0.1)),
  index = c("B", "A")
), full = TRUE)
#> fm_basis object
#>   Projection matrix (A): 2-by-558
#>   Valid evaluations (ok): 2 out of 2
#>   Additional information: 
fm_evaluator(m, loc = tibble::tibble(loc = cbind(0, 0), index = 2))
#> fm_evaluator object
#>   proj:
#>     fm_basis object
#>       Projection matrix (A): 1-by-558
#>       Valid evaluations (ok): 1 out of 1
#>       Additional information: 
#>   Additional evaluator information: 
names(fm_fem(m))
#> [1] "cc" "c0" "c1" "va" "ta" "g1" "g2"
fm_diameter(m)
#>        A        B 
#> 10.54218 10.54218