Mercurial > repos > public > sbplib_julia
comparison test/Grids/multiblockgrids_test.jl @ 2018:a3ffc3202813 feature/grids/multiblock_grids
Start implementation of MultiBlockGrid
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Wed, 12 Mar 2025 09:34:00 +0100 |
| parents | ea2a15454cf2 |
| children | fb2dc185c197 |
comparison
equal
deleted
inserted
replaced
| 2017:ea2a15454cf2 | 2018:a3ffc3202813 |
|---|---|
| 1 using Diffinitive.Grids | 1 using Diffinitive.Grids |
| 2 | |
| 3 @testset "MultiBlockGrid" begin | |
| 4 @test MultiBlockGrid <: Grid | |
| 5 | |
| 6 @testset "Constructors" begin | |
| 7 g₁ = equidistant_grid(0,1,5) | |
| 8 g₂ = equidistant_grid(0,1,5) | |
| 9 g₃ = equidistant_grid(0,1,5) | |
| 10 | |
| 11 | |
| 12 # Vector | |
| 13 C = connection.([ | |
| 14 (1, UpperBoundary(), 2, LowerBoundary()), | |
| 15 (2, UpperBoundary(), 3, LowerBoundary()), | |
| 16 ]) | |
| 17 | |
| 18 @test MultiBlockGrid([g₁,g₂,g₃], C) isa Grid{Float64,1} | |
| 19 @test MultiBlockGrid([g₁,g₂,g₃], C) isa MultiBlockGrid{Float64,1} | |
| 20 | |
| 21 # Dictionary | |
| 22 @test MultiBlockGrid(Dict(:a=>g₁, :b=>g₂), [connection(:a, UpperBoundary(), :b, LowerBoundary())]) isa MultiBlockGrid{Float64,1} | |
| 23 end | |
| 24 end | |
| 25 | |
| 2 | 26 |
| 3 @testset "MultiBlockBoundary" begin | 27 @testset "MultiBlockBoundary" begin |
| 4 @test MultiBlockBoundary{1,UpperBoundary}() isa BoundaryIdentifier | 28 @test MultiBlockBoundary{1,UpperBoundary}() isa BoundaryIdentifier |
| 5 | 29 |
| 6 @test grid_id(MultiBlockBoundary{1,UpperBoundary}()) == 1 | 30 @test grid_id(MultiBlockBoundary{1,UpperBoundary}()) == 1 |
