comparison test/SbpOperators/boundaryops/boundary_operator_test.jl @ 1751:f3d7e2d7a43f feature/sbp_operators/laplace_curvilinear

Merge feature/grids/manifolds
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 11 Sep 2024 16:26:19 +0200
parents 471a948cd2b2
children
comparison
equal deleted inserted replaced
1731:3684db043add 1751:f3d7e2d7a43f
1 using Test 1 using Test
2 2
3 using Sbplib.LazyTensors 3 using Diffinitive.LazyTensors
4 using Sbplib.SbpOperators 4 using Diffinitive.SbpOperators
5 using Sbplib.Grids 5 using Diffinitive.Grids
6 using Sbplib.RegionIndices 6 using Diffinitive.RegionIndices
7 import Sbplib.SbpOperators.Stencil 7 import Diffinitive.SbpOperators.Stencil
8 import Sbplib.SbpOperators.BoundaryOperator 8 import Diffinitive.SbpOperators.BoundaryOperator
9 9
10 10
11 @testset "BoundaryOperator" begin 11 @testset "BoundaryOperator" begin
12 closure_stencil = Stencil(2.,1.,3.; center = 1) 12 closure_stencil = Stencil(2.,1.,3.; center = 1)
13 g_1D = EquidistantGrid(range(0,1,length=11)) 13 g_1D = EquidistantGrid(range(0,1,length=11))
14 14
15 @testset "Constructors" begin 15 @testset "Constructors" begin
16 @test BoundaryOperator(g_1D, closure_stencil, Lower()) isa LazyTensor{T,0,1} where T 16 @test BoundaryOperator(g_1D, closure_stencil, LowerBoundary()) isa LazyTensor{T,0,1} where T
17 @test BoundaryOperator(g_1D, closure_stencil, Upper()) isa LazyTensor{T,0,1} where T 17 @test BoundaryOperator(g_1D, closure_stencil, UpperBoundary()) isa LazyTensor{T,0,1} where T
18 end 18 end
19 19
20 op_l = BoundaryOperator(g_1D, closure_stencil, Lower()) 20 op_l = BoundaryOperator(g_1D, closure_stencil, LowerBoundary())
21 op_r = BoundaryOperator(g_1D, closure_stencil, Upper()) 21 op_r = BoundaryOperator(g_1D, closure_stencil, UpperBoundary())
22 22
23 @testset "Sizes" begin 23 @testset "Sizes" begin
24 @test domain_size(op_l) == (11,) 24 @test domain_size(op_l) == (11,)
25 @test domain_size(op_r) == (11,) 25 @test domain_size(op_r) == (11,)
26 26