Mercurial > repos > public > sbplib
diff +scheme/Utux.m @ 1108:5ec23b9bf360 feature/laplace_curvilinear_test
Merge with default
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Wed, 10 Apr 2019 11:00:27 -0700 |
parents | 0c504a21432d |
children | 433c89bf19e0 |
line wrap: on
line diff
--- a/+scheme/Utux.m Fri Mar 29 14:50:50 2019 -0700 +++ b/+scheme/Utux.m Wed Apr 10 11:00:27 2019 -0700 @@ -73,28 +73,24 @@ end % Returns the boundary operator op for the boundary specified by the string boundary. - % op -- string or a cell array of strings + % op -- string % boundary -- string - function varargout = getBoundaryOperator(obj, op, boundary) + function o = getBoundaryOperator(obj, op, boundary) + assertIsMember(op, {'e'}) + assertIsMember(boundary, {'l', 'r'}) - if ~iscell(op) - op = {op}; - end + o = obj.([op, '_', boundary]); + end - for i = 1:numel(op) - switch op{i} - case 'e' - switch boundary - case 'l' - e = obj.e_l; - case 'r' - e = obj.e_r; - otherwise - error('No such boundary: boundary = %s',boundary); - end - varargout{i} = e; - end - end + % Returns square boundary quadrature matrix, of dimension + % corresponding to the number of boundary points + % + % boundary -- string + % Note: for 1d diffOps, the boundary quadrature is the scalar 1. + function H_b = getBoundaryQuadrature(obj, boundary) + assertIsMember(boundary, {'l', 'r'}) + + H_b = 1; end function N = size(obj) @@ -102,14 +98,4 @@ end end - - methods(Static) - % Calculates the matrices needed for the inteface coupling between boundary bound_u of scheme schm_u - % and bound_v of scheme schm_v. - % [uu, uv, vv, vu] = inteface_coupling(A,'r',B,'l') - function [uu, uv, vv, vu] = interface_coupling(schm_u,bound_u,schm_v,bound_v) - [uu,uv] = schm_u.interface(bound_u,schm_v,bound_v); - [vv,vu] = schm_v.interface(bound_v,schm_u,bound_u); - end - end -end \ No newline at end of file +end