@@ -268,6 +268,9 @@ Input:
268
268
func: function on the grid nodes to be evaluated
269
269
lines: vector of line definitions [a,b,c], s.t., ax + by + c = 0 defines a line
270
270
levels: vector of levels for the iso-surface
271
+ Tc: scalar type of coordinates
272
+ Tp: vector type of coordinates
273
+ Tv: scalar type of function values
271
274
272
275
Output:
273
276
points: vector of 2D points of the intersections of the grid with the iso-surfaces or lines
@@ -277,33 +280,35 @@ Output:
277
280
Note that passing both nonempty `lines` and `levels` will create a result with both types of points mixed.
278
281
"""
279
282
function marching_triangles (
280
- coord:: Matrix{Tc } ,
283
+ coord:: Matrix{T } ,
281
284
cellnodes:: Matrix{Ti} ,
282
285
func,
283
286
lines,
284
287
levels;
285
- Tv = Float32,
286
- Tp = SVector{2 , Tv}
287
- ) where {Tc <: Number , Ti <: Number }
288
- return marching_triangles ([coord], [cellnodes], [func], lines, levels; Tv, Tp)
288
+ Tc = T,
289
+ Tp = SVector{2 , Tc},
290
+ Tv = Float64
291
+ ) where {T <: Number , Ti <: Number }
292
+ return marching_triangles ([coord], [cellnodes], [func], lines, levels; Tc, Tp, Tv)
289
293
end
290
294
291
295
292
296
"""
293
297
$(SIGNATURES)
294
298
295
299
296
- Variant of `marching_tetrahedra ` with multiple grid input
300
+ Variant of `marching_triangles ` with multiple grid input
297
301
"""
298
302
function marching_triangles (
299
- coords:: Vector{Matrix{Tc }} ,
303
+ coords:: Vector{Matrix{T }} ,
300
304
cellnodes:: Vector{Matrix{Ti}} ,
301
305
funcs,
302
306
lines,
303
307
levels;
304
- Tv = Float32,
305
- Tp = SVector{2 , Tv},
306
- ) where {Tc <: Number , Ti <: Number }
308
+ Tc = T,
309
+ Tp = SVector{2 , Tc},
310
+ Tv = Float64
311
+ ) where {T <: Number , Ti <: Number }
307
312
points = Vector {Tp} (undef, 0 )
308
313
values = Vector {Tv} (undef, 0 )
309
314
adjacencies = Vector {SVector{2, Ti}} (undef, 0 )
0 commit comments