Mercurial > repos > public > sbplib_julia
comparison test/Grids/manifolds_test.jl @ 1937:755fc0907e99 feature/grids/manifolds
Add tetss for construcors and getters for UnstructuredAtlas
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 07 Feb 2025 13:44:12 +0100 |
parents | a7c9d04b57e0 |
children | 91d467b5444b |
comparison
equal
deleted
inserted
replaced
1936:a7c9d04b57e0 | 1937:755fc0907e99 |
---|---|
145 ]) | 145 ]) |
146 end | 146 end |
147 end | 147 end |
148 | 148 |
149 @testset "UnstructuredAtlas" begin | 149 @testset "UnstructuredAtlas" begin |
150 @testset "Constructors" begin | |
151 c1 = Chart(identity, unitsquare()) | |
152 c2 = Chart(x->2x, unitsquare()) | |
153 cn = [ | |
154 (MultiBlockBoundary{1, south}(), MultiBlockBoundary{2, south}()), | |
155 (MultiBlockBoundary{2, south}(), MultiBlockBoundary{3, south}()), | |
156 (MultiBlockBoundary{3, east}(), MultiBlockBoundary{1, east}()), | |
157 ] | |
158 | |
159 @test UnstructuredAtlas([c1, c1, c1], cn) isa UnstructuredAtlas | |
160 @test UnstructuredAtlas([c1, c2, c1, c2], cn) isa UnstructuredAtlas | |
161 | |
162 | |
163 cn = @SVector[ | |
164 (MultiBlockBoundary{1, south}(), MultiBlockBoundary{2, south}()), | |
165 (MultiBlockBoundary{2, south}(), MultiBlockBoundary{3, south}()), | |
166 (MultiBlockBoundary{3, east}(), MultiBlockBoundary{1, east}()), | |
167 ] | |
168 @test UnstructuredAtlas(@SVector[c1, c1, c1], cn) isa UnstructuredAtlas | |
169 @test UnstructuredAtlas(@SVector[c1, c2, c1, c2], cn) isa UnstructuredAtlas | |
170 end | |
171 | |
172 @testset "Getters" begin | |
173 c = Chart(identity, unitsquare()) | |
174 cn = [ | |
175 (MultiBlockBoundary{1, south}(), MultiBlockBoundary{2, south}()), | |
176 (MultiBlockBoundary{2, south}(), MultiBlockBoundary{3, south}()), | |
177 (MultiBlockBoundary{3, east}(), MultiBlockBoundary{1, east}()), | |
178 ] | |
179 | |
180 a = UnstructuredAtlas([c, c, c], cn) | |
181 | |
182 @test charts(a) == [c,c,c] | |
183 @test connections(a) == cn | |
184 end | |
185 | |
150 @testset "boundaries" begin | 186 @testset "boundaries" begin |
151 @test_broken false | 187 @test_broken false |
152 end | 188 end |
153 end | 189 end |