Mercurial > repos > public > sbplib_julia
comparison test/SbpOperators/boundary_conditions/boundary_condition_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.Grids | 3 using Diffinitive.Grids |
4 using Sbplib.RegionIndices | 4 using Diffinitive.RegionIndices |
5 using Sbplib.SbpOperators | 5 using Diffinitive.SbpOperators |
6 | 6 |
7 @testset "BoundaryCondition" begin | 7 @testset "BoundaryCondition" begin |
8 grid_1d = equidistant_grid(0.0, 1.0, 11) | 8 grid_1d = equidistant_grid(0.0, 1.0, 11) |
9 grid_2d = equidistant_grid((0.0, 0.0), (1.0,1.0), 11, 15) | 9 grid_2d = equidistant_grid((0.0, 0.0), (1.0,1.0), 11, 15) |
10 grid_3d = equidistant_grid((0.0, 0.0, 0.0), (1.0,1.0, 1.0), 11, 15, 13) | 10 grid_3d = equidistant_grid((0.0, 0.0, 0.0), (1.0,1.0, 1.0), 11, 15, 13) |
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 |