Learn R Programming

fdaPDE (version 0.1-6)

FEM: Define a surface or spatial field by a Finite Element basis expansion

Description

This function defines a FEM object. This is not usualled called directly by users.

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. The number of columns corresponds to the number of functional replicates.

FEMbasis

A FEMbasis object defining the Finite Element basis, created by create.FEM.basis.

Value

An FEM object. This contains a list with components coeff and FEMbasis.

Examples

Run this code
# NOT RUN {
## Upload a triangular mesh and plot it
data("mesh.2D.rectangular")
plot(mesh.2D.rectangular)
## Create a linear Finite Element basis
FEMbasis = create.FEM.basis(mesh.2D.rectangular)
## Define a sinusoidal function as expansion of this basis and plot it
coeff <- sin(mesh.2D.rectangular$nodes[,1])*cos(mesh.2D.rectangular$nodes[,2])
FEM_object<- FEM(coeff, FEMbasis)
plot(FEM_object)
# }

Run the code above in your browser using DataLab