changeset 216:8b10476b9bb7 feature/beams

multiblock: Fixed some problems in DiffOp and Grid.
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 22 Jun 2016 14:44:03 +0200
parents 7bb2ef637142
children fc07ebc49412
files +multiblock/DiffOp.m +multiblock/Grid.m
diffstat 2 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/+multiblock/DiffOp.m	Wed Jun 22 14:42:49 2016 +0200
+++ b/+multiblock/DiffOp.m	Wed Jun 22 14:44:03 2016 +0200
@@ -64,11 +64,11 @@
 
                     [ii, ij] = obj.diffOps{i}.interface(intf{1}, obj.diffOps{j}, intf{2});
                     D{i,i} = D{i,i} + ii;
-                    D{i,j} = D{i,j} + ij;
+                    D{i,j} = ij;
 
                     [jj, ji] = obj.diffOps{j}.interface(intf{2}, obj.diffOps{i}, intf{1});
                     D{j,j} = D{j,j} + jj;
-                    D{j,i} = D{j,i} + ji;
+                    D{j,i} = ji;
                 end
             end
             obj.D = blockmatrix.toMatrix(D);
@@ -108,12 +108,12 @@
         %    boundary -- the name of the boundary on the form [id][name] where
         %                id is the number of a block and name is the name of a
         %                boundary of that block example: 1s or 3w
-        function [closure, penalty] = boundary_condition(obj,boundary,type,data)
-            I = boundary(1)
-            name = boundary(2:end);
+        function [closure, penalty] = boundary_condition(obj,boundary,type)
+            I = boundary{1};
+            name = boundary{2};
 
             % Get the closure and penaly matrices
-            [blockClosure, blockPenalty] = obj.diffOps{I}.boundary_condition(name, type, data);
+            [blockClosure, blockPenalty] = obj.diffOps{I}.boundary_condition(name, type);
 
             % Expand to matrix for full domain.
             div = obj.blockmatrixDiv;
@@ -126,7 +126,7 @@
 
             % Convert to matrix
             closure = blockmatrix.toMatrix(closure);
-            penalty = blockmatrix.toMatrix(closure);
+            penalty = blockmatrix.toMatrix(penalty);
         end
 
         function [closure, penalty] = interface(obj,boundary,neighbour_scheme,neighbour_boundary)
--- a/+multiblock/Grid.m	Wed Jun 22 14:42:49 2016 +0200
+++ b/+multiblock/Grid.m	Wed Jun 22 14:44:03 2016 +0200
@@ -62,9 +62,9 @@
             nBlocks = length(obj.grids);
 
             % Collect number of points in each block
-            N = cell(1,nBlocks);
+            N = zeros(1,nBlocks);
             for i = 1:nBlocks
-                N{i} = obj.grids{i}.N();
+                N(i) = obj.grids{i}.N();
             end
 
             gfs = mat2cell(gf, N, 1);