Mercurial > repos > public > sbplib
comparison +scheme/Schrodinger.m @ 495:b91d23271481 feature/quantumTriangles
Added new penalty parameter to the interface in shrodinger curve
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Fri, 24 Feb 2017 09:04:02 +0100 |
parents | a39fe3bcbd95 |
children |
comparison
equal
deleted
inserted
replaced
494:c6d03f951a7f | 495:b91d23271481 |
---|---|
20 gamm | 20 gamm |
21 end | 21 end |
22 | 22 |
23 methods | 23 methods |
24 % Solving SE in the form u_t = i*u_xx -i*V; | 24 % Solving SE in the form u_t = i*u_xx -i*V; |
25 function obj = Schrodinger(m,xlim,order,V) | 25 function obj = Schrodinger(g,order,V) |
26 default_arg('V',0); | 26 default_arg('V',0); |
27 ops = sbp.D2Standard(m,xlim,order); | 27 obj.grid = g; |
28 m = N(obj.grid); | |
29 obj.x = points(obj.grid); | |
30 ops = sbp.D2Standard(m,{obj.x(1) obj.x(end)},order); | |
28 | 31 |
29 obj.x=ops.x; | 32 |
30 obj.h=ops.h; | 33 obj.h = ops.h; |
31 obj.D2 = ops.D2; | 34 obj.D2 = ops.D2; |
32 obj.H = ops.H; | 35 obj.H = ops.H; |
33 obj.Hi = ops.HI; | 36 obj.Hi = ops.HI; |
34 obj.M = ops.M; | 37 obj.M = ops.M; |
35 obj.e_l = ops.e_l; | 38 obj.e_l = ops.e_l; |