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
fmesherobject to map, supported by fmesher::fm_basis(mesh, input)and fmesher::fm_dof(mesh).- ...
Arguments passed on to
bm_fmesher()
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 callingbm_fmesher(). Note: Prior to version2.12.0.9021, this returned abru_mapper_fm_mesh_2dobject. Also see the note forbru_mapper.fm_mesh_1d().
See also
bru_mapper, bru_mapper_generics
Other mappers:
bm_aggregate(),
bm_collect(),
bm_const(),
bm_factor(),
bm_fm_mesh_1d,
bm_harmonics(),
bm_index(),
bm_linear(),
bm_logitaverage(),
bm_logsumexp(),
bm_marginal(),
bm_matrix(),
bm_mesh_B(),
bm_multi(),
bm_pipe(),
bm_repeat(),
bm_scale(),
bm_shift(),
bm_sum(),
bm_taylor(),
bru_get_mapper(),
bru_mapper()
Other specific bm_fmesher method implementations:
ibm_jacobian(),
ibm_n(),
ibm_values()
Examples
m <- bm_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