comparison src/Grids/multiblockgrids.jl @ 2017:ea2a15454cf2 feature/grids/multiblock_grids

Add connectio(...) to simplify the creation of grid connection tuples
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 12 Mar 2025 09:32:32 +0100
parents e68669552ed8
children a3ffc3202813
comparison
equal deleted inserted replaced
2016:e17d90763a3f 2017:ea2a15454cf2
5 `BID` which boundary on that grid. 5 `BID` which boundary on that grid.
6 """ 6 """
7 struct MultiBlockBoundary{N, BID} <: BoundaryIdentifier end 7 struct MultiBlockBoundary{N, BID} <: BoundaryIdentifier end
8 grid_id(::MultiBlockBoundary{N, BID}) where {N, BID} = N 8 grid_id(::MultiBlockBoundary{N, BID}) where {N, BID} = N
9 boundary_id(::MultiBlockBoundary{N, BID}) where {N, BID} = BID() 9 boundary_id(::MultiBlockBoundary{N, BID}) where {N, BID} = BID()
10
11
12 function connection(k1, b1::BoundaryIdentifier, k2, b2::BoundaryIdentifier)
13 return (
14 MultiBlockBoundary{k1,typeof(b1)}(),
15 MultiBlockBoundary{k2,typeof(b2)}(),
16 )
17 end
18
19 connection(t::Tuple) = connection(t...)