Skip to content

Commit

Permalink
stop if no descent
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfHielscher committed Feb 2, 2018
1 parent 306ce09 commit 7ad8757
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion PoleFigureAnalysis/@MLSSolver/calcODF.m
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
function do_iterate

solver.initIter;
for iter = 1:7 %solver.iterMax
lasterr = inf;
for iter = 1:solver.iterMax

% one step
solver.doIter;
Expand All @@ -56,6 +57,8 @@
err(i) = norm(solver.u{i}) ./ norm(solver.pf.allI{i}(:));
end
fprintf(format,xnum2str(iter,[],2),err);
if (lasterr-err)/err < 0.05, break; end
lasterr = err;
end
end
% -------------------------------------------------------------------
Expand Down

0 comments on commit 7ad8757

Please sign in to comment.