Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/boundaryops/boundary_restriction_test.jl @ 1594:d68d02dd882f feature/boundary_conditions
Merge with default
author | Vidar Stiernström <vidar.stiernstrom@gmail.com> |
---|---|
date | Sat, 25 May 2024 16:07:10 -0700 |
parents | 43aaf710463e |
children | 65b2d2c72fbc 3714a391545a |
comparison
equal
deleted
inserted
replaced
1591:615eeb6e662e | 1594:d68d02dd882f |
---|---|
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()) |