changeset 1049:0c504a21432d feature/getBoundaryOp

Add getBoundaryQuadrature to all 1d diffOps
author Martin Almquist <malmquist@stanford.edu>
date Tue, 22 Jan 2019 11:17:28 -0800
parents adbb80e60b10
children 19d821ddc108
files +scheme/Beam.m +scheme/Euler1d.m +scheme/Laplace1d.m +scheme/Schrodinger.m +scheme/Utux.m
diffstat 5 files changed, 55 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/+scheme/Beam.m	Tue Jan 22 11:12:23 2019 -0800
+++ b/+scheme/Beam.m	Tue Jan 22 11:17:28 2019 -0800
@@ -255,6 +255,17 @@
             o = obj.([op, '_', boundary]);
         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
+
         % Returns the boundary sign. The right boundary is considered the positive boundary
         % boundary -- string
         function s = getBoundarySign(obj, boundary)
--- a/+scheme/Euler1d.m	Tue Jan 22 11:12:23 2019 -0800
+++ b/+scheme/Euler1d.m	Tue Jan 22 11:17:28 2019 -0800
@@ -518,6 +518,17 @@
             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
+
         % Returns the boundary sign. The right boundary is considered the positive boundary
         % boundary -- string
         function s = getBoundarySign(obj, boundary)
--- a/+scheme/Laplace1d.m	Tue Jan 22 11:12:23 2019 -0800
+++ b/+scheme/Laplace1d.m	Tue Jan 22 11:17:28 2019 -0800
@@ -126,6 +126,17 @@
             o = obj.([op, '_', boundary])
         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
+
         % Returns the boundary sign. The right boundary is considered the positive boundary
         % boundary -- string
         function s = getBoundarySign(obj, boundary)
--- a/+scheme/Schrodinger.m	Tue Jan 22 11:12:23 2019 -0800
+++ b/+scheme/Schrodinger.m	Tue Jan 22 11:17:28 2019 -0800
@@ -143,6 +143,17 @@
             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
+
         % Returns the boundary sign. The right boundary is considered the positive boundary
         % boundary -- string
         function s = getBoundarySign(obj, boundary)
--- a/+scheme/Utux.m	Tue Jan 22 11:12:23 2019 -0800
+++ b/+scheme/Utux.m	Tue Jan 22 11:17:28 2019 -0800
@@ -82,6 +82,17 @@
             o = obj.([op, '_', boundary]);
         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)
             N = obj.m;
         end