@@ -35,8 +35,6 @@ function tet_x_plane!(
3535 tol = 0.0
3636 )
3737
38- debug = false
39-
4038 # If all nodes lie on one side of the plane, no intersection
4139 @fastmath if (
4240 mapreduce (a -> a < - tol, * , planeq_values) ||
@@ -48,7 +46,6 @@ function tet_x_plane!(
4846 # evaluation of the plane equation
4947 intersection_counter = 0
5048 prohibited_list = @MArray zeros (Bool, 4 )
51- debug && @info node_indices
5249 @inbounds @simd for n1 in 1 : 3
5350 N1 = node_indices[n1]
5451 @inbounds @fastmath @simd for n2 in (n1 + 1 ): 4
@@ -65,11 +62,9 @@ function tet_x_plane!(
6562 ixcoord[2 , intersection_counter] = pointlist[2 , N1] + t * (pointlist[2 , N2] - pointlist[2 , N1])
6663 ixcoord[3 , intersection_counter] = pointlist[3 , N1] + t * (pointlist[3 , N2] - pointlist[3 , N1])
6764 ixvalues[intersection_counter] = function_values[N1] + t * (function_values[N2] - function_values[N1])
68- debug && @show ixcoord
6965 end
7066 end
7167 end
72- debug && @info " amount of intersections: " intersection_counter
7368 return intersection_counter
7469end
7570
@@ -418,28 +413,3 @@ function marching_triangles(
418413 end
419414 return points, adjacencies, values
420415end
421-
422-
423- """
424- Function to estimate amount of intersections of plane and tetrahedron
425- This was used as a testing function and is not used otherwise
426- """
427-
428- function getAmountOfIntersections (planeq_values, tol)
429- prohibitedList = @MArray zeros (Bool, 4 )
430- amountOfIntersections = 0
431- for i in 1 : (length (planeq_values) - 1 )
432- for j in (i + 1 ): length (planeq_values)
433- #= if planeq_values[n1] != planeq_values[n2] &&
434- planeq_values[n1] * planeq_values[n2] < tol &&
435- abs(planeq_values[n2]) > tol =#
436- if abs (planeq_values[i] - planeq_values[j]) > tol && prohibitedList[i] == false && prohibitedList[j] == false
437- amountOfIntersections += 1
438- if planeq_values[j] == 0
439- prohibitedList[j] = true
440- end
441- end
442- end
443- end
444- return amountOfIntersections
445- end
0 commit comments