Skip to content

Commit 3838ce0

Browse files
committed
automated design
1 parent 31c59e0 commit 3838ce0

File tree

10 files changed

+168
-50
lines changed

10 files changed

+168
-50
lines changed

project/createmap.jl

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,32 @@ function source_entry_to_configs(s::Pattern)
3535
return d
3636
end
3737

38+
function compute_mis_overhead(s)
39+
locs1, g1, pins1 = source_graph(s)
40+
locs2, g2, pins2 = mapped_graph(s)
41+
m1 = mis_compactify!(solve(Independence(g1, openvertices=pins1), "size max"))
42+
m2 = mis_compactify!(solve(Independence(g2, openvertices=pins2), "size max"))
43+
@test nv(g1) == length(locs1) && nv(g2) == length(locs2)
44+
sig, diff = UnitDiskMapping.is_diff_by_const(content.(m1), content.(m2))
45+
@assert sig
46+
return diff
47+
end
48+
49+
3850
# from bounary configuration to MISs.
3951
function generate_mapping(s::Pattern)
4052
d1 = mapped_entry_to_compact(s)
4153
d2 = source_entry_to_configs(s)
54+
diff = compute_mis_overhead(s)
4255
s = """function mapped_entry_to_compact(::$(typeof(s)))
4356
return Dict($(collect(d1)))
4457
end
4558
4659
function source_entry_to_configs(::$(typeof(s)))
4760
return Dict($(collect(d2)))
4861
end
62+
63+
mis_overhead(::$(typeof(s))) = $(-diff)
4964
"""
5065
end
5166

@@ -58,4 +73,5 @@ end
5873

5974
dump_mapping_to_julia(joinpath(@__DIR__, "..", "src", "extracting_results.jl"),
6075
(Cross{false}(), Cross{true}(),
61-
Turn(), WTurn(), Branch(), BranchFix(), TrivialTurn(), TCon(), BranchFixB()))
76+
Turn(), WTurn(), Branch(), BranchFix(), TrivialTurn(), TCon(), BranchFixB(),
77+
UnitDiskMapping.simplifier_ruleset...))

src/UnitDiskMapping.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ using Graphs
77
export UGrid, apply_crossing_gadgets!, apply_gadget!, embed_graph
88
export unapply_gadgets!, unmatch
99
export Pattern, Corner, Turn, Cross, source_graph, mapped_graph, TruncatedTurn
10-
export mapped_entry_to_compact, source_entry_to_configs, map_config_back
10+
export mapped_entry_to_compact, source_entry_to_configs, map_config_back, mis_overhead
1111

1212
include("utils.jl")
1313
include("gadgets.jl")
14+
include("simplifiers.jl")
1415
include("mapping.jl")
1516
include("extracting_results.jl")
1617
include("pathdecomposition/pathdecomposition.jl")

src/extracting_results.jl

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ function source_entry_to_configs(::Cross{false})
88
return Dict(Pair{Int64, Vector{BitVector}}[5 => [[1, 0, 0, 1, 0, 0, 1, 0, 1], [1, 0, 1, 0, 0, 0, 1, 0, 1]], 12 => [[0, 1, 0, 0, 1, 0, 1, 0, 1], [0, 0, 1, 0, 1, 0, 1, 0, 1]], 8 => [[0, 1, 0, 0, 1, 0, 0, 1, 0], [0, 0, 1, 0, 1, 0, 0, 1, 0], [0, 1, 0, 0, 1, 0, 1, 0, 0], [0, 0, 1, 0, 1, 0, 1, 0, 0]], 1 => [[1, 0, 0, 1, 0, 0, 0, 1, 0], [1, 0, 1, 0, 0, 0, 0, 1, 0], [1, 0, 0, 1, 0, 0, 1, 0, 0], [1, 0, 1, 0, 0, 0, 1, 0, 0]], 0 => [[0, 1, 0, 1, 0, 0, 0, 1, 0], [0, 1, 0, 1, 0, 0, 1, 0, 0]], 6 => [[0, 1, 0, 1, 0, 1, 0, 0, 1]], 11 => [[1, 0, 1, 0, 1, 1, 0, 1, 0]], 9 => [[1, 0, 1, 0, 1, 0, 0, 1, 0], [1, 0, 1, 0, 1, 0, 1, 0, 0]], 14 => [[0, 1, 0, 0, 1, 1, 0, 0, 1], [0, 0, 1, 0, 1, 1, 0, 0, 1]], 3 => [[1, 0, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 0, 1, 0, 1, 0]], 7 => [[1, 0, 0, 1, 0, 1, 0, 0, 1], [1, 0, 1, 0, 0, 1, 0, 0, 1]], 4 => [[0, 1, 0, 1, 0, 0, 1, 0, 1]], 13 => [[1, 0, 1, 0, 1, 0, 1, 0, 1]], 15 => [[1, 0, 1, 0, 1, 1, 0, 0, 1]], 2 => [[0, 1, 0, 1, 0, 1, 0, 1, 0]], 10 => [[0, 1, 0, 0, 1, 1, 0, 1, 0], [0, 0, 1, 0, 1, 1, 0, 1, 0]]])
99
end
1010

11+
mis_overhead(::Cross{false}) = -1.0
12+
1113

1214
function mapped_entry_to_compact(::Cross{true})
1315
return Dict([5 => 5, 12 => 12, 8 => 0, 1 => 0, 0 => 0, 6 => 6, 11 => 11, 9 => 9, 14 => 14, 3 => 3, 7 => 7, 4 => 0, 13 => 13, 15 => 15, 2 => 0, 10 => 10])
@@ -17,42 +19,52 @@ function source_entry_to_configs(::Cross{true})
1719
return Dict(Pair{Int64, Vector{BitVector}}[5 => [], 12 => [[0, 0, 1, 0, 0, 1]], 8 => [[0, 0, 1, 0, 1, 0]], 1 => [[1, 0, 0, 0, 1, 0]], 0 => [[0, 1, 0, 0, 1, 0]], 6 => [[0, 1, 0, 1, 0, 1]], 11 => [[1, 0, 1, 1, 0, 0]], 9 => [[1, 0, 1, 0, 1, 0]], 14 => [[0, 0, 1, 1, 0, 1]], 3 => [[1, 0, 0, 1, 0, 0]], 7 => [], 4 => [[0, 1, 0, 0, 0, 1]], 13 => [], 15 => [], 2 => [[0, 1, 0, 1, 0, 0]], 10 => [[0, 0, 1, 1, 0, 0]]])
1820
end
1921

22+
mis_overhead(::Cross{true}) = -1.0
23+
2024

2125
function mapped_entry_to_compact(::Turn)
2226
return Dict([0 => 0, 2 => 0, 3 => 3, 1 => 0])
2327
end
2428

2529
function source_entry_to_configs(::Turn)
26-
return Dict(Pair{Int64, Vector{BitVector}}[0 => [[0, 1, 0, 1, 0]], 2 => [[0, 0, 1, 0, 1], [0, 1, 0, 0, 1]], 3 => [[1, 0, 1, 0, 1]], 1 => [[1, 0, 1, 0, 0], [1, 0, 0, 1, 0]]])
30+
return Dict(Pair{Int64, Vector{BitVector}}[0 => [[0, 1, 0, 1, 0]], 2 => [[0, 0, 1, 0, 1], [0, 1, 0, 0, 1]], 3 => [[1, 0, 1, 0, 1]], 1 => [[1, 0, 0, 1, 0], [1, 0, 1, 0, 0]]])
2731
end
2832

33+
mis_overhead(::Turn) = -1.0
34+
2935

3036
function mapped_entry_to_compact(::WTurn)
3137
return Dict([0 => 0, 2 => 0, 3 => 3, 1 => 0])
3238
end
3339

3440
function source_entry_to_configs(::WTurn)
35-
return Dict(Pair{Int64, Vector{BitVector}}[0 => [[1, 0, 1, 0, 0]], 2 => [[0, 0, 0, 1, 1], [1, 0, 0, 0, 1]], 3 => [[0, 1, 0, 1, 1]], 1 => [[0, 1, 0, 1, 0], [0, 1, 1, 0, 0]]])
41+
return Dict(Pair{Int64, Vector{BitVector}}[0 => [[1, 0, 1, 0, 0]], 2 => [[1, 0, 0, 0, 1], [0, 0, 0, 1, 1]], 3 => [[0, 1, 0, 1, 1]], 1 => [[0, 1, 1, 0, 0], [0, 1, 0, 1, 0]]])
3642
end
3743

44+
mis_overhead(::WTurn) = -1.0
45+
3846

3947
function mapped_entry_to_compact(::Branch)
4048
return Dict([0 => 0, 4 => 0, 5 => 5, 6 => 6, 2 => 0, 7 => 7, 3 => 3, 1 => 0])
4149
end
4250

4351
function source_entry_to_configs(::Branch)
44-
return Dict(Pair{Int64, Vector{BitVector}}[0 => [[0, 1, 0, 1, 0, 0, 1, 0]], 4 => [[0, 0, 1, 0, 0, 1, 0, 1], [0, 1, 0, 0, 0, 1, 0, 1], [0, 1, 0, 1, 0, 0, 0, 1]], 5 => [[1, 0, 1, 0, 0, 1, 0, 1]], 6 => [[0, 0, 1, 0, 1, 1, 0, 1], [0, 1, 0, 0, 1, 1, 0, 1]], 2 => [[0, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 0, 1, 0, 1, 0], [0, 0, 1, 0, 1, 1, 0, 0], [0, 1, 0, 0, 1, 1, 0, 0]], 7 => [[1, 0, 1, 0, 1, 1, 0, 1]], 3 => [[1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 1, 0, 0]], 1 => [[1, 0, 1, 0, 0, 0, 1, 0], [1, 0, 1, 0, 0, 1, 0, 0], [1, 0, 0, 1, 0, 0, 1, 0]]])
52+
return Dict(Pair{Int64, Vector{BitVector}}[0 => [[0, 1, 0, 1, 0, 0, 1, 0]], 4 => [[0, 1, 0, 0, 0, 1, 0, 1], [0, 0, 1, 0, 0, 1, 0, 1], [0, 1, 0, 1, 0, 0, 0, 1]], 5 => [[1, 0, 1, 0, 0, 1, 0, 1]], 6 => [[0, 1, 0, 0, 1, 1, 0, 1], [0, 0, 1, 0, 1, 1, 0, 1]], 2 => [[0, 1, 0, 0, 1, 0, 1, 0], [0, 0, 1, 0, 1, 0, 1, 0], [0, 1, 0, 0, 1, 1, 0, 0], [0, 0, 1, 0, 1, 1, 0, 0]], 7 => [[1, 0, 1, 0, 1, 1, 0, 1]], 3 => [[1, 0, 1, 0, 1, 0, 1, 0], [1, 0, 1, 0, 1, 1, 0, 0]], 1 => [[1, 0, 1, 0, 0, 0, 1, 0], [1, 0, 1, 0, 0, 1, 0, 0], [1, 0, 0, 1, 0, 0, 1, 0]]])
4553
end
4654

55+
mis_overhead(::Branch) = -1.0
56+
4757

4858
function mapped_entry_to_compact(::BranchFix)
4959
return Dict([0 => 0, 2 => 2, 3 => 1, 1 => 1])
5060
end
5161

5262
function source_entry_to_configs(::BranchFix)
53-
return Dict(Pair{Int64, Vector{BitVector}}[0 => [[0, 0, 1, 0, 1, 0], [0, 1, 0, 0, 1, 0], [0, 1, 0, 1, 0, 0]], 2 => [[0, 1, 0, 1, 0, 1]], 3 => [[1, 0, 1, 0, 0, 1], [1, 0, 0, 1, 0, 1]], 1 => [[1, 0, 1, 0, 1, 0]]])
63+
return Dict(Pair{Int64, Vector{BitVector}}[0 => [[0, 1, 0, 0, 1, 0], [0, 0, 1, 0, 1, 0], [0, 1, 0, 1, 0, 0]], 2 => [[0, 1, 0, 1, 0, 1]], 3 => [[1, 0, 1, 0, 0, 1], [1, 0, 0, 1, 0, 1]], 1 => [[1, 0, 1, 0, 1, 0]]])
5464
end
5565

66+
mis_overhead(::BranchFix) = -1.0
67+
5668

5769
function mapped_entry_to_compact(::TrivialTurn)
5870
return Dict([0 => 0, 2 => 2, 3 => 3, 1 => 1])
@@ -62,6 +74,8 @@ function source_entry_to_configs(::TrivialTurn)
6274
return Dict(Pair{Int64, Vector{BitVector}}[0 => [[0, 0]], 2 => [[0, 1]], 3 => [], 1 => [[1, 0]]])
6375
end
6476

77+
mis_overhead(::TrivialTurn) = -0.0
78+
6579

6680
function mapped_entry_to_compact(::TCon)
6781
return Dict([0 => 0, 4 => 0, 5 => 5, 6 => 6, 2 => 2, 7 => 7, 3 => 3, 1 => 0])
@@ -71,6 +85,8 @@ function source_entry_to_configs(::TCon)
7185
return Dict(Pair{Int64, Vector{BitVector}}[0 => [[0, 0, 1, 0]], 4 => [[0, 0, 0, 1]], 5 => [[1, 0, 0, 1]], 6 => [[0, 1, 0, 1]], 2 => [[0, 1, 1, 0]], 7 => [], 3 => [], 1 => [[1, 0, 0, 0]]])
7286
end
7387

88+
mis_overhead(::TCon) = -0.0
89+
7490

7591
function mapped_entry_to_compact(::BranchFixB)
7692
return Dict([0 => 0, 2 => 2, 3 => 3, 1 => 1])
@@ -79,3 +95,16 @@ end
7995
function source_entry_to_configs(::BranchFixB)
8096
return Dict(Pair{Int64, Vector{BitVector}}[0 => [[0, 1, 0, 0], [0, 0, 1, 0]], 2 => [[0, 0, 1, 1]], 3 => [[1, 0, 0, 1]], 1 => [[1, 1, 0, 0]]])
8197
end
98+
99+
mis_overhead(::BranchFixB) = -1.0
100+
101+
102+
function mapped_entry_to_compact(::UnitDiskMapping.DanglingLeg)
103+
return Dict([0 => 0, 1 => 1])
104+
end
105+
106+
function source_entry_to_configs(::UnitDiskMapping.DanglingLeg)
107+
return Dict(Pair{Int64, Vector{BitVector}}[0 => [[1, 0, 0], [0, 1, 0]], 1 => [[1, 0, 1]]])
108+
end
109+
110+
mis_overhead(::UnitDiskMapping.DanglingLeg) = -1.0

src/gadgets.jl

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
abstract type Pattern end
88
"""
99
### Properties
10-
* xlim
11-
* ylim
10+
* size
11+
* cross_location
1212
* source: (locs, graph, pins/auto)
1313
* mapped: (locs, graph/auto, pins/auto)
1414
@@ -18,18 +18,6 @@ abstract type Pattern end
1818
3. ancillas does not appear at the boundary (not checked),
1919
"""
2020
abstract type CrossPattern <: Pattern end
21-
"""
22-
### Properties
23-
* xlim
24-
* ylim
25-
* source: (locs, graph/auto, pins/auto)
26-
* mapped: (locs, graph/auto, pins/auto)
27-
28-
### Requires
29-
1. equivalence in MIS-compact tropical tensor (you can check it with tests),
30-
2. ancillas does not appear at the boundary (not checked),
31-
"""
32-
abstract type SimplifyPattern <: Pattern end
3321

3422
export source_matrix, mapped_matrix
3523
function source_matrix(p::Pattern)
@@ -361,14 +349,14 @@ for T in [:RotatedGadget, :ReflectedGadget]
361349
center = cross_location(r.gadget)
362350
return map(loc->loc .+ _get_offset(r), _apply_transform(r, connect_locations(r.gadget), center))
363351
end
364-
@eval mis_overhead(p::$T) = mis_overhead(p.gadget)
365352
@eval vertex_overhead(p::$T) = vertex_overhead(p.gadget)
366353
@eval function mapped_entry_to_compact(r::$T)
367354
return mapped_entry_to_compact(r.gadget)
368355
end
369356
@eval function source_entry_to_configs(r::$T)
370357
return source_entry_to_configs(r.gadget)
371358
end
359+
@eval mis_overhead(p::$T) = mis_overhead(p.gadget)
372360
end
373361

374362
function _apply_transform(r::RotatedGadget, locs, center)
@@ -396,18 +384,11 @@ function _apply_transform(r::ReflectedGadget, locs, center)
396384
end
397385
end
398386

399-
export vertex_overhead, mis_overhead
387+
export vertex_overhead
400388
function vertex_overhead(p::Pattern)
401389
nv(mapped_graph(p)[2]) - nv(source_graph(p)[1])
402390
end
403391

404-
for T in [:Cross, :Turn, :WTurn, :Branch, :BranchFix, :BranchFixB]
405-
@eval mis_overhead(p::$T) = -1
406-
end
407-
for T in [:TrivialTurn, :TCon]
408-
@eval mis_overhead(p::$T) = 0
409-
end
410-
411392
export mapped_boundary_config, source_boundary_config
412393
function mapped_boundary_config(p::Pattern, config)
413394
_boundary_config(mapped_graph(p)[3], config)

src/simplifiers.jl

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
export @gg
2+
"""
3+
### Properties
4+
* size
5+
* source: (locs, graph/auto, pins/auto)
6+
* mapped: (locs, graph/auto, pins/auto)
7+
8+
### Requires
9+
1. equivalence in MIS-compact tropical tensor (you can check it with tests),
10+
2. ancillas does not appear at the boundary (not checked),
11+
"""
12+
abstract type SimplifyPattern <: Pattern end
13+
iscon(s::SimplifyPattern) = false
14+
function source_locations end
15+
function mapped_locations end
16+
function mapped_graph(p::SimplifyPattern)
17+
locs = mapped_locations(p)
18+
return locs, unitdisk_graph(locs, 1.5), vertices_on_boundary(locs, size(p)...)
19+
end
20+
function source_graph(p::SimplifyPattern)
21+
locs = source_locations(p)
22+
return locs, unitdisk_graph(locs, 1.5), vertices_on_boundary(locs, size(p)...)
23+
end
24+
function vertices_on_boundary(locs, m, n)
25+
findall(loc->loc[1]==1 || loc[1]==m || loc[2]==1 || loc[2]==n, locs)
26+
end
27+
28+
struct GridGraph
29+
size::Tuple{Int,Int}
30+
locations::Vector{Tuple{Int,Int}}
31+
end
32+
vertices_on_boundary(gg::GridGraph) = vertices_on_boundary(gg.locations, gg.size...)
33+
34+
function gridgraphfromstring(str::String)
35+
item_array = Vector{Bool}[]
36+
for line in split(str, "\n")
37+
if !isempty(line)
38+
push!(item_array, [item ("o", "") ? true : (@assert item (".", ""); false) for item in split(line, " ") if !isempty(item)])
39+
end
40+
end
41+
@assert all(==(length(item_array[1])), length.(item_array))
42+
mat = hcat(item_array...)'
43+
locs = findall(mat)
44+
return GridGraph(size(mat), locs)
45+
end
46+
47+
const simplifier_ruleset = SimplifyPattern[]
48+
49+
macro gg(expr)
50+
@assert expr.head == :(=)
51+
name = expr.args[1]
52+
pair = expr.args[2]
53+
@assert pair.head == :(call) && pair.args[1] == :(=>)
54+
g1 = gridgraphfromstring(pair.args[2])
55+
g2 = gridgraphfromstring(pair.args[3])
56+
@assert g1.size == g2.size
57+
@assert g1.locations[vertices_on_boundary(g1)] == g2.locations[vertices_on_boundary(g2)]
58+
return quote
59+
struct $(esc(name)) <: SimplifyPattern end
60+
Base.size(::$(esc(name))) = $(g1.size)
61+
$UnitDiskMapping.source_locations(::$(esc(name))) = $(g1.locations)
62+
$UnitDiskMapping.mapped_locations(::$(esc(name))) = $(g2.locations)
63+
push!($(simplifier_ruleset), $(esc(name))())
64+
$(esc(name))
65+
end
66+
end
67+
68+
@gg DanglingLeg =
69+
"""
70+
⋅ ⋅ ⋅
71+
⋅ ● ⋅
72+
⋅ ● ⋅
73+
⋅ ● ⋅
74+
"""=>"""
75+
⋅ ⋅ ⋅
76+
⋅ ⋅ ⋅
77+
⋅ ⋅ ⋅
78+
⋅ ● ⋅
79+
"""

src/utils.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,20 @@ function is_independent_set(g::SimpleGraph, config)
5252
return true
5353
end
5454

55+
function is_diff_by_const(t1::AbstractArray{T}, t2::AbstractArray{T}) where T <: Real
56+
x = NaN
57+
for (a, b) in zip(t1, t2)
58+
if isinf(a) && isinf(b)
59+
continue
60+
end
61+
if isinf(a) || isinf(b)
62+
return false, 0
63+
end
64+
if isnan(x)
65+
x = (a - b)
66+
elseif x != a - b
67+
return false, 0
68+
end
69+
end
70+
return true, x
71+
end

test/extracting_results.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ using UnitDiskMapping, Test
22
using GraphTensorNetworks
33

44
@testset "map results back" begin
5-
for s in UnitDiskMapping.crossing_ruleset
5+
for s in [UnitDiskMapping.crossing_ruleset..., UnitDiskMapping.simplifier_ruleset...]
66
_, g0, pins0 = source_graph(s)
77
locs, g, pins = mapped_graph(s)
88
d1 = mapped_entry_to_compact(s)

test/gadgets.jl

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,15 @@ using GraphTensorNetworks: content
44
using Graphs
55

66
@testset "gadgets" begin
7-
function is_diff_by_const(t1::AbstractArray{T}, t2::AbstractArray{T}) where T
8-
x = NaN
9-
for (a, b) in zip(t1, t2)
10-
if isinf(a) && isinf(b)
11-
continue
12-
end
13-
if isinf(a) || isinf(b)
14-
return false, 0
15-
end
16-
if isnan(x)
17-
x = (a - b)
18-
elseif x != a - b
19-
return false, 0
20-
end
21-
end
22-
return true, x
23-
end
24-
for s in UnitDiskMapping.crossing_ruleset
7+
for s in [UnitDiskMapping.crossing_ruleset..., UnitDiskMapping.simplifier_ruleset...]
258
println("Testing gadget:\n$s")
269
locs1, g1, pins1 = source_graph(s)
2710
locs2, g2, pins2 = mapped_graph(s)
2811
@assert length(locs1) == nv(g1)
2912
m1 = mis_compactify!(solve(Independence(g1, openvertices=pins1), "size max"))
3013
m2 = mis_compactify!(solve(Independence(g2, openvertices=pins2), "size max"))
3114
@test nv(g1) == length(locs1) && nv(g2) == length(locs2)
32-
sig, diff = is_diff_by_const(content.(m1), content.(m2))
15+
sig, diff = UnitDiskMapping.is_diff_by_const(content.(m1), content.(m2))
3316
@test diff == -mis_overhead(s)
3417
@test sig
3518
end

test/runtests.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@ end
1919

2020
@testset "path decomposition" begin
2121
include("pathdecomposition/pathdecomposition.jl")
22-
end
22+
end
23+
24+
@testset "simplifiers" begin
25+
include("simplifiers.jl")
26+
end

test/simplifiers.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using UnitDiskMapping, Test
2+
3+
@testset "constructor" begin
4+
p = UnitDiskMapping.DanglingLeg()
5+
@test size(p) == (4, 3)
6+
@test UnitDiskMapping.source_locations(p) == [(2,2), (3,2), (4,2)]
7+
@test UnitDiskMapping.mapped_locations(p) == [(4,2)]
8+
end

0 commit comments

Comments
 (0)