Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/boundaryops/boundary_restriction_test.jl @ 1101:1e8270c18edb feature/lazy_tensors/pretty_printing
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 12 May 2022 21:52:47 +0200 |
parents | 7fc8df5157a7 |
children | 1cc45207817e |
comparison
equal
deleted
inserted
replaced
1014:67969bd7e642 | 1101:1e8270c18edb |
---|---|
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 | 6 using Sbplib.RegionIndices |
7 import Sbplib.SbpOperators.BoundaryOperator | 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 = EquidistantGrid(11, 0.0, 1.0) | 12 g_1D = EquidistantGrid(11, 0.0, 1.0) |
28 end | 28 end |
29 | 29 |
30 @testset "2D" begin | 30 @testset "2D" begin |
31 e_w = boundary_restriction(g_2D,e_closure,CartesianBoundary{1,Upper}()) | 31 e_w = boundary_restriction(g_2D,e_closure,CartesianBoundary{1,Upper}()) |
32 @test e_w == boundary_restriction(g_2D,stencil_set,CartesianBoundary{1,Upper}()) | 32 @test e_w == boundary_restriction(g_2D,stencil_set,CartesianBoundary{1,Upper}()) |
33 @test e_w isa InflatedLazyTensor | 33 @test e_w isa InflatedTensor |
34 @test e_w isa LazyTensor{T,1,2} where T | 34 @test e_w isa LazyTensor{T,1,2} where T |
35 end | 35 end |
36 end | 36 end |
37 | 37 |
38 @testset "Application" begin | 38 @testset "Application" begin |