@@ -105,13 +105,14 @@ end
105
105
106
106
@testset " Simplexgrid (arrays 2d)" begin
107
107
function test_simplesquare (; kwargs... )
108
- grid = simplexgrid (Triangulate;
109
- points = [0 0 ; 0 1 ; 1 1 ; 1 0 ]' ,
110
- bfaces = [1 2 ; 2 3 ; 3 4 ; 4 1 ]' ,
111
- bfaceregions = [1 , 2 , 3 , 4 ],
112
- regionpoints = [0.5 0.5 ;]' ,
113
- regionnumbers = [1 ],
114
- regionvolumes = [0.01 ], kwargs... )
108
+ tio= SimplexGridFactory. triangulateio (Triangulate,
109
+ points = [0 0 ; 0 1 ; 1 1 ; 1 0 ]' ,
110
+ bfaces = [1 2 ; 2 3 ; 3 4 ; 4 1 ]' ,
111
+ bfaceregions = [1 , 2 , 3 , 4 ],
112
+ regionpoints = [0.5 0.5 ;]' ,
113
+ regionnumbers = [1 ],
114
+ regionvolumes = [0.01 ])
115
+ grid = simplexgrid (SimplexGridFactory. TriangulateType,Triangulate, tio; kwargs... )
115
116
end
116
117
117
118
@test testgrid (test_simplesquare (), (89 , 144 , 32 ))
@@ -183,27 +184,27 @@ end
183
184
184
185
@testset " Simplexgrid (arrays 3d)" begin
185
186
function test_simplecube (; kwargs... )
186
- grid = simplexgrid (TetGen;
187
- points = [0 0 0 ;
188
- 1 0 0 ;
189
- 1 1 0 ;
190
- 0 1 0 ;
191
- 0 0 1 ;
192
- 1 0 1 ;
193
- 1 1 1 ;
194
- 0 1 1 ]' , bfaces = [1 2 3 4 ;
195
- 5 6 7 8 ;
196
- 1 2 6 5 ;
197
- 2 3 7 6 ;
198
- 3 4 8 7 ;
199
- 4 1 5 8 ]' ,
200
- bfaceregions = [i for i = 1 : 6 ],
201
- regionpoints = [0.5 0.5 0.5 ]' ,
202
- regionnumbers = [1 ],
203
- regionvolumes = [0.01 ],
204
- kwargs... )
187
+ tio = SimplexGridFactory . tetgenio (TetGen,
188
+ points = [0 0 0 ;
189
+ 1 0 0 ;
190
+ 1 1 0 ;
191
+ 0 1 0 ;
192
+ 0 0 1 ;
193
+ 1 0 1 ;
194
+ 1 1 1 ;
195
+ 0 1 1 ]' , bfaces = [1 2 3 4 ;
196
+ 5 6 7 8 ;
197
+ 1 2 6 5 ;
198
+ 2 3 7 6 ;
199
+ 3 4 8 7 ;
200
+ 4 1 5 8 ]' ,
201
+ bfaceregions = [i for i = 1 : 6 ],
202
+ regionpoints = [0.5 0.5 0.5 ]' ,
203
+ regionnumbers = [1 ],
204
+ regionvolumes = [0.01 ])
205
+ grid = simplexgrid (SimplexGridFactory . TetGenType,TetGen, tio; kwargs... )
205
206
end
206
-
207
+
207
208
@test testgrid (test_simplecube (), (109 , 286 , 198 ))
208
209
@test testgrid (test_simplecube (; flags = " pAaqQD" ), (109 , 286 , 198 ))
209
210
@test testgrid (test_simplecube (; maxvolume = 0.05 ), (50 , 68 , 96 ))
0 commit comments