Learn R Programming

fdaPDE (version 1.1-21)

create.FEM.basis: Create a FEM basis

Description

Sets up a Finite Element basis. It requires a mesh.2D, mesh.2.5D or mesh.3D object, as input. The basis' functions are globally continuos functions, that are polynomials once restricted to a triangle in the mesh. The current implementation includes linear finite elements (when order = 1 in the input mesh) and quadratic finite elements (when order = 2 in the input mesh). If saveTree flag is TRUE, it saves the tree mesh information in advance inside mesh object and can be used later on to save mesh construction time.

Usage

create.FEM.basis(mesh, saveTree = FALSE)

Value

A FEMbasis object. This contains the mesh, along with some additional quantities:

order

Either "1" or "2" for the 2D and 2.5D case, and "1" for the 3D case. Order of the Finite Element basis.

nbasis

Scalar. The number of basis.

Arguments

mesh

A mesh.2D, mesh.2.5D or mesh.3D object representing the domain triangulation. See create.mesh.2D, create.mesh.2.5D, create.mesh.3D.

saveTree

a flag to decide to save the tree mesh information in advance (default is FALSE)

See Also

create.mesh.2D, create.mesh.2.5D,create.mesh.3D

Examples

Run this code
library(fdaPDE)
## Upload the quasicircle2D data
data(quasicircle2D)

## Create the 2D mesh
mesh = create.mesh.2D(nodes = rbind(quasicircle2D$boundary_nodes, 
quasicircle2D$locations), segments = quasicircle2D$boundary_segments)
## Plot it
plot(mesh)
## Create the basis
FEMbasis = create.FEM.basis(mesh)
## Upload the hub2.5D data
data(hub2.5D)

hub2.5D.nodes = hub2.5D$hub2.5D.nodes
hub2.5D.triangles = hub2.5D$hub2.5D.triangles
## Create the 2.5D mesh
mesh = create.mesh.2.5D(nodes = hub2.5D.nodes, triangles = hub2.5D.triangles)
## Plot it
plot(mesh)
## Create the basis
FEMbasis = create.FEM.basis(mesh)

Run the code above in your browser using DataLab