comparison +multiblock/Grid.m @ 530:0cd7b8128e04 feature/boundaryGroup

Implement getBoundary in multiblock.Grid
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 03 Aug 2017 15:01:12 +0200
parents 2ec8080027ab
children d5bc51537a8c
comparison
equal deleted inserted replaced
529:2ec8080027ab 530:0cd7b8128e04
129 function bs = getBoundaryNames(obj) 129 function bs = getBoundaryNames(obj)
130 error('not implemented'); 130 error('not implemented');
131 end 131 end
132 132
133 % Return coordinates for the given boundary/boundaryGroup 133 % Return coordinates for the given boundary/boundaryGroup
134 function b = getBoundary(obj, name) 134 function b = getBoundary(obj, boundary)
135 error('not implemented'); 135 switch class(boundary)
136 case 'cell'
137 I = boundary{1};
138 name = boundary{2};
139 b = obj.grids{I}.getBoundary(name);
140 case 'multiblock.BoundaryGroup'
141 b = [];
142 for i = 1:length(boundary)
143 b = [b; obj.getBoundary(boundary{i})];
144 end
145 otherwise
146 error('Unknown boundary indentifier')
147 end
136 end 148 end
137 end 149 end
138 end 150 end