PiecewiseOrthogonalPolynomials.jl

A Julia package for piecewise spectral methods such as p-FEM
Author JuliaApproximation
Popularity
6 Stars
Updated Last
3 Months Ago
Started In
March 2022

PiecewiseOrthogonalPolynomials.jl

A Julia package for piecewise orthogonal polynomials which can be used in p-FEM

We can make piecewise integrated-Legendre bases using the quasi-matrix ContinuousPolynomial{1}:

using PiecewiseOrthogonalPolynomials, Plots

๐— = range(-1,1; length=4)
C = ContinuousPolynomial{1}(๐—)
plot(C[:,Block(1)])
plot(C[:,Block.(2:3)])

The mass matrix can be constructed via:

M = C'C

We can also construct the stiffness matrix:

ฮ” = weaklaplacian(C)

We can truncate as follows:

N = 10
KR = Block.(Base.OneTo(N))
Mโ‚™ = M[KR,KR]
ฮ”โ‚™ = ฮ”[KR,KR]

We can compute the reverse Cholesky in optimal complexity:

using MatrixFactorizations
L = reversecholesky(Symmetric(-ฮ”โ‚™ + Mโ‚™)).L