comparison +scheme/Utux.m @ 1062:e512714fb890 feature/laplace_curvilinear_test

Merge with feature/getBoundaryOp
author Martin Almquist <malmquist@stanford.edu>
date Mon, 14 Jan 2019 18:14:44 -0800
parents 2b1b944deae1
children 8d73fcdb07a5
comparison
equal deleted inserted replaced
988:a72038b1f709 1062:e512714fb890
70 penalty = -obj.Hi*tau*neighbour_scheme.e_l'; 70 penalty = -obj.Hi*tau*neighbour_scheme.e_l';
71 end 71 end
72 72
73 end 73 end
74 74
75 % Returns the boundary operator op for the boundary specified by the string boundary.
76 % op -- string or a cell array of strings
77 % boundary -- string
78 function varargout = getBoundaryOperator(obj, op, boundary)
79
80 if ~iscell(op)
81 op = {op};
82 end
83
84 for i = 1:numel(op)
85 switch op{i}
86 case 'e'
87 switch boundary
88 case 'l'
89 e = obj.e_l;
90 case 'r'
91 e = obj.e_r;
92 otherwise
93 error('No such boundary: boundary = %s',boundary);
94 end
95 varargout{i} = e;
96 end
97 end
98 end
99
75 function N = size(obj) 100 function N = size(obj)
76 N = obj.m; 101 N = obj.m;
77 end 102 end
78 103
79 end 104 end