comparison +noname/testCfl.m @ 106:eb7f592b9512 feature/arclen-param

Merged heads.
author Martin Almquist <martin.almquist@it.uu.se>
date Mon, 07 Dec 2015 18:57:55 +0100
parents 9933169d2651
children ee9c03dc7f42
comparison
equal deleted inserted replaced
105:1df4f3704b76 106:eb7f592b9512
6 alpha0(2) = alpha0(1)+2*(alpha0(2)-alpha0(1)); 6 alpha0(2) = alpha0(1)+2*(alpha0(2)-alpha0(1));
7 7
8 while( (alpha0(2)-alpha0(1))/alpha0(1) > tol) 8 while( (alpha0(2)-alpha0(1))/alpha0(1) > tol)
9 alpha = mean(alpha0); 9 alpha = mean(alpha0);
10 10
11 ts = discr.getTimestepper(timestepper_method,[],alpha); 11 ts = discr.getTimestepper(struct('method', timestepper_method, 'cfl', alpha));
12 12
13 warning('off','all') 13 warning('off','all')
14 ts.evolve(T,true); 14 ts.evolve(T,true);
15 warning('on','all') 15 warning('on','all')
16 16
17 [v,t] = ts.getV(); 17 [v,t] = ts.getV();
18
19 max_val = max(v); 18 max_val = max(v);
20 19
21 if isnan(max_val) || max_val == Inf || max_val > threshold 20 if isnan(max_val) || max_val == Inf || max_val > threshold
22 alpha0(2) = alpha; 21 alpha0(2) = alpha;
23 else 22 else