diff src/Grids/equidistant_grid.jl @ 1651:707fc9761c2b feature/sbp_operators/laplace_curvilinear

Merge feature/grids/manifolds
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 26 Jun 2024 12:47:26 +0200
parents 8250cf5a3ce9
children 13a7a4ff49e3
line wrap: on
line diff
--- a/src/Grids/equidistant_grid.jl	Wed Jun 26 12:36:41 2024 +0200
+++ b/src/Grids/equidistant_grid.jl	Wed Jun 26 12:47:26 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
@@ -129,6 +132,7 @@
 
 
 equidistant_grid(hb::HyperBox, dims::Vararg{Int}) = equidistant_grid(hb.a, hb.b, dims...)
+# TODO: One dimensional grids shouldn't have vector eltype right?, Change here or in HyperBox?
 
 function equidistant_grid(c::Chart, dims::Vararg{Int})
     lg = equidistant_grid(parameterspace(c), dims...)