Mercurial > repos > public > sbplib_julia
diff 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 |
line wrap: on
line diff
--- a/test/Grids/multiblockgrids_test.jl Wed Mar 12 09:32:32 2025 +0100 +++ b/test/Grids/multiblockgrids_test.jl Wed Mar 12 09:34:00 2025 +0100 @@ -1,5 +1,29 @@ using Diffinitive.Grids +@testset "MultiBlockGrid" begin + @test MultiBlockGrid <: Grid + + @testset "Constructors" begin + g₁ = equidistant_grid(0,1,5) + g₂ = equidistant_grid(0,1,5) + g₃ = equidistant_grid(0,1,5) + + + # Vector + C = connection.([ + (1, UpperBoundary(), 2, LowerBoundary()), + (2, UpperBoundary(), 3, LowerBoundary()), + ]) + + @test MultiBlockGrid([g₁,g₂,g₃], C) isa Grid{Float64,1} + @test MultiBlockGrid([g₁,g₂,g₃], C) isa MultiBlockGrid{Float64,1} + + # Dictionary + @test MultiBlockGrid(Dict(:a=>g₁, :b=>g₂), [connection(:a, UpperBoundary(), :b, LowerBoundary())]) isa MultiBlockGrid{Float64,1} + end +end + + @testset "MultiBlockBoundary" begin @test MultiBlockBoundary{1,UpperBoundary}() isa BoundaryIdentifier
