Mercurial > repos > public > sbplib
comparison +scheme/Schrodinger2dCurve.m @ 516:afff85574ddb feature/quantumTriangles
Changed the penalty on the first derivative penalty terms, did not solve the problem
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Fri, 07 Jul 2017 14:52:47 +0200 |
parents | ba92b27da5a0 |
children | 7a091a3527df |
comparison
equal
deleted
inserted
replaced
515:ba92b27da5a0 | 516:afff85574ddb |
---|---|
195 obj.t_up=t; | 195 obj.t_up=t; |
196 end | 196 end |
197 end | 197 end |
198 | 198 |
199 % Closure functions return the opertors applied to the own doamin to close the boundary | 199 % Closure functions return the opertors applied to the own doamin to close the boundary |
200 | |
200 % Penalty functions return the opertors to force the solution. In the case of an interface it returns the operator applied to the other doamin. | 201 % Penalty functions return the opertors to force the solution. In the case of an interface it returns the operator applied to the other doamin. |
201 % boundary is a string specifying the boundary e.g. 'l','r' or 'e','w','n','s'. | 202 % boundary is a string specifying the boundary e.g. 'l','r' or 'e','w','n','s'. |
202 % type is a string specifying the type of boundary condition if there are several. | 203 % type is a string specifying the type of boundary condition if there are several. |
203 % data is a function returning the data that should be applied at the boundary. | 204 % data is a function returning the data that should be applied at the boundary. |
204 % neighbour_scheme is an instance of Scheme that should be interfaced to. | 205 % neighbour_scheme is an instance of Scheme that should be interfaced to. |
211 | 212 |
212 | 213 |
213 F = @(t)(s * a_n(t)*d_n' + s * a_t(t) *d_t')'; | 214 F = @(t)(s * a_n(t)*d_n' + s * a_t(t) *d_t')'; |
214 tau1 = 1; | 215 tau1 = 1; |
215 a = @(t)spdiag(g(t)); | 216 a = @(t)spdiag(g(t)); |
216 tau2 = @(t) (-1*s*a(t) - abs(a(t)))/4; | 217 tau2 = @(t) (-1*s*a(t))/2; |
217 | 218 |
218 penalty_parameter_1 = @(t) 1*1i*halfnorm_inv_n*halfnorm_inv_t*F(t)*e'*halfnorm_t*e; | 219 penalty_parameter_1 = @(t) 1*1i*halfnorm_inv_n*halfnorm_inv_t*F(t)*e'*halfnorm_t*e; |
219 penalty_parameter_2 = @(t) halfnorm_inv_n*e*tau2(t); | 220 penalty_parameter_2 = @(t) halfnorm_inv_n*e*tau2(t); |
220 | 221 |
221 closure = @(t) sqrt(obj.Ji)*(obj.c^2 * penalty_parameter_1(t)*e' + penalty_parameter_2(t)*e')*sqrt(obj.Ji); | 222 closure = @(t) sqrt(obj.Ji)*(obj.c^2 * penalty_parameter_1(t)*e' + penalty_parameter_2(t)*e')*sqrt(obj.Ji); |