diff +scheme/Hypsyst2d.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 8d73fcdb07a5
children
line wrap: on
line diff
--- a/+scheme/Hypsyst2d.m	Fri Mar 29 14:50:50 2019 -0700
+++ b/+scheme/Hypsyst2d.m	Wed Apr 10 11:00:27 2019 -0700
@@ -298,6 +298,7 @@
         % op        -- string or a cell array of strings
         % boundary  -- string
         function varargout = getBoundaryOperator(obj, op, boundary)
+            assertIsMember(boundary, {'w', 'e', 's', 'n'})
 
             if ~iscell(op)
                 op = {op};
@@ -315,8 +316,6 @@
                         e = obj.e_s;
                     case 'n'
                         e = obj.e_n;
-                    otherwise
-                        error('No such boundary: boundary = %s',boundary);
                     end
                     varargout{i} = e;
                 end
@@ -328,6 +327,7 @@
         %
         % boundary -- string
         function H_b = getBoundaryQuadrature(obj, boundary)
+            assertIsMember(boundary, {'w', 'e', 's', 'n'})
 
             e = obj.getBoundaryOperator('e', boundary);
 
@@ -340,8 +340,6 @@
                     H_b = inv(e'*obj.Hxi*e);
                 case 'n'
                     H_b = inv(e'*obj.Hxi*e);
-                otherwise
-                    error('No such boundary: boundary = %s',boundary);
             end
         end