Learn R Programming

fdaPDE (version 0.1-6)

create.FEM.basis: Create a FEM basis

Description

Sets up a Finite Element basis. It requires a triangular mesh, a MESH2D object, as input. The basis' functions are globally continuos surfaces, that are polynomials once restricted to a triangle in the mesh. Linear if (order = 1) in the input mesh and quadratic if (order = 2) in the input mesh Finite Element are currently implemented.

Usage

create.FEM.basis(mesh)

Arguments

mesh

A MESH2D object representing the domain triangulation. See create.MESH.2D.

Value

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

order

Either "1" or "2". Order of the Finite Element basis.

nbasis

Scalar. The number of basis.

detJ

The determinant of the transformation from the nodes of the reference triangle to the nodes of the i-th triangle; this coincides with the double of the area of the i-th triangle.

transf

A three-dimensional array such that transf[i,,] is the 2-by-2 matrix that transforms the nodes of the reference triangle to the nodes of the i-th triangle.

metric

A three-dimensional array such that metric[i,,] is the 2-by-2 matrix transf[i,,]^{-1}*transf[i,,]^{-T}. This matrix is used for the computation of the integrals over the elements of the mesh.

See Also

create.MESH.2D

Examples

Run this code
# NOT RUN {
## Creates a simple triangulated domain with a concavity; this is a MESH2D object  
mesh<-create.MESH.2D(nodes=rbind(c(0, 0), c(0, 1), c(0.5, 0.5), c(1, 1), c(1, 0)),
segments=rbind(c(1, 2), c(2, 3), c(3, 4), c(4, 5), c(5, 1)), order=1)
## Plot it
plot(mesh)                   
## Creates the basis
FEMbasis = create.FEM.basis(mesh)
# }

Run the code above in your browser using DataLab