comparison test/SbpOperators/boundary_conditions/boundary_condition_test.jl @ 1620:48596b2f7923 feature/boundary_conditions

Remove type parameter from BoundaryCondition
author Vidar Stiernström <vidar.stiernstrom@gmail.com>
date Mon, 10 Jun 2024 22:35:43 -0700
parents fca4a01d60c9
children 3714a391545a
comparison
equal deleted inserted replaced
1619:1937be9502a7 1620:48596b2f7923
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 BoundaryCondition{Lower}
19 @test DirichletCondition(g,id_n) isa BoundaryCondition{CartesianBoundary{2,Upper}}
20 @test DirichletCondition(g,id_l) isa DirichletCondition{Float64,Lower} 18 @test DirichletCondition(g,id_l) isa DirichletCondition{Float64,Lower}
21 @test NeumannCondition(f,id_b) isa NeumannCondition{<:Function} 19 @test NeumannCondition(f,id_b) isa NeumannCondition{<:Function,CartesianBoundary{3,Lower}}
22 end 20 end
23 21
24 @testset "boundary" begin 22 @testset "boundary" begin
25 @test boundary(DirichletCondition(g,id_l)) == id_l 23 @test boundary(DirichletCondition(g,id_l)) == id_l
26 @test boundary(NeumannCondition(f,id_b)) == id_b 24 @test boundary(NeumannCondition(f,id_b)) == id_b