Skip to content

Commit 3ddb80f

Browse files
committed
testing Jacobi FEM
1 parent 2c095fb commit 3ddb80f

File tree

2 files changed

+85
-12
lines changed

2 files changed

+85
-12
lines changed

appveyor.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
environment:
2+
matrix:
3+
- julia_version: 0.7
4+
- julia_version: 1
5+
- julia_version: nightly
6+
7+
platform:
8+
- x86 # 32-bit
9+
- x64 # 64-bit
10+
11+
# # Uncomment the following lines to allow failures on nightly julia
12+
# # (tests will run but not make your overall status red)
13+
# matrix:
14+
# allow_failures:
15+
# - julia_version: nightly
16+
17+
branches:
18+
only:
19+
- master
20+
- /release-.*/
21+
22+
notifications:
23+
- provider: Email
24+
on_build_success: false
25+
on_build_failure: false
26+
on_build_status_changed: false
27+
28+
install:
29+
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))
30+
31+
build_script:
32+
- echo "%JL_BUILD_SCRIPT%"
33+
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"
34+
35+
test_script:
36+
- echo "%JL_TEST_SCRIPT%"
37+
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"
38+
39+
# # Uncomment to support code coverage upload. Should only be enabled for packages
40+
# # which would have coverage gaps without running on Windows
41+
# on_success:
42+
# - echo "%JL_CODECOV_SCRIPT%"
43+
# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%"

test/runtests.jl

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,6 @@ end
157157
S = Jacobi(true,true)
158158
W = Diagonal(JacobiWeight(true,true))
159159
D = Derivative(axes(W,1))
160-
D*S
161-
162-
D*S[:,1:10]
163-
164-
materialize(D*W*S)
165-
166-
J = Jacobi(false,false)
167-
J'J
168160

169161

170162
S'W'W*S
@@ -176,21 +168,59 @@ L = D*W*S[:,1:N]
176168

177169
Δ = L'L # weak second derivative
178170

179-
f = Legendre() * Vcat(1:10, Zeros(∞))
171+
f = Legendre() * Vcat(1:2, Zeros(∞))
172+
L'f
180173

174+
A = (L').factors[2]*f.factors[1]
181175

182-
L'f
176+
A*f.factors[2]
183177

184178
axes(L')
185179

186180
Legendre()'f
187181

188182
A = Diagonal(1:∞)
189-
x = Vcat(1:10, Zeros(∞))
183+
190184

191185
@which A*x
186+
1
187+
using InfiniteArrays, BandedMatrices, InteractiveUtils, Test
188+
189+
A = BandedMatrices._BandedMatrix((1:∞)', ∞, -1,1)
190+
x = Vcat(1:3, Zeros(∞))
191+
192+
Zeros(∞) == Zeros(∞)
193+
194+
195+
@test A*x == Vcat([4.0,9.0], Zeros(∞))
196+
197+
y = similar(Mul
198+
199+
y = Vcat(randn(9), Zeros(∞))
200+
copyto!(y , Mul(A,x))
201+
202+
MemoryLayout(x)
203+
204+
similar(Mul(A,x), Float64)
205+
206+
207+
typeof( Mul(B,x))
208+
209+
Mul2{<:BandedColumnMajor,<:Any,<:AbstractMatrix,
210+
<:Vcat{<:AbstractVector,<:Zeros}}
211+
212+
213+
214+
215+
216+
typeof(V)
217+
V = view(bandeddata(B),1:1,3:∞)
218+
_BandedMatrix(V, ∞, 2,-2)
219+
220+
using InteractiveUtils
221+
222+
B
192223

193-
B = BandedMatrices._BandedMatrix((1:∞)', ∞, -1,1)
194224

195225
B*x
196226

0 commit comments

Comments
 (0)