Skip to contents

Creates a mapper for general fmesher function space objects.

Usage

bru_mapper_fmesher(mesh)

# S3 method for class 'bru_mapper_fmesher'
ibm_n(mapper, ...)

# S3 method for class 'bru_mapper_fmesher'
ibm_values(mapper, ...)

# S3 method for class 'bru_mapper_fmesher'
ibm_jacobian(mapper, input, ...)

Arguments

mesh

An fmesher object to map, supported by fmesher::fm_basis(mesh, input) and fmesher::fm_dof(mesh).

mapper

A mapper S3 object, inheriting from bru_mapper.

...

Arguments passed on to other methods

input

Data input for the mapper.

Value

A bru_mapper_fmesher object.

Details

For fmesher before version "0.2.0.9002", fmesher::fm_mesh_1d objects will be handed over to bru_mapper.fm_mesh_1d(), which handles NA inputs for older fmesher versions.

Examples

m <- bru_mapper_fmesher(fmesher::fmexample$mesh)
ibm_n(m)
#> [1] 279
ibm_eval(m, as.matrix(expand.grid(-2:2, -2:2)), seq_len(ibm_n(m)))
#>  [1] 250.74364  79.50113  56.07494  99.08437 272.10681 101.93314 138.22942
#>  [8] 126.04646 184.52763  62.06892 129.09019 139.32017 134.69889 104.56584
#> [15] 146.74441 144.17599 139.89904 164.80512 140.63623 195.96047 117.63412
#> [22] 178.67407 148.32454 169.81494 219.07025