Mercurial > repos > public > sbplib_julia
changeset 1917:27a2d37ff3b4 feature/grids/manifolds
Merge feature/grids/multiblock_boundaries
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 04 Feb 2025 21:45:06 +0100 |
parents | e7f8d11c4670 (current diff) e68669552ed8 (diff) |
children | b1560da986f3 |
files | src/Grids/Grids.jl |
diffstat | 3 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
diff -r e7f8d11c4670 -r 27a2d37ff3b4 src/Grids/Grids.jl --- a/src/Grids/Grids.jl Mon Feb 03 15:39:26 2025 +0100 +++ b/src/Grids/Grids.jl Tue Feb 04 21:45:06 2025 +0100 @@ -64,6 +64,8 @@ export spacing export equidistant_grid +export MultiBlockBoundary + # MappedGrid export MappedGrid @@ -79,5 +81,6 @@ include("equidistant_grid.jl") include("zero_dim_grid.jl") include("mapped_grid.jl") +include("multiblockgrids.jl") end # module
diff -r e7f8d11c4670 -r 27a2d37ff3b4 src/Grids/multiblockgrids.jl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/Grids/multiblockgrids.jl Tue Feb 04 21:45:06 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()
diff -r e7f8d11c4670 -r 27a2d37ff3b4 test/Grids/multiblockgrids_test.jl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/Grids/multiblockgrids_test.jl Tue Feb 04 21:45:06 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