diff src/Grids/equidistant_grid.jl @ 1650:8250cf5a3ce9 feature/grids/manifolds

Merge feature/grids/curvilinear
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 26 Jun 2024 12:42:28 +0200
parents e213bd857f3f b02917bcd7d5
children 13a7a4ff49e3
line wrap: on
line diff
--- a/src/Grids/equidistant_grid.jl	Wed Jun 26 11:06:32 2024 +0200
+++ b/src/Grids/equidistant_grid.jl	Wed Jun 26 12:42:28 2024 +0200
@@ -107,6 +107,9 @@
 behaviors.
 """
 function equidistant_grid(limit_lower, limit_upper, dims::Vararg{Int})
+    if !(length(limit_lower) == length(limit_upper) == length(dims))
+        throw(ArgumentError("All arguments must be of the same length"))
+    end
     gs = map(equidistant_grid, limit_lower, limit_upper, dims)
     return TensorGrid(gs...)
 end