Skip to contents

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

Usage

fm_tensor(x, ...)

Arguments

x

list of function space objects, such as fm_mesh_2d().

...

Currently unused

Value

A fm_tensor or fm_tensor_list object

See also

Examples

m <- fm_tensor(list(
  space = fmexample$mesh,
  time = fm_mesh_1d(1:5)
))
m2 <- fm_as_tensor(m)
m3 <- fm_as_tensor_list(list(m, m))
c(fm_dof(m$fun_spaces$space) * fm_dof(m$fun_spaces$time), fm_dof(m))
#> [1] 1490 1490
str(fm_evaluator(m, loc = list(space = cbind(0, 0), time = 2.5)))
#> List of 1
#>  $ proj:List of 2
#>   ..$ A :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
#>   .. .. ..@ i       : int [1:6] 0 0 0 0 0 0
#>   .. .. ..@ p       : int [1:1491] 0 0 0 0 0 0 0 0 0 0 ...
#>   .. .. ..@ Dim     : int [1:2] 1 1490
#>   .. .. ..@ Dimnames:List of 2
#>   .. .. .. ..$ : NULL
#>   .. .. .. ..$ : NULL
#>   .. .. ..@ x       : num [1:6] 0.2394 0.2112 0.0494 0.2394 0.2112 ...
#>   .. .. ..@ factors : list()
#>   ..$ ok: logi TRUE
#>  - attr(*, "class")= chr "fm_evaluator"