Mercurial > repos > public > sbplib
diff +noname/testCfl.m @ 39:7249f105e67b
Added silent option to noname.testCfl.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 09 Oct 2015 10:52:42 +0200 |
parents | bce9e28c1e26 |
children | 9933169d2651 |
line wrap: on
line diff
--- a/+noname/testCfl.m Tue Oct 06 16:54:54 2015 +0200 +++ b/+noname/testCfl.m Fri Oct 09 10:52:42 2015 +0200 @@ -1,6 +1,7 @@ -function testCfl(discr, timestepper_method, T, alpha0, tol,threshold) +function testCfl(discr, timestepper_method, T, alpha0, tol,threshold, silentFlag) default_arg('tol',0.00005); default_arg('threshold',1e2); + default_arg('silentFlag', false); alpha0(2) = alpha0(1)+2*(alpha0(2)-alpha0(1)); @@ -23,8 +24,9 @@ alpha0(1) = alpha; end - fprintf('[%.3e,%.3e]: a = %.3e, max= %.2e\n',alpha0(1),alpha0(2), alpha,max_val); - + if ~silentFlag + fprintf('[%.3e,%.3e]: a = %.3e, max= %.2e\n',alpha0(1),alpha0(2), alpha,max_val); + end end fprintf('T = %-3d dof = %-4d order = %d: clf = %.4e\n',T, discr.size(), discr.order, alpha0(1));