Skip to contents

Creates a mapper for general fmesher function space objects.

Usage

bm_fmesher(mesh)

bru_mapper_fmesher(...)

# S3 method for class 'fm_mesh_2d'
bru_mapper(mesh, ...)

Arguments

mesh

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

...

Arguments passed on to bm_fmesher()

Value

A bm_fmesher object.

Details

Handles indexed mapping for all fmesher classes that support fm_dof() and fm_basis() methods. For non-indexed mapping of fm_mesh_1d objects, use bru_mapper(mesh, indexed = FALSE) which invokes the bru_mapper.fm_mesh_1d() method.

Functions

  • bru_mapper(fm_mesh_2d): Equivalent to calling bm_fmesher(). Note: Prior to version 2.12.0.9021, this returned a bru_mapper_fm_mesh_2d object. Also see the note for bru_mapper.fm_mesh_1d().

Examples

m <- bm_fmesher(fmesher::fmexample$mesh)
ibm_n(m)
#> [1] 292
ibm_eval(m, as.matrix(expand.grid(-2:2, -2:2)), seq_len(ibm_n(m)))
#>  [1] 266.64363 113.59173  56.61537 106.69945 256.01042 136.21372 150.83769
#>  [8] 152.68096 178.13683  59.93549 131.57928 163.75497 152.42684 182.22284
#> [15] 163.25104 149.28159 182.92309 137.14656 152.31003 276.18942 102.82566
#> [22] 134.25713 112.48311 112.19143 221.34490