diff +scheme/Schrodinger1dCurve.m @ 707:0de70ec8bf60 feature/quantumTriangles

merge with feature/optim
author Ylva Rydin <ylva.rydin@telia.com>
date Fri, 10 Nov 2017 14:22:56 +0100
parents 40299ae5fabe
children
line wrap: on
line diff
--- a/+scheme/Schrodinger1dCurve.m	Thu Oct 05 18:04:23 2017 +0200
+++ b/+scheme/Schrodinger1dCurve.m	Fri Nov 10 14:22:56 2017 +0100
@@ -122,14 +122,7 @@
                     tau1 = @(t) s * 1i*obj.Ji(p,p)*d;
                     tau2 = @(t) (1*s*obj.a(p,p))/2*e;
                     closure = @(t)obj.Hi*sqrt(obj.Ji)*(tau1(t)*e' + tau2(obj.a)*e')*sqrt(obj.Ji);
-                    
-                    switch class(data)
-                        case 'double'
-                            penalty = @(t) -obj.Hi*sqrt(obj.Ji)*(tau1*data+tau2(obj.a)*data)*sqrt(obj.Ji);
-
-                        otherwise
-                            error('Weird data argument!')
-                    end               
+                    penalty = @(t) -obj.Hi*sqrt(obj.Ji)*(tau1(t)*e' + tau2(obj.a)*e')*sqrt(obj.Ji);                    
                     % Unknown, boundary condition
                 otherwise
                     error('No such boundary condition: type = %s',type);