Mercurial > repos > public > sbplib
annotate +scheme/Beam2d.m @ 998:2b1b944deae1 feature/getBoundaryOp
Add getBoundaryOperator to all 1d schemes. Did not add getBoundaryQuadrature because it doesnt make sense in 1d (?)
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Sat, 12 Jan 2019 13:35:19 -0800 |
parents | 78db023a7fe3 |
children |
rev | line source |
---|---|
141
cb2b12246b7e
Fixed path to some superclasses.
Jonatan Werpers <jonatan@werpers.com>
parents:
125
diff
changeset
|
1 classdef Beam2d < scheme.Scheme |
0 | 2 properties |
175
8f22829b69d0
Added and upgraded schemes for the beam equation in 1d and 2d.
Jonatan Werpers <jonatan@werpers.com>
parents:
141
diff
changeset
|
3 grid |
0 | 4 order % Order accuracy for the approximation |
5 | |
6 D % non-stabalized scheme operator | |
7 M % Derivative norm | |
8 alpha | |
9 | |
10 H % Discrete norm | |
11 Hi | |
12 H_x, H_y % Norms in the x and y directions | |
13 Hx,Hy % Kroneckerd norms. 1'*Hx*v corresponds to integration in the x dir. | |
14 Hi_x, Hi_y | |
15 Hix, Hiy | |
16 e_w, e_e, e_s, e_n | |
17 d1_w, d1_e, d1_s, d1_n | |
18 d2_w, d2_e, d2_s, d2_n | |
19 d3_w, d3_e, d3_s, d3_n | |
20 gamm_x, gamm_y | |
21 delt_x, delt_y | |
22 end | |
23 | |
24 methods | |
125
d52e5cdb6eff
Fixed some class name, file name errors.
Jonatan Werpers <jonatan@werpers.com>
parents:
0
diff
changeset
|
25 function obj = Beam2d(m,lim,order,alpha,opsGen) |
175
8f22829b69d0
Added and upgraded schemes for the beam equation in 1d and 2d.
Jonatan Werpers <jonatan@werpers.com>
parents:
141
diff
changeset
|
26 default_arg('alpha',1); |
0 | 27 default_arg('opsGen',@sbp.Higher); |
28 | |
176
d095b5396103
Fixed some bugs in Beam schemes.
Jonatan Werpers <jonatan@werpers.com>
parents:
175
diff
changeset
|
29 if ~isa(grid, 'grid.Cartesian') || grid.D() ~= 2 |
175
8f22829b69d0
Added and upgraded schemes for the beam equation in 1d and 2d.
Jonatan Werpers <jonatan@werpers.com>
parents:
141
diff
changeset
|
30 error('Grid must be 2d cartesian'); |
0 | 31 end |
32 | |
175
8f22829b69d0
Added and upgraded schemes for the beam equation in 1d and 2d.
Jonatan Werpers <jonatan@werpers.com>
parents:
141
diff
changeset
|
33 obj.grid = grid; |
8f22829b69d0
Added and upgraded schemes for the beam equation in 1d and 2d.
Jonatan Werpers <jonatan@werpers.com>
parents:
141
diff
changeset
|
34 obj.alpha = alpha; |
8f22829b69d0
Added and upgraded schemes for the beam equation in 1d and 2d.
Jonatan Werpers <jonatan@werpers.com>
parents:
141
diff
changeset
|
35 obj.order = order; |
0 | 36 |
175
8f22829b69d0
Added and upgraded schemes for the beam equation in 1d and 2d.
Jonatan Werpers <jonatan@werpers.com>
parents:
141
diff
changeset
|
37 m_x = grid.m(1); |
8f22829b69d0
Added and upgraded schemes for the beam equation in 1d and 2d.
Jonatan Werpers <jonatan@werpers.com>
parents:
141
diff
changeset
|
38 m_y = grid.m(2); |
0 | 39 |
175
8f22829b69d0
Added and upgraded schemes for the beam equation in 1d and 2d.
Jonatan Werpers <jonatan@werpers.com>
parents:
141
diff
changeset
|
40 h = grid.scaling(); |
8f22829b69d0
Added and upgraded schemes for the beam equation in 1d and 2d.
Jonatan Werpers <jonatan@werpers.com>
parents:
141
diff
changeset
|
41 h_x = h(1); |
8f22829b69d0
Added and upgraded schemes for the beam equation in 1d and 2d.
Jonatan Werpers <jonatan@werpers.com>
parents:
141
diff
changeset
|
42 h_y = h(2); |
0 | 43 |
44 ops_x = opsGen(m_x,h_x,order); | |
45 ops_y = opsGen(m_y,h_y,order); | |
46 | |
47 I_x = speye(m_x); | |
48 I_y = speye(m_y); | |
49 | |
50 D4_x = sparse(ops_x.derivatives.D4); | |
51 H_x = sparse(ops_x.norms.H); | |
52 Hi_x = sparse(ops_x.norms.HI); | |
53 e_l_x = sparse(ops_x.boundary.e_1); | |
54 e_r_x = sparse(ops_x.boundary.e_m); | |
55 d1_l_x = sparse(ops_x.boundary.S_1); | |
56 d1_r_x = sparse(ops_x.boundary.S_m); | |
57 d2_l_x = sparse(ops_x.boundary.S2_1); | |
58 d2_r_x = sparse(ops_x.boundary.S2_m); | |
59 d3_l_x = sparse(ops_x.boundary.S3_1); | |
60 d3_r_x = sparse(ops_x.boundary.S3_m); | |
61 | |
62 D4_y = sparse(ops_y.derivatives.D4); | |
63 H_y = sparse(ops_y.norms.H); | |
64 Hi_y = sparse(ops_y.norms.HI); | |
65 e_l_y = sparse(ops_y.boundary.e_1); | |
66 e_r_y = sparse(ops_y.boundary.e_m); | |
67 d1_l_y = sparse(ops_y.boundary.S_1); | |
68 d1_r_y = sparse(ops_y.boundary.S_m); | |
69 d2_l_y = sparse(ops_y.boundary.S2_1); | |
70 d2_r_y = sparse(ops_y.boundary.S2_m); | |
71 d3_l_y = sparse(ops_y.boundary.S3_1); | |
72 d3_r_y = sparse(ops_y.boundary.S3_m); | |
73 | |
74 | |
75 D4 = kr(D4_x, I_y) + kr(I_x, D4_y); | |
76 | |
77 % Norms | |
78 obj.H = kr(H_x,H_y); | |
79 obj.Hx = kr(H_x,I_x); | |
80 obj.Hy = kr(I_x,H_y); | |
81 obj.Hix = kr(Hi_x,I_y); | |
82 obj.Hiy = kr(I_x,Hi_y); | |
83 obj.Hi = kr(Hi_x,Hi_y); | |
84 | |
85 % Boundary operators | |
86 obj.e_w = kr(e_l_x,I_y); | |
87 obj.e_e = kr(e_r_x,I_y); | |
88 obj.e_s = kr(I_x,e_l_y); | |
89 obj.e_n = kr(I_x,e_r_y); | |
90 obj.d1_w = kr(d1_l_x,I_y); | |
91 obj.d1_e = kr(d1_r_x,I_y); | |
92 obj.d1_s = kr(I_x,d1_l_y); | |
93 obj.d1_n = kr(I_x,d1_r_y); | |
94 obj.d2_w = kr(d2_l_x,I_y); | |
95 obj.d2_e = kr(d2_r_x,I_y); | |
96 obj.d2_s = kr(I_x,d2_l_y); | |
97 obj.d2_n = kr(I_x,d2_r_y); | |
98 obj.d3_w = kr(d3_l_x,I_y); | |
99 obj.d3_e = kr(d3_r_x,I_y); | |
100 obj.d3_s = kr(I_x,d3_l_y); | |
101 obj.d3_n = kr(I_x,d3_r_y); | |
102 | |
103 obj.D = alpha*D4; | |
104 | |
105 obj.gamm_x = h_x*ops_x.borrowing.N.S2/2; | |
106 obj.delt_x = h_x^3*ops_x.borrowing.N.S3/2; | |
107 | |
108 obj.gamm_y = h_y*ops_y.borrowing.N.S2/2; | |
109 obj.delt_y = h_y^3*ops_y.borrowing.N.S3/2; | |
110 end | |
111 | |
112 | |
113 % Closure functions return the opertors applied to the own doamin to close the boundary | |
114 % Penalty functions return the opertors to force the solution. In the case of an interface it returns the operator applied to the other doamin. | |
115 % boundary is a string specifying the boundary e.g. 'l','r' or 'e','w','n','s'. | |
116 % type is a string specifying the type of boundary condition if there are several. | |
117 % data is a function returning the data that should be applied at the boundary. | |
118 % neighbour_scheme is an instance of Scheme that should be interfaced to. | |
119 % neighbour_boundary is a string specifying which boundary to interface to. | |
120 function [closure, penalty_e,penalty_d] = boundary_condition(obj,boundary,type,data) | |
121 default_arg('type','dn'); | |
122 default_arg('data',0); | |
123 | |
997
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
124 [e, d1, d2, d3] = obj.getBoundaryOperator({'e', 'd1', 'd2', 'd3'}, boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
125 s = obj.getBoundarySign(boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
126 [gamm, delt] = obj.getBoundaryBorrowing(boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
127 halfnorm_inv = obj.getHalfnormInv(boundary); |
0 | 128 |
129 switch type | |
130 % Dirichlet-neumann boundary condition | |
131 case {'dn'} | |
132 alpha = obj.alpha; | |
133 | |
134 % tau1 < -alpha^2/gamma | |
135 tuning = 1.1; | |
136 | |
137 tau1 = tuning * alpha/delt; | |
138 tau4 = s*alpha; | |
139 | |
140 sig2 = tuning * alpha/gamm; | |
141 sig3 = -s*alpha; | |
142 | |
143 tau = tau1*e+tau4*d3; | |
144 sig = sig2*d1+sig3*d2; | |
145 | |
146 closure = halfnorm_inv*(tau*e' + sig*d1'); | |
147 | |
148 pp_e = halfnorm_inv*tau; | |
149 pp_d = halfnorm_inv*sig; | |
150 switch class(data) | |
151 case 'double' | |
152 penalty_e = pp_e*data; | |
153 penalty_d = pp_d*data; | |
154 case 'function_handle' | |
155 penalty_e = @(t)pp_e*data(t); | |
156 penalty_d = @(t)pp_d*data(t); | |
157 otherwise | |
158 error('Wierd data argument!') | |
159 end | |
160 | |
161 % Unknown, boundary condition | |
162 otherwise | |
163 error('No such boundary condition: type = %s',type); | |
164 end | |
165 end | |
166 | |
944
a35ed1d124d3
Change from opts to type in a few schemes
Jonatan Werpers <jonatan@werpers.com>
parents:
910
diff
changeset
|
167 function [closure, penalty] = interface(obj,boundary,neighbour_scheme,neighbour_boundary, type) |
0 | 168 % u denotes the solution in the own domain |
169 % v denotes the solution in the neighbour domain | |
997
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
170 [e_u, d1_u, d2_u, d3_u] = obj.getBoundaryOperator({'e', 'd1', 'd2', 'd3'}, boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
171 s_u = obj.getBoundarySign(boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
172 [gamm_u, delt_u] = obj.getBoundaryBorrowing(boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
173 halfnorm_inv = obj.getHalfnormInv(boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
174 |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
175 [e_v, d1_v, d2_v, d3_v] = neighbour_scheme.getBoundaryOperator({'e', 'd1', 'd2', 'd3'}, neighbour_boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
176 s_v = neighbour_scheme.getBoundarySign(neighbour_boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
177 [gamm_v, delt_v] = neighbour_scheme.getBoundaryBorrowing(neighbour_boundary); |
0 | 178 |
179 tuning = 2; | |
180 | |
181 alpha_u = obj.alpha; | |
182 alpha_v = neighbour_scheme.alpha; | |
183 | |
184 tau1 = ((alpha_u/2)/delt_u + (alpha_v/2)/delt_v)/2*tuning; | |
185 % tau1 = (alpha_u/2 + alpha_v/2)/(2*delt_u)*tuning; | |
186 tau4 = s_u*alpha_u/2; | |
187 | |
188 sig2 = ((alpha_u/2)/gamm_u + (alpha_v/2)/gamm_v)/2*tuning; | |
189 sig3 = -s_u*alpha_u/2; | |
190 | |
191 phi2 = s_u*1/2; | |
192 | |
193 psi1 = -s_u*1/2; | |
194 | |
195 tau = tau1*e_u + tau4*d3_u; | |
196 sig = sig2*d1_u + sig3*d2_u ; | |
197 phi = phi2*d1_u ; | |
198 psi = psi1*e_u ; | |
199 | |
200 closure = halfnorm_inv*(tau*e_u' + sig*d1_u' + phi*alpha_u*d2_u' + psi*alpha_u*d3_u'); | |
201 penalty = -halfnorm_inv*(tau*e_v' + sig*d1_v' + phi*alpha_v*d2_v' + psi*alpha_v*d3_v'); | |
202 end | |
203 | |
997
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
204 % Returns the boundary operator op for the boundary specified by the string boundary. |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
205 % op -- string or a cell array of strings |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
206 % boundary -- string |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
207 function varargout = getBoundaryOperator(obj, op, boundary) |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
208 |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
209 if ~iscell(op) |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
210 op = {op}; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
211 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
212 |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
213 for i = 1:numel(op) |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
214 switch op{i} |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
215 case 'e' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
216 switch boundary |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
217 case 'w' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
218 e = obj.e_w; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
219 case 'e' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
220 e = obj.e_e; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
221 case 's' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
222 e = obj.e_s; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
223 case 'n' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
224 e = obj.e_n; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
225 otherwise |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
226 error('No such boundary: boundary = %s',boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
227 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
228 varargout{i} = e; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
229 |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
230 case 'd1' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
231 switch boundary |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
232 case 'w' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
233 d1 = obj.d1_w; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
234 case 'e' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
235 d1 = obj.d1_e; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
236 case 's' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
237 d1 = obj.d1_s; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
238 case 'n' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
239 d1 = obj.d1_n; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
240 otherwise |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
241 error('No such boundary: boundary = %s',boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
242 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
243 varargout{i} = d1; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
244 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
245 |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
246 case 'd2' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
247 switch boundary |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
248 case 'w' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
249 d2 = obj.d2_w; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
250 case 'e' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
251 d2 = obj.d2_e; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
252 case 's' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
253 d2 = obj.d2_s; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
254 case 'n' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
255 d2 = obj.d2_n; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
256 otherwise |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
257 error('No such boundary: boundary = %s',boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
258 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
259 varargout{i} = d2; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
260 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
261 |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
262 case 'd3' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
263 switch boundary |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
264 case 'w' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
265 d3 = obj.d3_w; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
266 case 'e' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
267 d3 = obj.d3_e; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
268 case 's' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
269 d3 = obj.d3_s; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
270 case 'n' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
271 d3 = obj.d3_n; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
272 otherwise |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
273 error('No such boundary: boundary = %s',boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
274 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
275 varargout{i} = d3; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
276 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
277 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
278 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
279 |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
280 % Returns square boundary quadrature matrix, of dimension |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
281 % corresponding to the number of boundary points |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
282 % |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
283 % boundary -- string |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
284 function H_b = getBoundaryQuadrature(obj, boundary) |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
285 |
0 | 286 switch boundary |
287 case 'w' | |
997
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
288 H_b = obj.H_y; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
289 case 'e' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
290 H_b = obj.H_y; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
291 case 's' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
292 H_b = obj.H_x; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
293 case 'n' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
294 H_b = obj.H_x; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
295 otherwise |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
296 error('No such boundary: boundary = %s',boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
297 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
298 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
299 |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
300 % Returns the boundary sign. The right boundary is considered the positive boundary |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
301 % boundary -- string |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
302 function s = getBoundarySign(obj, boundary) |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
303 switch boundary |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
304 case {'e','n'} |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
305 s = 1; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
306 case {'w','s'} |
0 | 307 s = -1; |
997
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
308 otherwise |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
309 error('No such boundary: boundary = %s',boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
310 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
311 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
312 |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
313 % Returns the halfnorm_inv used in SATs. TODO: better notation |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
314 function Hinv = getHalfnormInv(obj, boundary) |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
315 switch boundary |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
316 case 'w' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
317 Hinv = obj.Hix; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
318 case 'e' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
319 Hinv = obj.Hix; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
320 case 's' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
321 Hinv = obj.Hiy; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
322 case 'n' |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
323 Hinv = obj.Hiy; |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
324 otherwise |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
325 error('No such boundary: boundary = %s',boundary); |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
326 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
327 end |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
328 |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
329 % Returns borrowing constant gamma |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
330 % boundary -- string |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
331 function [gamm, delt] = getBoundaryBorrowing(obj, boundary) |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
332 switch boundary |
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
333 case {'w','e'} |
0 | 334 gamm = obj.gamm_x; |
335 delt = obj.delt_x; | |
997
78db023a7fe3
Add getBoundaryOperator method to all 2d schemes, except obsolete Wave2dCurve and ElastiCurve, which needs a big makeover.
Martin Almquist <malmquist@stanford.edu>
parents:
944
diff
changeset
|
336 case {'s','n'} |
0 | 337 gamm = obj.gamm_y; |
338 delt = obj.delt_y; | |
339 otherwise | |
340 error('No such boundary: boundary = %s',boundary); | |
341 end | |
342 end | |
343 | |
344 function N = size(obj) | |
345 N = prod(obj.m); | |
346 end | |
347 | |
348 end | |
349 end |