comparison +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
comparison
equal deleted inserted replaced
201:38f203f00f3a 202:e2fefb6f0746
100 % Splits a matrix operator into a cell-matrix of matrix operators for 100 % Splits a matrix operator into a cell-matrix of matrix operators for
101 % each grid. 101 % each grid.
102 ops = sparse2cell(op, obj.NNN); 102 ops = sparse2cell(op, obj.NNN);
103 end 103 end
104 104
105 function m = boundary_condition(obj,boundary,type,data) 105 % Creates the closere and penalty matrix for a given boundary condition,
106 % boundary -- the name of the boundary on the form [id][name] where
107 % id is the number of a block and name is the name of a
108 % boundary of that block example: 1s or 3w
109 function [closure, penalty] = boundary_condition(obj,boundary,type,data)
110 I = boundary(1)
111 name = boundary(2:end);
112
113 [c, p] = obj.diffOps{I}.boundary_condition(name, type, data);
114 end
115
116 function [closure, penalty] = interface(obj,boundary,neighbour_scheme,neighbour_boundary)
106 117
107 end 118 end
108
109 function m = interface(obj,boundary,neighbour_scheme,neighbour_boundary)
110
111 end
112
113 119
114 % Size returns the number of degrees of freedom 120 % Size returns the number of degrees of freedom
115 function N = size(obj) 121 function N = size(obj)
116 N = 0; 122 N = 0;
117 for i = 1:length(obj.diffOps) 123 for i = 1:length(obj.diffOps)