rSPDE.A1d | R Documentation |
A finite element discretization on R can be written as
u(s) = \sum_i^n u_i \varphi_i(s)
where \varphi_i(s)
is a piecewise linear
"hat function" centered at location
x_i
. This function computes an
m\times n
matrix A
that links the basis function in the expansion to specified locations
s = (s_1,\ldots, s_m)
in the domain through
A_ij = \varphi_j(s_i)
.
rSPDE.A1d(x, loc)
x |
The locations of the nodes in the FEM discretization. |
loc |
The locations |
The sparse matrix A
.
David Bolin davidbolin@gmail.com
rSPDE.fem1d()
# create mass and stiffness matrices for a FEM discretization on [0,1]
x <- seq(from = 0, to = 1, length.out = 101)
fem <- rSPDE.fem1d(x)
# create the observation matrix for some locations in the domain
obs.loc <- runif(n = 10, min = 0, max = 1)
A <- rSPDE.A1d(x, obs.loc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.