Package: fmesher 0.2.0.9006

Finn Lindgren

fmesher: Triangle Meshes and Related Geometry Tools

Generate planar and spherical triangle meshes, compute finite element calculations for 1- and 2-dimensional flat and curved manifolds with associated basis function spaces, methods for lines and polygons, and transparent handling of coordinate reference systems and coordinate transformation, including 'sf' and 'sp' geometries. The core 'fmesher' library code was originally part of the 'INLA' package, and implements parts of "Triangulations and Applications" by Hjelle and Daehlen (2006) <doi:10.1007/3-540-33261-8>.

Authors:Finn Lindgren [aut, cre, cph], Seaton Andy [ctb], Suen Man Ho [ctb], Fabian E. Bachl [ctb]

fmesher_0.2.0.9006.tar.gz
fmesher_0.2.0.9006.zip(r-4.5)fmesher_0.2.0.9006.zip(r-4.4)fmesher_0.2.0.9006.zip(r-4.3)
fmesher_0.2.0.9006.tgz(r-4.4-x86_64)fmesher_0.2.0.9006.tgz(r-4.4-arm64)fmesher_0.2.0.9006.tgz(r-4.3-x86_64)fmesher_0.2.0.9006.tgz(r-4.3-arm64)
fmesher_0.2.0.9006.tar.gz(r-4.5-noble)fmesher_0.2.0.9006.tar.gz(r-4.4-noble)
fmesher_0.2.0.9006.tgz(r-4.4-emscripten)fmesher_0.2.0.9006.tgz(r-4.3-emscripten)
fmesher.pdf |fmesher.html
fmesher/json (API)
NEWS

# Install 'fmesher' in R:
install.packages('fmesher', repos = c('https://inlabru-org.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/inlabru-org/fmesher/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:

On CRAN:

10.93 score 12 stars 26 packages 206 scripts 5.9k downloads 157 exports 30 dependencies

Last updated 2 hours agofrom:3c60624e9a. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 20 2024
R-4.5-win-x86_64OKNov 20 2024
R-4.5-linux-x86_64OKNov 20 2024
R-4.4-win-x86_64OKNov 20 2024
R-4.4-mac-x86_64OKNov 20 2024
R-4.4-mac-aarch64OKNov 20 2024
R-4.3-win-x86_64OKNov 20 2024
R-4.3-mac-x86_64OKNov 20 2024
R-4.3-mac-aarch64OKNov 20 2024

Exports:fm_as_bboxfm_as_dgCMatrixfm_as_dgTMatrixfm_as_fmfm_as_fmesher_sparsefm_as_lattice_2dfm_as_lattice_2d_listfm_as_listfm_as_mesh_1dfm_as_mesh_1d_listfm_as_mesh_2dfm_as_mesh_2d_listfm_as_segmfm_as_segm_listfm_as_sfcfm_as_sp_crsfm_as_tensorfm_as_tensor_listfm_as_unpackedMatrixfm_baryfm_bary_locfm_bary_simplexfm_basisfm_basis_mesh_1dfm_basis_mesh_2dfm_bboxfm_blockfm_block_evalfm_block_log_shiftfm_block_log_weightsfm_block_logsumexp_evalfm_block_prepfm_block_weightsfm_call_stackfm_caller_namefm_centroidsfm_containsfm_covariancefm_cprodfm_crsfm_CRSfm_CRS_as_listfm_crs_boundsfm_crs_detect_manifoldfm_crs_get_ellipsoid_radiusfm_crs_get_lengthunitfm_crs_get_wktfm_crs_graticulefm_crs_is_geocentfm_crs_is_identicalfm_crs_is_nullfm_crs_obliquefm_crs_oblique<-fm_crs_plotfm_crs_projection_typefm_crs_set_ellipsoid_radiusfm_crs_set_lengthunitfm_crs_tissotfm_crs<-fm_CRSargsfm_CRSargs_as_listfm_delaunay_2dfm_detect_manifoldfm_diameterfm_doffm_ellipsoid_radiusfm_ellipsoid_radius<-fm_evaluatefm_evaluatorfm_evaluator_latticefm_extensionsfm_femfm_generate_colorsfm_has_PROJ6fm_identical_CRSfm_intfm_int_mesh_2dfm_int_mesh_2d_corefm_int_multi_samplerfm_is_bndfm_is_bnd<-fm_is_withinfm_lattice_2dfm_length_unitfm_length_unit<-fm_listfm_list_as_CRSfm_manifoldfm_manifold_dimfm_manifold_getfm_manifold_typefm_matern_precisionfm_matern_samplefm_mesh_1dfm_mesh_2dfm_mesh_2d_inlafm_mesh_2d_mapfm_mesh_2d_map_limfm_mesh_intersectionfm_nonconvex_hullfm_nonconvex_hull_inlafm_nonconvex_hull_inla_basicfm_pixelsfm_proj4stringfm_raw_basisfm_rcdt_2dfm_rcdt_2d_inlafm_refinefm_row_kronfm_safe_spfm_samplefm_segmfm_segm_contour_helperfm_segm_joinfm_segm_splitfm_simplifyfm_simplify_helperfm_sp_get_crsfm_sp2segmentfm_split_linesfm_spTransformfm_store_pointsfm_subdividefm_tensorfm_transformfm_try_callstackfm_unify_coordsfm_vertex_projectionfm_verticesfm_wktfm_wkt_as_wkt_treefm_wkt_get_ellipsoid_radiusfm_wkt_get_lengthunitfm_wkt_is_geocentfm_wkt_predeffm_wkt_projection_typefm_wkt_set_ellipsoid_radiusfm_wkt_set_lengthunitfm_wkt_tree_as_wktfm_wkt_tree_get_itemfm_wkt_tree_projection_typefm_wkt_tree_set_itemfm_wkt_unit_paramsfmesher_baryfmesher_femfmesher_globe_pointsfmesher_rcdtfmesher_spherical_bsplinesfmesher_spherical_bsplines1fmesher_split_linesfmexample_spgeom_fmlines_rgllocal_fm_testthat_assignlocal_fm_testthat_setuplocal_fm_testthat_tolerancesplot_rgl

Dependencies:classclassIntcliDBIdplyre1071fansigenericsglueKernSmoothlatticelifecyclemagrittrMASSMatrixpillarpkgconfigproxyR6Rcpprlangs2sftibbletidyselectunitsutf8vctrswithrwk

Articles list

Rendered fromarticles.Rmdusingknitr::rmarkdownon Nov 20 2024.

Last update: 2024-10-16
Started: 2024-09-12

Basic fmesher use

Rendered frombasic_use.Rmdusingknitr::rmarkdownon Nov 20 2024.

Last update: 2024-11-13
Started: 2022-12-02

Converting legacy INLA mesh code to fmesher

Rendered frominla_conversion.Rmdusingknitr::rmarkdownon Nov 20 2024.

Last update: 2024-11-14
Started: 2023-07-22

Custom mesh classes

Rendered fromcustom_classes.Rmdusingknitr::rmarkdownon Nov 20 2024.

Last update: 2024-11-17
Started: 2024-11-16

The fmesher C++ library

Rendered fromfmesher_library.Rmdusingknitr::rmarkdownon Nov 20 2024.

Last update: 2023-08-11
Started: 2023-08-11

Readme and manuals

Help Manual

Help pageTopics
Convert objects to fmesher objectsfm_as_fm fm_as_fm.CRS fm_as_fm.crs fm_as_fm.fm_bbox fm_as_fm.fm_crs fm_as_fm.fm_lattice_2d fm_as_fm.fm_mesh_1d fm_as_fm.fm_mesh_2d fm_as_fm.fm_segm fm_as_fm.fm_tensor fm_as_fm.inla.CRS fm_as_fm.inla.mesh fm_as_fm.inla.mesh.1d fm_as_fm.inla.mesh.lattice fm_as_fm.inla.mesh.segment fm_as_fm.NULL
Convert objects to 'fm_lattice_2d'fm_as_lattice_2d fm_as_lattice_2d.fm_lattice_2d fm_as_lattice_2d.inla.mesh.lattice fm_as_lattice_2d_list
Convert objects to 'fm_segm'fm_as_mesh_1d fm_as_mesh_1d.fm_mesh_1d fm_as_mesh_1d.inla.mesh.1d fm_as_mesh_1d_list
Convert objects to 'fm_mesh_2d'fm_as_mesh_2d fm_as_mesh_2d.fm_mesh_2d fm_as_mesh_2d.inla.mesh fm_as_mesh_2d.sf fm_as_mesh_2d.sfc_MULTIPOLYGON fm_as_mesh_2d.sfc_POLYGON fm_as_mesh_2d.sfg fm_as_mesh_2d_list
Convert objects to 'fm_segm'fm_as_segm fm_as_segm.fm_segm fm_as_segm.inla.mesh.segment fm_as_segm.Line fm_as_segm.Lines fm_as_segm.matrix fm_as_segm.Polygon fm_as_segm.Polygons fm_as_segm.sf fm_as_segm.sfc_GEOMETRY fm_as_segm.sfc_LINESTRING fm_as_segm.sfc_MULTILINESTRING fm_as_segm.sfc_MULTIPOLYGON fm_as_segm.sfc_POINT fm_as_segm.sfc_POLYGON fm_as_segm.sfg fm_as_segm.SpatialLines fm_as_segm.SpatialLinesDataFrame fm_as_segm.SpatialPoints fm_as_segm.SpatialPointsDataFrame fm_as_segm.SpatialPolygons fm_as_segm.SpatialPolygonsDataFrame fm_as_segm_list
Conversion methods from mesh related objects to sfcfm_as_sfc fm_as_sfc.fm_mesh_2d fm_as_sfc.fm_segm fm_as_sfc.sf fm_as_sfc.sfc
Convert objects to 'fm_tensor'fm_as_tensor fm_as_tensor.fm_tensor fm_as_tensor_list
Compute barycentric coordinatesfm_bary fm_bary.fm_bary fm_bary.fm_mesh_1d fm_bary.fm_mesh_2d fm_bary.list fm_bary.tbl_df
Extract Euclidean Sgeometry from Barycentric coordinatesfm_bary_loc fm_bary_loc.fm_mesh_1d fm_bary_loc.fm_mesh_2d
Extract Simplex information for Barycentric coordinatesfm_bary_simplex fm_bary_simplex.fm_mesh_1d fm_bary_simplex.fm_mesh_2d
Compute mapping matrix between mesh function space and pointsfm_basis fm_basis.default fm_basis.fm_basis fm_basis.fm_evaluator fm_basis.fm_mesh_1d fm_basis.fm_mesh_2d fm_basis.fm_tensor fm_basis.list fm_basis.Matrix fm_basis.matrix
Bounding box classc.fm_bbox fm_as_bbox fm_bbox fm_bbox.bbox fm_bbox.fm_bbox fm_bbox.fm_lattice_2d fm_bbox.fm_mesh_1d fm_bbox.fm_mesh_2d fm_bbox.fm_segm fm_bbox.fm_tensor fm_bbox.list fm_bbox.Matrix fm_bbox.matrix fm_bbox.NULL fm_bbox.numeric fm_bbox.sf fm_bbox.sfc fm_bbox.sfg [.fm_bbox
Blockwise aggregation matricesfm_block fm_block_eval fm_block_logsumexp_eval fm_block_log_shift fm_block_log_weights fm_block_prep fm_block_weights
Extract triangle centroids from an 'fm_mesh_2d'fm_centroids
Check which mesh triangles are inside a polygonfm_contains fm_contains.sf fm_contains.sfc fm_contains.Spatial
Obtain coordinate reference system object$.fm_crs fm_crs fm_crs.character fm_crs.crs fm_crs.default fm_crs.fm_CRS fm_crs.fm_crs fm_crs.fm_lattice_2d fm_CRS.fm_list fm_crs.fm_list fm_crs.fm_mesh_2d fm_crs.fm_segm fm_crs.inla.CRS fm_crs.matrix fm_crs.sf fm_crs.sfc fm_crs.sfg fm_crs.Spatial fm_crs.SpatRaster fm_crs.SpatVector fm_crs_oblique fm_wkt_predef st_crs.fm_crs
Create a coordinate reference system objectfm_CRS fm_CRS.CRS fm_CRS.crs fm_CRS.default fm_CRS.fm_CRS fm_CRS.fm_crs fm_CRS.fm_lattice fm_CRS.fm_mesh_2d fm_CRS.fm_segm fm_CRS.inla.CRS fm_CRS.matrix fm_CRS.sf fm_CRS.sfc fm_CRS.sfg fm_CRS.Spatial fm_CRS.SpatRaster fm_CRS.SpatVector is.na.fm_CRS is.na.inla.CRS
Check if two CRS objects are identicalfm_crs_is_identical fm_identical_CRS
Check if a crs is NULL or NAfm_crs_is_null is.na.fm_crs
Plot CRS and fm_crs objectsfm_crs_graticule fm_crs_plot fm_crs_tissot
Handling CRS/WKTfm_crs_bounds fm_crs_get_ellipsoid_radius fm_crs_get_lengthunit fm_crs_get_wkt fm_crs_is_geocent fm_crs_projection_type fm_crs_set_ellipsoid_radius fm_crs_set_lengthunit fm_crs_wkt fm_ellipsoid_radius fm_ellipsoid_radius.character fm_ellipsoid_radius.default fm_ellipsoid_radius<- fm_ellipsoid_radius<-.character fm_ellipsoid_radius<-.CRS fm_ellipsoid_radius<-.crs fm_ellipsoid_radius<-.fm_CRS fm_ellipsoid_radius<-.fm_crs fm_ellipsoid_radius<-.inla.CRS fm_length_unit fm_length_unit.character fm_length_unit.default fm_length_unit<- fm_length_unit<-.character fm_length_unit<-.CRS fm_length_unit<-.crs fm_length_unit<-.fm_CRS fm_length_unit<-.fm_crs fm_length_unit<-.inla.CRS fm_proj4string fm_wkt fm_wkt_get_ellipsoid_radius fm_wkt_get_lengthunit fm_wkt_is_geocent fm_wkt_projection_type fm_wkt_set_ellipsoid_radius fm_wkt_set_lengthunit fm_wkt_tree_projection_type fm_wkt_unit_params
Assignment operators for crs information objectsfm_crs<- fm_crs<-.fm_lattice_2d fm_crs<-.fm_list fm_crs<-.fm_mesh_2d fm_crs<-.fm_segm fm_crs<-.NULL fm_crs<-.sf fm_crs<-.sfc fm_crs<-.sfg fm_crs<-.Spatial fm_crs_oblique<- fm_crs_oblique<-.CRS fm_crs_oblique<-.crs fm_crs_oblique<-.fm_CRS fm_crs_oblique<-.fm_crs fm_crs_oblique<-.fm_lattice_2d fm_crs_oblique<-.fm_mesh_2d fm_crs_oblique<-.fm_segm fm_crs_oblique<-.inla.CRS fm_crs_oblique<-.NULL
Detect manifold typefm_crs_detect_manifold fm_detect_manifold fm_detect_manifold.CRS fm_detect_manifold.crs fm_detect_manifold.fm_mesh_2d fm_detect_manifold.matrix fm_detect_manifold.numeric
Diameter bound for a geometric objectfm_diameter fm_diameter.fm_lattice_2d fm_diameter.fm_mesh_1d fm_diameter.fm_mesh_2d fm_diameter.fm_segm fm_diameter.matrix fm_diameter.sf fm_diameter.sfc fm_diameter.sfg
Function spece degrees of freedomfm_dof fm_dof.fm_mesh_1d fm_dof.fm_mesh_2d fm_dof.fm_tensor
Methods for projecting to/from mesh objectsfm_evaluate fm_evaluate.default fm_evaluate.fm_basis fm_evaluate.fm_evaluator fm_evaluator fm_evaluator.default fm_evaluator.fm_mesh_1d fm_evaluator.fm_mesh_2d fm_evaluator_lattice
Compute finite element matricesfm_fem fm_fem.fm_mesh_1d fm_fem.fm_mesh_2d fm_fem.fm_tensor
SPDE, GMRF, and Matérn process methodsfm_covariance fm_gmrf fm_matern_precision fm_matern_sample fm_sample
Multi-domain integrationfm_int fm_int.character fm_int.factor fm_int.fm_lattice_2d fm_int.fm_mesh_1d fm_int.fm_mesh_2d fm_int.list fm_int.numeric fm_int.SpatRaster
Query if points are inside a meshfm_is_within fm_is_within.default
Make a lattice objectfm_lattice_2d fm_lattice_2d.default
Handle lists of fmesher objectsc.fm_list fm_as_list fm_list [.fm_list
Query the mesh manifold typefm_manifold fm_manifold_dim fm_manifold_get fm_manifold_get.character fm_manifold_get.default fm_manifold_type
Make a 1D mesh objectfm_mesh_1d
Make a 2D mesh objectfm_mesh_2d fm_mesh_2d_inla
Compute an extension of a spatial objectfm_extensions fm_nonconvex_hull fm_nonconvex_hull.matrix fm_nonconvex_hull.sf fm_nonconvex_hull.sfc fm_nonconvex_hull.sfg fm_nonconvex_hull.Spatial
Non-convex hull computationfm_nonconvex_hull_inla fm_nonconvex_hull_inla_basic
Generate lattice points covering a meshfm_pixels
Basis functions for mesh manifoldsfm_raw_basis
Refined Constrained Delaunay Triangulationfm_delaunay_2d fm_rcdt_2d fm_rcdt_2d_inla
Row-wise Kronecker productsfm_row_kron
Make a spatial segment objectfm_is_bnd fm_is_bnd<- fm_segm fm_segm.default fm_segm.fm_mesh_2d fm_segm.fm_segm fm_segm.fm_segm_list fm_segm.inla.mesh.segment fm_segm_join fm_segm_split
Methods for fm_segm listsc.fm_segm c.fm_segm_list fm_segm_list [.fm_segm_list
Recursive curve simplification.fm_simplify
Split lines at triangle edgesfm_split_lines fm_split_lines.fm_mesh_2d
Split triangles of a mesh into subtrianglesfm_subdivide
Make a tensor product function spacefm_tensor
Object coordinate transformationfm_transform fm_transform.default fm_transform.fm_lattice_2d fm_transform.fm_list fm_transform.fm_mesh_2d fm_transform.fm_segm fm_transform.matrix fm_transform.NULL fm_transform.sf fm_transform.sfc fm_transform.sfg fm_transform.Spatial
Extract vertex locations from an 'fm_mesh_2d'fm_vertices
Barycentric coordinate computationfmesher_bary
Finite element matrix computationfmesher_fem
Globe pointsfmesher_globe_points
Refined Constrained Delaunay Triangulationfmesher_rcdt
Split lines at triangle edgesfmesher_split_lines
Deprecated functions in fmesherfmesher-deprecated fm_as_sp_crs fm_has_PROJ6 fm_sp2segment fm_spTransform fm_spTransform.default fm_spTransform.SpatialPoints fm_spTransform.SpatialPointsDataFrame fm_sp_get_crs
Print objectsfmesher-print print.fm_bbox print.fm_CRS print.fm_crs print.fm_mesh_1d print.fm_mesh_2d print.fm_segm print.fm_segm_list print.fm_tensor
Example mesh datafmexample
Add sp data to fmexamplefmexample_sp
ggplot2 geomes for fmesher related objectsgeom_fm geom_fm.fm_mesh_1d geom_fm.fm_mesh_2d geom_fm.fm_segm
Low level triangulation mesh plottinglines_rgl lines_rgl.fm_segm lines_rgl.fm_segm_list plot_rgl plot_rgl.fm_mesh_2d plot_rgl.fm_segm plot_rgl.fm_segm_list
Draw a triangulation mesh objectlines.fm_mesh_2d plot.fm_mesh_2d
Draw 'fm_segm' objects.lines.fm_segm lines.fm_segm_list plot.fm_segm plot.fm_segm_list
Print method for 'fm_basis'print.fm_basis
Print method for 'fm_evaluator()'print.fm_evaluator