FEM.time {fdaPDE}R Documentation

Define a spatio-temporal field by a Finite Element basis expansion

Description

This function defines a FEM.time object.

Usage

FEM.time(coeff,time_mesh,FEMbasis,FLAG_PARABOLIC=FALSE)

Arguments

coeff

A vector or a matrix containing the coefficients for the spatio-temporal basis expansion. The number of rows (or the vector's length) corresponds to the number of basis in FEMbasis times the number of knots in time_mesh.

time_mesh

A vector containing the b-splines knots for separable smoothing and the nodes for finite differences for parabolic smoothing

FEMbasis

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

FLAG_PARABOLIC

Boolean. If TRUE the coefficients are from parabolic smoothing, if FALSE the separable one.

Value

A FEM.time object. This contains a list with components coeff, mesh_time, FEMbasis and FLAG_PARABOLIC.

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 = rep(fs.test(mesh$nodes[,1], mesh$nodes[,2]),5)
time_mesh = seq(0,1,length.out = 5)
## Create the FEM object
FEMfunction = FEM.time(coeff, time_mesh, FEMbasis, FLAG_PARABOLIC = TRUE)
## Plot it at desired time
plot(FEMfunction,0.7)

[Package fdaPDE version 1.1-19 Index]