diff +grid/Curvilinear.m @ 448:692bf61385c0 feature/grids

Better error message
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 09 May 2017 14:47:52 +0200
parents 4f935415700e
children
line wrap: on
line diff
--- a/+grid/Curvilinear.m	Wed Apr 12 13:24:16 2017 +0200
+++ b/+grid/Curvilinear.m	Tue May 09 14:47:52 2017 +0200
@@ -19,6 +19,9 @@
 
             % If mapping is a function evaluate it
             if isa(mapping, 'function_handle')
+                if nargin(mapping) ~= length(varargin)
+                    error('The dimension of the mapping does not match the dimension of the logical coordinates')
+                end
                 mapping = grid.evalOn(obj.logic, mapping);
             end