Skip to content

Commit 003decb

Browse files
committed
Update README.md
1 parent 46d30f2 commit 003decb

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
11
# PiecewiseOrthogonalPolynomials.jl
22
A 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+
```

0 commit comments

Comments
 (0)