changeset 335:2d48db7151cf feature/beams

Bug fix in boundary condition.
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 21 Oct 2016 11:31:06 +0200
parents 46462a6f8a5f
children f36d172e196b
files +multiblock/DiffOp.m
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
diff -r 46462a6f8a5f -r 2d48db7151cf +multiblock/DiffOp.m
--- a/+multiblock/DiffOp.m	Tue Oct 18 17:26:02 2016 +0200
+++ b/+multiblock/DiffOp.m	Fri Oct 21 11:31:06 2016 +0200
@@ -105,11 +105,11 @@
             ops = sparse2cell(op, obj.NNN);
         end
 
-        % Creates the closere and penalty matrix for a given boundary condition,
+        % Creates the closure and penalty matrix for a given boundary condition,
         %    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)
+        function [closure, penalty] = boundary_condition(obj, boundary, type)
             I = boundary{1};
             name = boundary{2};
 
@@ -122,7 +122,7 @@
             closure{I,I} = blockClosure;
             closure = blockmatrix.toMatrix(closure);
 
-            div{2} = 1; % Penalty is a column vector
+            div{2} = size(blockPenalty, 2); % Penalty is a column vector
             if ~iscell(blockPenalty)
                 p = blockmatrix.zero(div);
                 p{I} = blockPenalty;