Skip to content

Commit e0d7f10

Browse files
committed
add tests and docs
1 parent e7dcb93 commit e0d7f10

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

docs/src/index.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,35 @@ product of the specified sizes, similar to `plan_fft`.
2020
5. `plotgrid(::MyBasis, n...)`: return `n` grid points suitable for plotting the basis. The default value for `n` is 10,000.
2121

2222

23-
## Routines
23+
## Differential Operators
2424

2525

2626
```@docs
2727
Derivative
2828
```
29+
30+
```@docs
31+
Laplacian
32+
```
33+
34+
```@docs
35+
AbsLaplacian
36+
```
37+
38+
```@docs
39+
laplacian
40+
```
41+
42+
```@docs
43+
abslaplacian
44+
```
45+
46+
```@docs
47+
weaklaplacian
48+
```
49+
50+
## Routines
51+
2952
```@docs
3053
transform
3154
```

test/test_splines.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ import ContinuumArrays: basis, AdjointBasisLayout, ExpansionLayout, BasisLayout,
4545
@test sum(H/H \ exp.(x)) -1 atol=1E-5
4646
@test last(cumsum(H/H \ exp.(x))) sum(H/H\exp.(x))
4747
end
48+
49+
@test coefficients(H) Eye(2)
4850
end
4951

5052
@testset "LinearSpline" begin
@@ -163,6 +165,11 @@ import ContinuumArrays: basis, AdjointBasisLayout, ExpansionLayout, BasisLayout,
163165
@test typeof(diff(L)) == typeof(diff(L; dims=1)) == typeof(D*L)
164166
@test_throws ErrorException diff(L; dims=2)
165167

168+
@test diff(L,0) L
169+
@test diff(f,0) f
170+
@test diff(L,2)[1.1,:] == laplacian(L)[1.1,:] == -abslaplacian(L)[1.1,:]
171+
@test diff(f,2)[1.1] == laplacian(f)[1.1] == -abslaplacian(f)[1.1]
172+
166173
M = applied(*, (D*L).args..., [1,2,4])
167174
@test eltype(materialize(M)) == Float64
168175

0 commit comments

Comments
 (0)