Mercurial > repos > public > sbplib_julia
changeset 2076:832580b6d548 feature/sbp_operators/laplace_curvilinear tip
Add test for inverse_inner_product
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Wed, 18 Feb 2026 07:08:14 +0100 |
| parents | 83759a0d0f28 |
| children | |
| files | test/SbpOperators/volumeops/inner_products/inverse_inner_product_test.jl |
| diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
diff -r 83759a0d0f28 -r 832580b6d548 test/SbpOperators/volumeops/inner_products/inverse_inner_product_test.jl --- a/test/SbpOperators/volumeops/inner_products/inverse_inner_product_test.jl Tue Feb 17 21:21:59 2026 +0100 +++ b/test/SbpOperators/volumeops/inner_products/inverse_inner_product_test.jl Wed Feb 18 07:08:14 2026 +0100 @@ -7,6 +7,9 @@ import Diffinitive.SbpOperators.ConstantInteriorScalingOperator using StaticArrays +using SparseArrays +using Tokens +using LinearAlgebra @testset "Diagonal-stencil inverse_inner_product" begin Lx = π/2. @@ -95,6 +98,10 @@ mg = equidistant_grid(c, 10,13) @test inverse_inner_product(mg, stencil_set) isa LazyTensor{<:Any, 2,2} - @test_broken false # Test that it calculates the right thing + + + H = inner_product(mg, stencil_set) + H⁻¹ = inverse_inner_product(mg, stencil_set) + @test Matrix(sparse(H⁻¹)) ≈ inv(Matrix(sparse(H))) end end
