Mercurial > repos > public > sbplib_julia
changeset 1956:b0fcb29e3620 feature/grids/multiblock_boundaries
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 11 Feb 2025 08:54:18 +0100 |
parents | e68669552ed8 (diff) e4500727f435 (current diff) |
children | 7da0ce15b3c1 |
files | src/Grids/Grids.jl |
diffstat | 3 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Grids/Grids.jl Tue Feb 11 08:53:09 2025 +0100 +++ b/src/Grids/Grids.jl Tue Feb 11 08:54:18 2025 +0100 @@ -55,6 +55,8 @@ export spacing export equidistant_grid +export MultiBlockBoundary + # MappedGrid export MappedGrid @@ -69,5 +71,6 @@ include("equidistant_grid.jl") include("zero_dim_grid.jl") include("mapped_grid.jl") +include("multiblockgrids.jl") end # module
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Grids/multiblockgrids.jl Tue Feb 11 08:54:18 2025 +0100 @@ -0,0 +1,9 @@ +""" + MultiBlockBoundary{N, BID} <: BoundaryIdentifier + +A boundary identifier for a multiblock grids. `N` Specifies which grid and +`BID` which boundary on that grid. +""" +struct MultiBlockBoundary{N, BID} <: BoundaryIdentifier end +grid_id(::MultiBlockBoundary{N, BID}) where {N, BID} = N +boundary_id(::MultiBlockBoundary{N, BID}) where {N, BID} = BID()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/Grids/multiblockgrids_test.jl Tue Feb 11 08:54:18 2025 +0100 @@ -0,0 +1,10 @@ +using Diffinitive.Grids + +@testset "MultiBlockBoundary" begin + @test MultiBlockBoundary{1,UpperBoundary}() isa BoundaryIdentifier + + @test grid_id(MultiBlockBoundary{1,UpperBoundary}()) == 1 + + @test boundary_id(MultiBlockBoundary{1,UpperBoundary}()) == UpperBoundary() + +end