Mercurial > repos > public > sbplib
diff +scheme/Utux.m @ 1054:77676c26056d
Merged in feature/getBoundaryOp (pull request #12)
Feature/getBoundaryOp
author | Jonatan Werpers <jonatan.werpers@it.uu.se> |
---|---|
date | Thu, 24 Jan 2019 08:29:50 +0000 |
parents | 0c504a21432d |
children | 433c89bf19e0 |
line wrap: on
line diff
--- a/+scheme/Utux.m Tue Jan 22 16:50:05 2019 +0100 +++ b/+scheme/Utux.m Thu Jan 24 08:29:50 2019 +0000 @@ -72,6 +72,27 @@ end + % Returns the boundary operator op for the boundary specified by the string boundary. + % op -- string + % boundary -- string + function o = getBoundaryOperator(obj, op, boundary) + assertIsMember(op, {'e'}) + assertIsMember(boundary, {'l', 'r'}) + + 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