Mercurial > repos > public > sbplib
comparison +scheme/Utux.m @ 573:efe2dbf9796e feature/utux2D
Remove data input from boundary condition function
author | Martin Almquist <martin.almquist@it.uu.se> |
---|---|
date | Sun, 03 Sep 2017 21:27:09 +0200 |
parents | 4a73b2aab91f |
children | 459eeb99130f |
comparison
equal
deleted
inserted
replaced
572:4a73b2aab91f | 573:efe2dbf9796e |
---|---|
58 % boundary is a string specifying the boundary e.g. 'l','r' or 'e','w','n','s'. | 58 % boundary is a string specifying the boundary e.g. 'l','r' or 'e','w','n','s'. |
59 % type is a string specifying the type of boundary condition if there are several. | 59 % type is a string specifying the type of boundary condition if there are several. |
60 % data is a function returning the data that should be applied at the boundary. | 60 % data is a function returning the data that should be applied at the boundary. |
61 % neighbour_scheme is an instance of Scheme that should be interfaced to. | 61 % neighbour_scheme is an instance of Scheme that should be interfaced to. |
62 % neighbour_boundary is a string specifying which boundary to interface to. | 62 % neighbour_boundary is a string specifying which boundary to interface to. |
63 function [closure, penalty] = boundary_condition(obj,boundary,type,data) | 63 function [closure, penalty] = boundary_condition(obj,boundary,type) |
64 default_arg('type','dirichlet'); | 64 default_arg('type','dirichlet'); |
65 default_arg('data',0); | |
66 tau =-1*obj.e_l; | 65 tau =-1*obj.e_l; |
67 closure = obj.Hi*tau*obj.e_l'; | 66 closure = obj.Hi*tau*obj.e_l'; |
68 penalty = 0*obj.e_l; | 67 penalty = -obj.Hi*tau; |
69 | 68 |
70 end | 69 end |
71 | 70 |
72 function [closure, penalty] = interface(obj,boundary,neighbour_scheme,neighbour_boundary) | 71 function [closure, penalty] = interface(obj,boundary,neighbour_scheme,neighbour_boundary) |
73 switch boundary | 72 switch boundary |
89 end | 88 end |
90 | 89 |
91 end | 90 end |
92 | 91 |
93 methods(Static) | 92 methods(Static) |
94 % Calculates the matrcis need for the inteface coupling between boundary bound_u of scheme schm_u | 93 % Calculates the matrices needed for the inteface coupling between boundary bound_u of scheme schm_u |
95 % and bound_v of scheme schm_v. | 94 % and bound_v of scheme schm_v. |
96 % [uu, uv, vv, vu] = inteface_coupling(A,'r',B,'l') | 95 % [uu, uv, vv, vu] = inteface_coupling(A,'r',B,'l') |
97 function [uu, uv, vv, vu] = interface_coupling(schm_u,bound_u,schm_v,bound_v) | 96 function [uu, uv, vv, vu] = interface_coupling(schm_u,bound_u,schm_v,bound_v) |
98 [uu,uv] = schm_u.interface(bound_u,schm_v,bound_v); | 97 [uu,uv] = schm_u.interface(bound_u,schm_v,bound_v); |
99 [vv,vu] = schm_v.interface(bound_v,schm_u,bound_u); | 98 [vv,vu] = schm_v.interface(bound_v,schm_u,bound_u); |