comparison +grid/Staggered.m @ 1277:dc0ef82e3ec7 feature/poroelastic

Add better getBoundary method in grid/Staggered
author Martin Almquist <malmquist@stanford.edu>
date Sun, 07 Jun 2020 11:26:40 -0700
parents 8aa0909125a4
children
comparison
equal deleted inserted replaced
1276:bc2be302df90 1277:dc0ef82e3ec7
92 error('not implemented'); 92 error('not implemented');
93 end 93 end
94 end 94 end
95 95
96 % Return coordinates for the given boundary 96 % Return coordinates for the given boundary
97 function X = getBoundary(obj, name) 97 % gridGroup (scalar) - grid group to return coordinates for
98 % Use boundaries of first grid 98 % subGrids (array) - specifies which grids in the grid group to include (default: all grids in the grid group)
99 X = obj.gridGroups{1}{1}.getBoundary(name); 99 function X = getBoundary(obj, name, gridGroup, subGrids)
100
101 default_arg('gridGroup' , 1);
102 grids = obj.gridGroups{gridGroup};
103 default_arg('subGrids' , 1:numel(grids));
104
105 X = [];
106 for i = subGrids
107 X = [X; grids{i}.getBoundary(name)];
108 end
100 end 109 end
110
101 end 111 end
102 end 112 end