|
1 | 1 | function _alias_error_msg(name, N) |
2 | | - "Performing a $name integral on a geometry with $N parametric dimensions not supported." |
| 2 | + "$name integrals not supported on a geometry without exactly $N parametric dimensions." |
3 | 3 | end |
4 | 4 |
|
5 | 5 | ################################################################################ |
@@ -27,8 +27,8 @@ function lineintegral( |
27 | 27 | rule::IntegrationRule = GaussKronrod(); |
28 | 28 | kwargs... |
29 | 29 | ) |
30 | | - if (N = Meshes.paramdim(geometry)) != 1 |
31 | | - throw(ArgumentError(_alias_error_msg("line", N))) |
| 30 | + if !Meshes.iscurve(geometry) |
| 31 | + throw(ArgumentError(_alias_error_msg("Line", 1))) |
32 | 32 | end |
33 | 33 |
|
34 | 34 | return integral(f, geometry, rule; kwargs...) |
@@ -59,8 +59,8 @@ function surfaceintegral( |
59 | 59 | rule::IntegrationRule = HAdaptiveCubature(); |
60 | 60 | kwargs... |
61 | 61 | ) |
62 | | - if (N = Meshes.paramdim(geometry)) != 2 |
63 | | - throw(ArgumentError(_alias_error_msg("surface", N))) |
| 62 | + if !Meshes.issurface(geometry) |
| 63 | + throw(ArgumentError(_alias_error_msg("Surface", 2))) |
64 | 64 | end |
65 | 65 |
|
66 | 66 | return integral(f, geometry, rule; kwargs...) |
@@ -91,8 +91,8 @@ function volumeintegral( |
91 | 91 | rule::IntegrationRule = HAdaptiveCubature(); |
92 | 92 | kwargs... |
93 | 93 | ) |
94 | | - if (N = Meshes.paramdim(geometry)) != 3 |
95 | | - throw(ArgumentError(_alias_error_msg("volume", N))) |
| 94 | + if !Meshes.issolid(geometry) |
| 95 | + throw(ArgumentError(_alias_error_msg("Volume", 3))) |
96 | 96 | end |
97 | 97 |
|
98 | 98 | return integral(f, geometry, rule; kwargs...) |
|
0 commit comments