comparison test/SbpOperators/boundary_conditions/boundary_condition_test.jl @ 1672:3714a391545a refactor/grids/boundary_identifiers_1d

Make the boundary identifiers for EquidistantGrid subtype BoundaryIdentifer
author Vidar Stiernström <vidar.stiernstrom@gmail.com>
date Sun, 07 Jul 2024 15:15:12 -0700
parents 48596b2f7923
children 471a948cd2b2
comparison
equal deleted inserted replaced
1671:791d0f3f289a 1672:3714a391545a
13 (_,_,_,_,id_b,_) = boundary_identifiers(grid_3d) 13 (_,_,_,_,id_b,_) = boundary_identifiers(grid_3d)
14 14
15 g = 3.14 15 g = 3.14
16 f(x,y,z) = x^2+y^2+z^2 16 f(x,y,z) = x^2+y^2+z^2
17 @testset "Constructors" begin 17 @testset "Constructors" begin
18 @test DirichletCondition(g,id_l) isa DirichletCondition{Float64,Lower} 18 @test DirichletCondition(g,id_l) isa DirichletCondition{Float64,LowerBoundary}
19 @test NeumannCondition(f,id_b) isa NeumannCondition{<:Function,CartesianBoundary{3,Lower}} 19 @test NeumannCondition(f,id_b) isa NeumannCondition{<:Function,CartesianBoundary{3,LowerBoundary}}
20 end 20 end
21 21
22 @testset "boundary" begin 22 @testset "boundary" begin
23 @test boundary(DirichletCondition(g,id_l)) == id_l 23 @test boundary(DirichletCondition(g,id_l)) == id_l
24 @test boundary(NeumannCondition(f,id_b)) == id_b 24 @test boundary(NeumannCondition(f,id_b)) == id_b