Mercurial > repos > public > sbplib
changeset 534:55a7777dfcd0 feature/boundaryGroup
Implement boundary_condition for boundary groups
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 03 Aug 2017 18:07:27 +0200 |
parents | 06d1606d6977 |
children | b52ea450f4c3 ea5cbf579e18 |
files | +multiblock/DiffOp.m |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/+multiblock/DiffOp.m Thu Aug 03 17:45:06 2017 +0200 +++ b/+multiblock/DiffOp.m Thu Aug 03 18:07:27 2017 +0200 @@ -151,9 +151,16 @@ function [closure, penalty] = boundary_condition(obj, boundary, type) switch class(boundary) case 'cell' - [closure, penalty] = singleBoundaryCondition(obj, boundary, type); + [closure, penalty] = obj.singleBoundaryCondition(boundary, type); case 'multiblock.BoundaryGroup' - error('not implemented') + [n,m] = size(obj.D); + closure = sparse(n,m); + penalty = []; + for i = 1:length(boundary) + [closurePart, penaltyPart] = obj.boundary_condition(boundary{i}, type); + closure = closure + closurePart; + penalty = [penalty, penaltyPart]; + end otherwise error('Unknown boundary indentifier') end