Mercurial > repos > public > sbplib
diff +noname/testCfl.m @ 820:501750fbbfdb
Merge with feature/grids
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 07 Sep 2018 14:40:58 +0200 |
parents | 7f6f04bfc007 |
children |
line wrap: on
line diff
--- a/+noname/testCfl.m Fri Sep 07 14:39:38 2018 +0200 +++ b/+noname/testCfl.m Fri Sep 07 14:40:58 2018 +0200 @@ -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));