comparison +grid/lebedev2d.m @ 1273:cf542444f022 feature/poroelastic

Correct error messages in lebedev2d
author Martin Almquist <malmquist@stanford.edu>
date Mon, 01 Jun 2020 19:00:31 -0700
parents 117bc4542b61
children
comparison
equal deleted inserted replaced
1272:15865fbda16e 1273:cf542444f022
9 function g = lebedev2d(m, xlims, ylims, opSet) 9 function g = lebedev2d(m, xlims, ylims, opSet)
10 10
11 default_arg('opSet', @(m,lim) sbp.D1StaggeredUpwind(m,lim,2)); 11 default_arg('opSet', @(m,lim) sbp.D1StaggeredUpwind(m,lim,2));
12 12
13 if ~iscell(xlims) || numel(xlims) ~= 2 13 if ~iscell(xlims) || numel(xlims) ~= 2
14 error('grid:primalDual2D:InvalidLimits','The limits should be cell arrays with 2 elements.'); 14 error('grid:lebedev2D:InvalidLimits','The limits should be cell arrays with 2 elements.');
15 end 15 end
16 16
17 if ~iscell(ylims) || numel(ylims) ~= 2 17 if ~iscell(ylims) || numel(ylims) ~= 2
18 error('grid:primalDual2D:InvalidLimits','The limits should be cell arrays with 2 elements.'); 18 error('grid:lebedev2D:InvalidLimits','The limits should be cell arrays with 2 elements.');
19 end 19 end
20 20
21 if xlims{1} > xlims{2} 21 if xlims{1} > xlims{2}
22 error('grid:primalDual2D:InvalidLimits','The elements of the limit must be increasing.'); 22 error('grid:lebedev2D:InvalidLimits','The elements of the limit must be increasing.');
23 end 23 end
24 24
25 if ylims{1} > ylims{2} 25 if ylims{1} > ylims{2}
26 error('grid:primalDual2D:InvalidLimits','The elements of the limit must be increasing.'); 26 error('grid:lebedev2D:InvalidLimits','The elements of the limit must be increasing.');
27 end 27 end
28 28
29 opsX = opSet(m(1), xlims); 29 opsX = opSet(m(1), xlims);
30 xp = opsX.x_primal; 30 xp = opsX.x_primal;
31 xd = opsX.x_dual; 31 xd = opsX.x_dual;