Mercurial > repos > public > sbplib_julia
diff src/Grids/mapped_grid.jl @ 1744:c38eead8be17 feature/grids/curvilinear
Add checks for the size of the jacobian
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 11 Sep 2024 14:11:03 +0200 |
parents | 49bd573ab07f |
children | 2f7974367cd3 |
line wrap: on
line diff
--- a/src/Grids/mapped_grid.jl Wed Sep 11 13:46:33 2024 +0200 +++ b/src/Grids/mapped_grid.jl Wed Sep 11 14:11:03 2024 +0200 @@ -8,6 +8,12 @@ throw(ArgumentError("Sizes must match")) end + if size(first(jacobian)) != (length(first(physicalcoordinates)),D) + @show size(first(jacobian)) + @show (length(first(physicalcoordinates)),D) + throw(ArgumentError("The size of the jacobian must match the dimensions of the grid and coordinates")) + end + return new{T,D,GT,CT,JT}(logicalgrid, physicalcoordinates, jacobian) end end