Mercurial > repos > public > sbplib_julia
comparison test/ext/sparse_array_kit_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 SparseArrayKit | 7 using SparseArrayKit |
| 9 using Tokens | 8 using Tokens |
| 10 using Tullio | 9 using Tullio |
| 11 | 10 |
| 23 @tullio Mv[i,j] := M[i,j,k,l]*v[k,l] | 22 @tullio Mv[i,j] := M[i,j,k,l]*v[k,l] |
| 24 | 23 |
| 25 @test Mv ≈ Δ*v | 24 @test Mv ≈ Δ*v |
| 26 end | 25 end |
| 27 | 26 |
| 28 @testset let dₙ = normal_derivative(g, stencil_set,CartesianBoundary{1,Lower}()), M = SparseArray(dₙ) | 27 @testset let dₙ = normal_derivative(g, stencil_set,CartesianBoundary{1,LowerBoundary}()), M = SparseArray(dₙ) |
| 29 @test ndims(M) == 3 | 28 @test ndims(M) == 3 |
| 30 @test size(M) == (30,20,30) | 29 @test size(M) == (30,20,30) |
| 31 | 30 |
| 32 v = rand(size(g)...) | 31 v = rand(size(g)...) |
| 33 @tullio Mv[i] := M[i,j,k]*v[j,k] | 32 @tullio Mv[i] := M[i,j,k]*v[j,k] |
