Mercurial > repos > public > sbplib
comparison +scheme/Laplace1d.m @ 1096:78d7e4e28e3e
Merged in feature/laplace1dUpdate (pull request #13)
Feature/laplace1dUpdate
author | Jonatan Werpers <jonatan.werpers@it.uu.se> |
---|---|
date | Mon, 08 Apr 2019 20:15:37 +0000 |
parents | a22b23098021 |
children | 33c378e508d2 |
comparison
equal
deleted
inserted
replaced
1079:ae4b090b5299 | 1096:78d7e4e28e3e |
---|---|
60 d = obj.getBoundaryOperator('d', boundary); | 60 d = obj.getBoundaryOperator('d', boundary); |
61 s = obj.getBoundarySign(boundary); | 61 s = obj.getBoundarySign(boundary); |
62 | 62 |
63 switch type | 63 switch type |
64 % Dirichlet boundary condition | 64 % Dirichlet boundary condition |
65 case {'D','dirichlet'} | 65 case {'D','d','dirichlet'} |
66 tuning = 1.1; | 66 tuning = 1.1; |
67 tau1 = -tuning/obj.gamm; | 67 tau1 = -tuning/obj.gamm; |
68 tau2 = 1; | 68 tau2 = 1; |
69 | 69 |
70 tau = tau1*e + tau2*d; | 70 tau = tau1*e + tau2*d; |
71 | 71 |
72 closure = obj.a*obj.Hi*tau*e'; | 72 closure = obj.a*obj.Hi*tau*e'; |
73 penalty = obj.a*obj.Hi*tau; | 73 penalty = obj.a*obj.Hi*tau; |
74 | 74 |
75 % Neumann boundary condition | 75 % Neumann boundary condition |
76 case {'N','neumann'} | 76 case {'N','n','neumann'} |
77 tau = -e; | 77 tau = -e; |
78 | 78 |
79 closure = obj.a*obj.Hi*tau*d'; | 79 closure = obj.a*obj.Hi*tau*d'; |
80 penalty = -obj.a*obj.Hi*tau; | 80 penalty = -obj.a*obj.Hi*tau; |
81 | 81 |
102 gamm_u = obj.gamm; | 102 gamm_u = obj.gamm; |
103 gamm_v = neighbour_scheme.gamm; | 103 gamm_v = neighbour_scheme.gamm; |
104 | 104 |
105 tuning = 1.1; | 105 tuning = 1.1; |
106 | 106 |
107 tau1 = -(a_u/gamm_u + a_v/gamm_v) * tuning; | 107 tau1 = -1/4*(a_u/gamm_u + a_v/gamm_v) * tuning; |
108 tau2 = 1/2*a_u; | 108 tau2 = 1/2*a_u; |
109 sig1 = -1/2; | 109 sig1 = -1/2; |
110 sig2 = 0; | 110 sig2 = 0; |
111 | 111 |
112 tau = tau1*e_u + tau2*d_u; | 112 tau = tau1*e_u + tau2*d_u; |