Mercurial > repos > public > sbplib_julia
annotate 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 |
| rev | line source |
|---|---|
| 1912 | 1 """ |
| 2 MultiBlockBoundary{N, BID} <: BoundaryIdentifier | |
| 3 | |
| 4 A boundary identifier for a multiblock grids. `N` Specifies which grid and | |
| 5 `BID` which boundary on that grid. | |
| 6 """ | |
| 7 struct MultiBlockBoundary{N, BID} <: BoundaryIdentifier end | |
| 8 grid_id(::MultiBlockBoundary{N, BID}) where {N, BID} = N | |
| 9 boundary_id(::MultiBlockBoundary{N, BID}) where {N, BID} = BID() | |
|
2017
ea2a15454cf2
Add connectio(...) to simplify the creation of grid connection tuples
Jonatan Werpers <jonatan@werpers.com>
parents:
1912
diff
changeset
|
10 |
|
ea2a15454cf2
Add connectio(...) to simplify the creation of grid connection tuples
Jonatan Werpers <jonatan@werpers.com>
parents:
1912
diff
changeset
|
11 |
|
ea2a15454cf2
Add connectio(...) to simplify the creation of grid connection tuples
Jonatan Werpers <jonatan@werpers.com>
parents:
1912
diff
changeset
|
12 function connection(k1, b1::BoundaryIdentifier, k2, b2::BoundaryIdentifier) |
|
ea2a15454cf2
Add connectio(...) to simplify the creation of grid connection tuples
Jonatan Werpers <jonatan@werpers.com>
parents:
1912
diff
changeset
|
13 return ( |
|
ea2a15454cf2
Add connectio(...) to simplify the creation of grid connection tuples
Jonatan Werpers <jonatan@werpers.com>
parents:
1912
diff
changeset
|
14 MultiBlockBoundary{k1,typeof(b1)}(), |
|
ea2a15454cf2
Add connectio(...) to simplify the creation of grid connection tuples
Jonatan Werpers <jonatan@werpers.com>
parents:
1912
diff
changeset
|
15 MultiBlockBoundary{k2,typeof(b2)}(), |
|
ea2a15454cf2
Add connectio(...) to simplify the creation of grid connection tuples
Jonatan Werpers <jonatan@werpers.com>
parents:
1912
diff
changeset
|
16 ) |
|
ea2a15454cf2
Add connectio(...) to simplify the creation of grid connection tuples
Jonatan Werpers <jonatan@werpers.com>
parents:
1912
diff
changeset
|
17 end |
|
ea2a15454cf2
Add connectio(...) to simplify the creation of grid connection tuples
Jonatan Werpers <jonatan@werpers.com>
parents:
1912
diff
changeset
|
18 |
|
ea2a15454cf2
Add connectio(...) to simplify the creation of grid connection tuples
Jonatan Werpers <jonatan@werpers.com>
parents:
1912
diff
changeset
|
19 connection(t::Tuple) = connection(t...) |
