changeset 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 764438b52541
files +multiblock/DiffOp.m cell2vector.m
diffstat 2 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
diff -r 38f203f00f3a -r e2fefb6f0746 +multiblock/DiffOp.m
--- 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;
diff -r 38f203f00f3a -r e2fefb6f0746 cell2vector.m
--- a/cell2vector.m	Tue Jun 14 15:07:34 2016 +0200
+++ b/cell2vector.m	Tue Jun 14 15:45:28 2016 +0200
@@ -11,4 +11,8 @@
         n(i) = length(cv{i});
         v = [v; cv{i}];
     end
-end
\ No newline at end of file
+end
+
+
+% IS THIS ONE REALLY NEEDED? JUST USE cell2sparse?
+