Mercurial > repos > public > sbplib
diff +noname/testCfl.m @ 425:e56dbd9e4196 feature/grids
Merge feature/beams
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 07 Feb 2017 16:09:02 +0100 |
parents | 7f6f04bfc007 |
children |
line wrap: on
line diff
--- a/+noname/testCfl.m Tue Feb 07 15:47:51 2017 +0100 +++ b/+noname/testCfl.m Tue Feb 07 16:09:02 2017 +0100 @@ -27,29 +27,37 @@ end end + if silentFlag + rsInterval = util.ReplaceableString(''); + end + % Use bisection to find sharp estimate while( (alpha0(2)-alpha0(1))/alpha0(1) > tol) alpha = mean(alpha0); if ~silentFlag fprintf('[%.3e,%.3e]: ', alpha0(1), alpha0(2)); + else + rsInterval.update('[%.3e,%.3e]: ', alpha0(1), alpha0(2)); end [ok, n_step, maxVal] = testAlpha(alpha); if ok alpha0(1) = alpha; + stability = 'STABLE'; else alpha0(2) = alpha; + stability = 'UNSTABLE'; end if ~silentFlag - fprintf('a = %.3e, n_step=%d max = %.2e\n', alpha, n_step, maxVal); + fprintf('a = %.3e, n_step=%d %8s max = %.2e\n', alpha, n_step, stability, maxVal); end end if silentFlag - fprintf('Last calculated: a = %.3e, n_step=%d max = %.2e\n', alpha, n_step, maxVal); + rsInterval = util.ReplaceableString(''); end fprintf('T = %-3d dof = %-4d order = %d: clf = %.4e\n',T, discr.size(), discr.order, alpha0(1));