File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 11# PiecewiseOrthogonalPolynomials.jl
22A Julia package for piecewise orthogonal polynomials which can be used in p-FEM
3+
4+
5+ We can make piecewise integrated-Legendre bases using the quasi-matrix ` ContinuousPolynomial{1} ` :
6+ ``` julia
7+ using PiecewiseOrthogonalPolynomials, Plots
8+
9+ 𝐗 = range (- 1 ,1 ; length= 4 )
10+ C = ContinuousPolynomial {1} (𝐗)
11+ plot (C[:,Block (1 )])
12+ ```
13+ ``` julia
14+ plot (C[:,Block .(2 : 3 )])
15+ ```
16+
17+ The mass matrix can be constructed via:
18+ ``` julia
19+ M = C' C
20+ ```
21+ We can also construct the stiffness matrix:
22+ ``` julia
23+ Δ = weaklaplacian (C)
24+ ```
25+
26+ We can truncate as follows:
27+ ``` julia
28+ N = 10
29+ KR = Block .(Base. OneTo (N))
30+ Mₙ = M[KR,KR]
31+ Δₙ = Δ[KR,KR]
32+ ```
33+
34+ We can compute the reverse Cholesky in optimal complexity:
35+ ``` julia
36+ using MatrixFactorizations
37+ L = reversecholesky (Symmetric (- Δₙ + Mₙ)). L
38+ ```
You can’t perform that action at this time.
0 commit comments