@@ -443,28 +443,26 @@ end
443443end
444444
445445@testitem " Meshes.Frustum" setup= [Combinations] begin
446- if pkgversion (Meshes) >= v " 0.52.12"
447- # Geometry
448- r = 2.5 u " m"
449- h = 3.5 u " m"
450- origin = Point (0 , 0 , 0 )
451- midpoint = Point (0.0 u " m" , 0.0 u " m" , 0.5 * h)
452- apex = Point (0.0 u " m" , 0.0 u " m" , h)
453- ẑ = Vec (0 , 0 , 1 )
454- xy_plane = Plane (origin, ẑ)
455- base = Disk (xy_plane, r)
456- mid_plane = Plane (midpoint, ẑ)
457- mid_disk = Disk (mid_plane, 0.5 * r)
458- frustum = Frustum (base, mid_disk)
459-
460- # Integrand & Solution
461- integrand (p) = 1.0 u " A"
462- solution = (7 // 8 ) * (π * r^ 2 * h / 3 ) * u " A"
463-
464- # Package and run tests
465- testable = TestableGeometry (integrand, frustum, solution)
466- runtests (testable)
467- end
446+ # Geometry
447+ r = 2.5 u " m"
448+ h = 3.5 u " m"
449+ origin = Point (0 , 0 , 0 )
450+ midpoint = Point (0.0 u " m" , 0.0 u " m" , 0.5 * h)
451+ apex = Point (0.0 u " m" , 0.0 u " m" , h)
452+ ẑ = Vec (0 , 0 , 1 )
453+ xy_plane = Plane (origin, ẑ)
454+ base = Disk (xy_plane, r)
455+ mid_plane = Plane (midpoint, ẑ)
456+ mid_disk = Disk (mid_plane, 0.5 * r)
457+ frustum = Frustum (base, mid_disk)
458+
459+ # Integrand & Solution
460+ integrand (p) = 1.0 u " A"
461+ solution = (7 // 8 ) * (π * r^ 2 * h / 3 ) * u " A"
462+
463+ # Package and run tests
464+ testable = TestableGeometry (integrand, frustum, solution)
465+ runtests (testable)
468466end
469467
470468@testitem " Meshes.FrustumSurface" setup= [Combinations] begin
@@ -612,23 +610,21 @@ end
612610end
613611
614612@testitem " Meshes.Pyramid" setup= [Combinations] begin
615- if pkgversion (Meshes) >= v " 0.52.12"
616- # Geometry
617- a = Point (- 1 , - 1 , 0 )
618- b = Point (1 , - 1 , 0 )
619- c = Point (1 , 1 , 0 )
620- d = Point (- 1 , 1 , 0 )
621- apex = Point (0 , 0 , 1 )
622- pyramid = Pyramid (a, b, c, d, apex)
623- # Integrand & Solution
624- integrand (p) = 1.0 u " A"
625- w = norm (b - a)
626- h = norm (d - a)
627- solution = (1 // 3 ) * w * h * u " A*m"
628- # Package and run tests
629- testable = TestableGeometry (integrand, pyramid, solution)
630- runtests (testable)
631- end
613+ # Geometry
614+ a = Point (- 1 , - 1 , 0 )
615+ b = Point (1 , - 1 , 0 )
616+ c = Point (1 , 1 , 0 )
617+ d = Point (- 1 , 1 , 0 )
618+ apex = Point (0 , 0 , 1 )
619+ pyramid = Pyramid (a, b, c, d, apex)
620+ # Integrand & Solution
621+ integrand (p) = 1.0 u " A"
622+ w = norm (b - a)
623+ h = norm (d - a)
624+ solution = (1 // 3 ) * w * h * u " A*m"
625+ # Package and run tests
626+ testable = TestableGeometry (integrand, pyramid, solution)
627+ runtests (testable)
632628end
633629
634630@testitem " Meshes.Quadrangle" setup= [Combinations] begin
@@ -887,25 +883,23 @@ end
887883end
888884
889885@testitem " Meshes.Wedge" setup= [Combinations] begin
890- if pkgversion (Meshes) >= v " 0.52.12"
891- # Geometry
892- a₀ = Point (0 , 0 , 0 )
893- b₀ = Point (1 , 0 , 0 )
894- c₀ = Point (0 , 1 , 0 )
895- a₁ = Point (0 , 0 , 1 )
896- b₁ = Point (1 , 0 , 1 )
897- c₁ = Point (0 , 1 , 1 )
898- wedge = Wedge (a₀, b₀, c₀, a₁, b₁, c₁)
899-
900- # Integrand & Solution
901- function integrand (p:: Meshes.Point )
902- x, y, z = ustrip .(u " m" , to (p))
903- (x + 2 y + 3 z) * u " A"
904- end
905- solution = (5 // 4 ) * u " A*m^3"
906-
907- # Package and run tests
908- testable = TestableGeometry (integrand, wedge, solution)
909- runtests (testable)
886+ # Geometry
887+ a₀ = Point (0 , 0 , 0 )
888+ b₀ = Point (1 , 0 , 0 )
889+ c₀ = Point (0 , 1 , 0 )
890+ a₁ = Point (0 , 0 , 1 )
891+ b₁ = Point (1 , 0 , 1 )
892+ c₁ = Point (0 , 1 , 1 )
893+ wedge = Wedge (a₀, b₀, c₀, a₁, b₁, c₁)
894+
895+ # Integrand & Solution
896+ function integrand (p:: Meshes.Point )
897+ x, y, z = ustrip .(u " m" , to (p))
898+ (x + 2 y + 3 z) * u " A"
910899 end
900+ solution = (5 // 4 ) * u " A*m^3"
901+
902+ # Package and run tests
903+ testable = TestableGeometry (integrand, wedge, solution)
904+ runtests (testable)
911905end
0 commit comments