Mercurial > repos > public > sbplib
comparison +scheme/Laplace1d.m @ 1082:a20fc67e9ac0 feature/laplace1dUpdate
Add d and n as acceptable boundary condition identifiers, which is consistent with eg LaplaceCurvilinear.
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Tue, 05 Mar 2019 11:26:42 -0800 |
parents | ae4b090b5299 |
children | a22b23098021 |
comparison
equal
deleted
inserted
replaced
1079:ae4b090b5299 | 1082:a20fc67e9ac0 |
---|---|
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 |