Skip to contents

Creates a mapper for 2D fm_mesh_2d objects

Usage

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

# S3 method for bru_mapper_fm_mesh_2d
ibm_n(mapper, ...)

# S3 method for bru_mapper_fm_mesh_2d
ibm_values(mapper, ...)

# S3 method for bru_mapper_fm_mesh_2d
ibm_jacobian(mapper, input, ...)

# S3 method for inla.mesh
bru_mapper(mesh, ...)

# S3 method for bru_mapper_inla_mesh_2d
ibm_n(mapper, ...)

# S3 method for bru_mapper_inla_mesh_2d
ibm_values(mapper, ...)

# S3 method for bru_mapper_inla_mesh_2d
ibm_jacobian(mapper, input, ...)

Arguments

mesh

An fm_mesh_2d or inla.mesh.2d object to use as a mapper

...

Arguments passed on to other methods

mapper

A mapper S3 object, inheriting from bru_mapper.

input

Data input for the mapper.

Functions

  • bru_mapper(inla.mesh): Creates a mapper for 2D inla.mesh objects

Examples

m <- bru_mapper(fmesher::fmexample$mesh)
ibm_n(m)
#> [1] 298
ibm_eval(m, as.matrix(expand.grid(-2:2, -2:2)), seq_len(ibm_n(m)))
#>  [1] 262.11038 109.62252 106.48666 106.19966 290.10681  70.06188 153.25978
#>  [8] 126.35953 189.25556  86.67539 122.99530 141.60258 137.06617 107.74499
#> [15] 198.55222 159.87451 178.77588 167.83807 143.57814 268.28533 115.26240
#> [22] 183.02906 163.71331 179.91753 237.85391