fm_basis: Compute mapping matrix between mesh function space and points

View source: R/evaluator.R

fm_basisR Documentation

Compute mapping matrix between mesh function space and points

Description

Computes the basis mapping matrix between a function space on a mesh, and locations.

Usage

fm_basis(x, ...)

## Default S3 method:
fm_basis(x, loc, ...)

## S3 method for class 'fm_mesh_1d'
fm_basis(x, loc, weights = NULL, derivatives = NULL, ...)

## S3 method for class 'fm_mesh_2d'
fm_basis(x, loc, weights = NULL, derivatives = NULL, ...)

## S3 method for class 'inla.mesh.1d'
fm_basis(x, loc, ...)

## S3 method for class 'inla.mesh'
fm_basis(x, loc, ...)

## S3 method for class 'fm_evaluator'
fm_basis(x, ...)

Arguments

x

An object supported by the fm_evaluator() class

...

Currently unused

loc

A set of points of a class supported by fm_evaluator(x, loc = loc)

weights

Optional weight matrix to apply (from the left)

derivatives

If non-NULL and logical, return a list, optionally including derivative matrices.

Value

A sparseMatrix

For fm_mesh_1d, a list with elements

A

The projection matrix, ⁠u(loc_i)=sum_j A_ij w_i⁠

d1A, d2A

Derivative weight matrices, ⁠du/dx(loc_i)=sum_j dx_ij w_i⁠, etc.

For fm_mesh_2d, a list with elements

A

The projection matrix, ⁠u(loc_i)=sum_j A_ij w_i⁠

dx, dy, dz

Derivative weight matrices, ⁠du/dx(loc_i)=sum_j dx_ij w_i⁠, etc.

See Also

fm_raw_basis()

Examples

# Compute basis mapping matrix
str(fm_basis(fmexample$mesh, fmexample$loc))

fmesher documentation built on Nov. 2, 2023, 5:35 p.m.