Skip to content

Commit

Permalink
Documentation and mex fallback
Browse files Browse the repository at this point in the history
Documentation change for issue #22 and warning for mex users on post R2017b in response to issue #17
  • Loading branch information
wardsimon committed Apr 24, 2019
1 parent ae1c36d commit 2f27fff
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion swfiles/@spinw/spinwave.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@
% `false`.
%
% `'sortMode'`
% : If `true`, the spin wave modes will be sorted. Default is `true`.
% : If `true`, the spin wave modes will be sorted by continuity. Default is
% `true`.
%
% `'optmem'`
% : Parameter to optimise memory usage. The list of Q values will be cut
Expand Down
9 changes: 9 additions & 0 deletions swfiles/@swpref/private/datastruct.m
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@
return
end

% TODO
% MEX is currently broken on >R2017b, so make a check
if ~verLessThan('matlab','9.4')
warning('swpref:MexError','Mex is currently unsuported on your version of MATLAB.\nWe are working on it...')
out = 0;
return
end


if ~(exist('chol_omp','file')==3 && exist('eig_omp','file')==3)
% There is a path error for < R2017a
if (exist('chol_omp','file')==2 && exist('eig_omp','file')==2)
Expand Down
6 changes: 3 additions & 3 deletions swfiles/sw_plotspec.m
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
% `'auto'`.
%
% `'sortMode'`
% : Sorting the modes before plotting. Default is `false`. Can improve the
% quality of the dispersion line plots if modes are crossing.
% : Sorting the modes by energy before plotting. Default is `false`. Can
% improve the quality of the dispersion line plots if modes are crossing.
%
% `'axLim'`
% : Upper limit for energy axis (for `mode` 1,2) or color axis (for `mode`
Expand Down Expand Up @@ -191,7 +191,7 @@
inpForm.size = [inpForm.size {[1 1] [1 1] [1 1] [1 -4] [1 -10] }];

inpForm.fname = [inpForm.fname {'lineStyle' 'lineWidth' 'sortMode'}];
inpForm.defval = [inpForm.defval {{'-' 'o-' '--'} 0.5 true }];
inpForm.defval = [inpForm.defval {{'-' 'o-' '--'} 0.5 false }];
inpForm.size = [inpForm.size {[1 -5] [1 1] [1 1] }];

inpForm.fname = [inpForm.fname {'log' 'plotf' 'maxPatch' 'x0' 'qlabel' }];
Expand Down

0 comments on commit 2f27fff

Please sign in to comment.