comparison +multiblock/Grid.m @ 198:6fb354955c37 feature/grids

Paused work on boundaryGroups and getBoundaryNames. Are they really needed?
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 13 Jun 2016 16:49:11 +0200
parents 6054dcd3c8a9
children 8b10476b9bb7
comparison
equal deleted inserted replaced
192:3cedd5a596bb 198:6fb354955c37
1 classdef Grid < grid.Grid 1 classdef Grid < grid.Grid
2 properties 2 properties
3 grids 3 grids
4 connections 4 connections
5 boundaryGroups
5 6
6 nPoints 7 nPoints
7 end 8 end
8 9
9 % General multiblock grid 10 % General multiblock grid
13 % connections -- NxN upper triangular cell matrix. connections{i,j} 14 % connections -- NxN upper triangular cell matrix. connections{i,j}
14 % specifies the connection between block i and j. If 15 % specifies the connection between block i and j. If
15 % it's empty there is no connection otherwise it's a 2 16 % it's empty there is no connection otherwise it's a 2
16 % -cell-vector with strings naming the boundaries to be 17 % -cell-vector with strings naming the boundaries to be
17 % connected. (inverted coupling?) 18 % connected. (inverted coupling?)
18 function obj = Grid(grids, connections, boundaryGroup) 19 %% Should we have boundary groups at all? maybe it can be handled in a
20 %% cleaner way outside of the class.
21 function obj = Grid(grids, connections, boundaryGroups)
19 obj.grids = grids; 22 obj.grids = grids;
20 obj.connections = connections; 23 obj.connections = connections;
21 24
22 obj.nPoints = 0; 25 obj.nPoints = 0;
23 for i = 1:length(grids) 26 for i = 1:length(grids)
24 obj.nPoints = obj.nPoints + grids{i}.N(); 27 obj.nPoints = obj.nPoints + grids{i}.N();
25 end 28 end
29
30 % if iscell(boundaryGroups)
26 end 31 end
27 32
28 function n = size(obj) 33 function n = size(obj)
29 n = length(obj.grids); 34 n = length(obj.grids);
30 end 35 end