Converting legacy INLA mesh code to fmesher

Deprecation warnings

Three INLA::inla.getOption()/INLA::inla.setOption() options control the transition behaviour of the INLA package use of fmesher.

Mesh construction

INLA fmesher
inla.mesh.create() fm_rcdt_2d() , fm_rcdt_2d_inla()
inla.mesh.2d() fm_mesh_2d() , fm_mesh_2d_inla()
inla.delaunay() fm_delaunay_2d()
inla.mesh.1d() fm_mesh_1d()
inla.mesh.lattice() fm_lattice_2d()
inla.mesh.segment() fm_segm()
inla.nonconvex.hull() fm_nonconvex_hull(), fm_extensions() , fm_simplify()
inla.nonconvex.hull() , inla.contour.segment(), inla.simplify.curve() fm_nonconvex_hull_inla(), fm_simplify_helper() , fm_segm_contour_helper()

Basis and function evaluation

INLA fmesher
inla.mesh.projector() fm_evaluator()
inla.mesh.project() fm_evaluate()
inla.spde.make.A() fm_basis() , fm_row_kron() , inlabru::bru_mapper_multi() , inlabru::ibm_jacobian(), fm_block() , fm_block_eval() , inlabru::bru_mapper_aggregate()
inla.mesh.deriv() fm_basis()

Printing

INLA fmesher Comments
summary.inla.mesh() print.fm_mesh_2d(), print.fm_segm() , print.fm_mesh_1d() Use print(mesh) etc.

CRS information and coordinate transformations

INLA fmesher Comments
inla.spTransform() fm_transform()
mesh$crs fm_crs(mesh) , fm_CRS(mesh) The crs may now be stored in different formats; use fm_crs() for sf format, and fm_CRS() for sp format. fmesher will attempt to convert when needed.
mesh$crs<- fm_crs(mesh)<- Direct assignment of crs information should be avoided, but is allowed as long as its compatible with the actual mesh coordinates.

Plotting

INLA fmesher Comment
No ggplot support geom_fm(data = mesh), geom_fm(data = segm) Use ggplot() + geom_fm(data = mesh) and inlabru::gg() methods
plot.inla.mesh(rgl = FALSE) plot.fm_mesh_2d() , lines.fm_mesh_2d() Use plot() or lines()
lines.inla.mesh.segment(rgl = FALSE) plot.fm_segm() , lines.fm_segm() Use plot() or lines()
plot.inla.mesh(rgl = TRUE) plot_rgl() , lines_rgl()
lines.inla.mesh.segment(rgl = TRUE) plot_rgl() , lines_rgl()