changeset 532:b29f04ab5d99 feature/boundaryGroup

Implement getBoundaryOperator for boundaryGroups in multiblock.DiffOp
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 03 Aug 2017 17:38:05 +0200
parents d5bc51537a8c
children 06d1606d6977
files +multiblock/DiffOp.m
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
diff -r d5bc51537a8c -r b29f04ab5d99 +multiblock/DiffOp.m
--- a/+multiblock/DiffOp.m	Thu Aug 03 15:49:32 2017 +0200
+++ b/+multiblock/DiffOp.m	Thu Aug 03 17:38:05 2017 +0200
@@ -120,11 +120,11 @@
             ops = sparse2cell(op, obj.NNN);
         end
 
-        % Get a boundary operator specified by op for the given boundary/BoundaryGroup
-        function op = getBoundaryOperator(obj, op, boundary)
+        % Get a boundary operator specified by opName for the given boundary/BoundaryGroup
+        function op = getBoundaryOperator(obj, opName, boundary)
             switch class(boundary)
                 case 'cell'
-                    localOpName = [op '_' boundary{2}];
+                    localOpName = [opName '_' boundary{2}];
                     blockId = boundary{1};
                     localOp = obj.diffOps{blockId}.(localOpName);
 
@@ -134,7 +134,10 @@
                     op = blockmatrix.toMatrix(blockOp);
                     return
                 case 'multiblock.BoundaryGroup'
-                    error('not implemented')
+                    op = [];
+                    for i = 1:length(boundary)
+                        op = [op, obj.getBoundaryOperator(opName, boundary{i})];
+                    end
                 otherwise
                     error('Unknown boundary indentifier')
             end