Mercurial > repos > public > sbplib
changeset 39:7249f105e67b
Added silent option to noname.testCfl.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 09 Oct 2015 10:52:42 +0200 |
parents | 4fcc4448682f |
children | 54d3ab296ba0 |
files | +noname/testCfl.m |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
diff -r 4fcc4448682f -r 7249f105e67b +noname/testCfl.m --- 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));