comparison test/ext/sparse_arrays_test.jl @ 1751:f3d7e2d7a43f feature/sbp_operators/laplace_curvilinear

Merge feature/grids/manifolds
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 11 Sep 2024 16:26:19 +0200
parents 471a948cd2b2
children
comparison
equal deleted inserted replaced
1731:3684db043add 1751:f3d7e2d7a43f
1 using Test 1 using Test
2 2
3 using Sbplib 3 using Diffinitive
4 using Sbplib.Grids 4 using Diffinitive.Grids
5 using Sbplib.SbpOperators 5 using Diffinitive.SbpOperators
6 using Sbplib.RegionIndices
7 6
8 using SparseArrays 7 using SparseArrays
9 using Tokens 8 using Tokens
10 9
11 10
22 21
23 Mv = M*reshape(v,:) 22 Mv = M*reshape(v,:)
24 @test Mv ≈ reshape(Δ*v,:) 23 @test Mv ≈ reshape(Δ*v,:)
25 end 24 end
26 25
27 @testset let dₙ = normal_derivative(g, stencil_set,CartesianBoundary{1,Lower}()), M = sparse(dₙ) 26 @testset let dₙ = normal_derivative(g, stencil_set,CartesianBoundary{1,LowerBoundary}()), M = sparse(dₙ)
28 @test ndims(M) == 2 27 @test ndims(M) == 2
29 @test size(M) == (30,20*30) 28 @test size(M) == (30,20*30)
30 29
31 v = rand(size(g)...) 30 v = rand(size(g)...)
32 Mv = M*reshape(v,:) 31 Mv = M*reshape(v,:)