Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/volumeops/laplace/laplace_test.jl @ 926:47425442bbc5 feature/laplace_opset
Fix tests after refactoring
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Mon, 21 Feb 2022 23:33:29 +0100 |
parents | 12e8e431b43c |
children | 7bf3121c6864 1ba8a398af9c |
comparison
equal
deleted
inserted
replaced
925:6b47a9ee1632 | 926:47425442bbc5 |
---|---|
1 using Test | 1 using Test |
2 | 2 |
3 using Sbplib.SbpOperators | 3 using Sbplib.SbpOperators |
4 using Sbplib.Grids | 4 using Sbplib.Grids |
5 using Sbplib.LazyTensors | 5 using Sbplib.LazyTensors |
6 using Sbplib.RegionIndices | |
7 | 6 |
8 # Default stencils (4th order) | 7 # Default stencils (4th order) |
9 operator_path = sbp_operators_path()*"standard_diagonal.toml" | 8 operator_path = sbp_operators_path()*"standard_diagonal.toml" |
10 stencil_set = read_stencil_set(operator_path; order=4) | 9 stencil_set = read_stencil_set(operator_path; order=4) |
11 inner_stencil = parse_stencil(stencil_set["D2"]["inner_stencil"]) | 10 inner_stencil = parse_stencil(stencil_set["D2"]["inner_stencil"]) |
12 closure_stencils = parse_stencil.(stencil_set["D2"]["closure_stencils"]) | 11 closure_stencils = parse_stencil.(stencil_set["D2"]["closure_stencils"]) |
12 g_1D = EquidistantGrid(101, 0.0, 1.) | |
13 g_3D = EquidistantGrid((51,101,52), (0.0, -1.0, 0.0), (1., 1., 1.)) | |
13 | 14 |
14 @testset "Laplace" begin | 15 @testset "Laplace" begin |
15 g_1D = EquidistantGrid(101, 0.0, 1.) | |
16 g_3D = EquidistantGrid((51,101,52), (0.0, -1.0, 0.0), (1., 1., 1.)) | |
17 @testset "Constructors" begin | 16 @testset "Constructors" begin |
18 | |
19 @testset "1D" begin | 17 @testset "1D" begin |
20 Δ = laplace(g_1D, inner_stencil, closure_stencils) | 18 Δ = laplace(g_1D, inner_stencil, closure_stencils) |
21 @test Laplace(g_1D, stencil_set) == Laplace(Δ, stencil_set) | 19 @test Laplace(g_1D, stencil_set) == Laplace(Δ, stencil_set) |
22 @test Laplace(g_1D, stencil_set) isa TensorMapping{T,1,1} where T | 20 @test Laplace(g_1D, stencil_set) isa TensorMapping{T,1,1} where T |
23 end | 21 end |