changeset 102:2fd0fd3e75eb feature/arclen-param

Merged default into feature/arclen-param
author Martin Almquist <martin.almquist@it.uu.se>
date Mon, 07 Dec 2015 16:47:13 +0100
parents ecf77a50d4fe (current diff) 9933169d2651 (diff)
children eb7f592b9512
files
diffstat 2 files changed, 3 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/+noname/testCfl.m	Sun Dec 06 15:41:42 2015 +0100
+++ b/+noname/testCfl.m	Mon Dec 07 16:47:13 2015 +0100
@@ -8,14 +8,13 @@
     while( (alpha0(2)-alpha0(1))/alpha0(1) > tol)
         alpha = mean(alpha0);
 
-        ts = discr.getTimestepper(timestepper_method,[],alpha);
+        ts = discr.getTimestepper(struct('method', timestepper_method, 'cfl', alpha));
 
         warning('off','all')
         ts.evolve(T,true);
         warning('on','all')
 
         [v,t] = ts.getV();
-
         max_val = max(v);
 
         if isnan(max_val) || max_val == Inf || max_val > threshold
--- a/+scheme/Euler1d.m	Sun Dec 06 15:41:42 2015 +0100
+++ b/+scheme/Euler1d.m	Mon Dec 07 16:47:13 2015 +0100
@@ -283,7 +283,8 @@
                 Lambda = [u, u+c, u-c];
 
                 p_in = find(s*Lambda < 0);
-                p_ot = find(s*Lambda >= 0);
+                p_ot = 1:3;
+                p_ot(p_in) = [];
                 p = [p_in p_ot];
                 pt(p) = 1:length(p);
 
@@ -397,29 +398,6 @@
         function closure = boundary_condition_wall(obj,boundary)
             [e_s,e_S,s] = obj.get_boundary_ops(boundary);
 
-            % v = 0 corresponds to
-            % L = [0 1 0];
-            % g = 0
-            %
-            % Tp =
-            % R = -(u-c)/(u+c)
-
-            % tau = alpha * (u+c)
-            % (alpha+1)(u+c) + 1/4* alpha^2|u-c| <= 0
-            % 4*(alpha+1)(u+c) + alpha^2|u-c| <= 0
-            % 4 * (alpha+1)(u+c) + alpha^2|u| + alpha^2*c <= 0
-            % |u|*(sgn(u)*4 + sgn(u)*4*alpha + alpha^2) + c*(4 + 4alpha + alpha^2) <= 0
-            % |u|*(alpha^2 + 4*sgn(u)*alpha + 4*sgn(u)) + c*(alpha+2)^2 <= 0
-            % |u|*[(alpha + 2*sgn(u))^2 - 4*(sgn(u)-1)] + c*(alpha+2)^2 <= 0
-
-
-            % om vi låtsas att u = 0:
-            % (alpha+1)c + 1/4 * alpha^2*c <= 0
-            % alpha^2 +  4*alpha +4 <= 0
-            % (alpha + 2)^2 <= 0
-            % alpha = -2   gives tau = -2*c;
-
-
             % Vill vi sätta penalty på karateristikan som är nära noll också eller vill
             % vi låta den vara fri?