FEM {fdaPDE} | R Documentation |
Define a surface or spatial field by a Finite Element basis expansion
Description
This function defines a FEM object.
Usage
FEM(coeff,FEMbasis)
Arguments
coeff |
A vector or a matrix containing the coefficients for the Finite Element basis expansion. The number of rows
(or the vector's length) corresponds to the number of basis in |
FEMbasis |
A |
Value
An FEM
object. This contains a list with components coeff
and FEMbasis
.
Examples
library(fdaPDE)
## Upload the horseshoe2D data
data(horseshoe2D)
## Create the 2D mesh
mesh = create.mesh.2D(nodes = rbind(horseshoe2D$boundary_nodes, horseshoe2D$locations),
segments = horseshoe2D$boundary_segments)
## Create the FEM basis
FEMbasis = create.FEM.basis(mesh)
## Compute the coeff vector evaluating the desired function at the mesh nodes
## In this case we consider the fs.test() function introduced by Wood et al. 2008
coeff = fs.test(mesh$nodes[,1], mesh$nodes[,2])
## Create the FEM object
FEMfunction = FEM(coeff, FEMbasis)
## Plot it
plot(FEMfunction)
[Package fdaPDE version 1.1-19 Index]