Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/boundaryops/boundary_restriction_test.jl @ 1529:43aaf710463e refactor/equidistant_grid/signature
Change to signature of equidistant_grid to same style as many array methods.
See for example Array{T}(undef, dims...), zeros(T, dims...), fill(a, dims...) and more.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 11 Apr 2024 22:31:04 +0200 |
parents | 11b08b242e48 |
children | 65b2d2c72fbc 3714a391545a |
comparison
equal
deleted
inserted
replaced
1528:d641798539c2 | 1529:43aaf710463e |
---|---|
7 using Sbplib.SbpOperators: BoundaryOperator, Stencil | 7 using Sbplib.SbpOperators: BoundaryOperator, Stencil |
8 | 8 |
9 @testset "boundary_restriction" begin | 9 @testset "boundary_restriction" begin |
10 stencil_set = read_stencil_set(sbp_operators_path()*"standard_diagonal.toml"; order = 4) | 10 stencil_set = read_stencil_set(sbp_operators_path()*"standard_diagonal.toml"; order = 4) |
11 e_closure = parse_stencil(stencil_set["e"]["closure"]) | 11 e_closure = parse_stencil(stencil_set["e"]["closure"]) |
12 g_1D = equidistant_grid(11, 0.0, 1.0) | 12 g_1D = equidistant_grid(0.0, 1.0, 11) |
13 g_2D = equidistant_grid((11,15), (0.0, 0.0), (1.0,1.0)) | 13 g_2D = equidistant_grid((0.0, 0.0), (1.0,1.0), 11, 15) |
14 | 14 |
15 @testset "boundary_restriction" begin | 15 @testset "boundary_restriction" begin |
16 @testset "1D" begin | 16 @testset "1D" begin |
17 e_l = boundary_restriction(g_1D,stencil_set,Lower()) | 17 e_l = boundary_restriction(g_1D,stencil_set,Lower()) |
18 @test e_l == BoundaryOperator(g_1D,Stencil{Float64}(e_closure),Lower()) | 18 @test e_l == BoundaryOperator(g_1D,Stencil{Float64}(e_closure),Lower()) |