diff +multiblock/DiffOp.m @ 202:e2fefb6f0746 feature/grids

multiblock.DiffOp: Fleshed out boundary_condition() a bit more
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 14 Jun 2016 15:45:28 +0200
parents 38f203f00f3a
children 39b7dcb2c724
line wrap: on
line diff
--- a/+multiblock/DiffOp.m	Tue Jun 14 15:07:34 2016 +0200
+++ b/+multiblock/DiffOp.m	Tue Jun 14 15:45:28 2016 +0200
@@ -102,15 +102,21 @@
             ops = sparse2cell(op, obj.NNN);
         end
 
-        function m = boundary_condition(obj,boundary,type,data)
+        % Creates the closere 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,data)
+            I = boundary(1)
+            name = boundary(2:end);
 
+            [c, p] = obj.diffOps{I}.boundary_condition(name, type, data);
         end
 
-        function m = interface(obj,boundary,neighbour_scheme,neighbour_boundary)
+        function [closure, penalty] = interface(obj,boundary,neighbour_scheme,neighbour_boundary)
 
         end
 
-
         % Size returns the number of degrees of freedom
         function N = size(obj)
             N = 0;