comparison +multiblock/Grid.m @ 233:b8ee5212f651 feature/beams

multiblock: Added a function to return number of points in each block for a mbGrid. Fixed a bug in DiffOp.
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 12 Jul 2016 17:08:15 +0200
parents 8b10476b9bb7
children 819345fe7ff1
comparison
equal deleted inserted replaced
232:443b14ea705b 233:b8ee5212f651
32 32
33 function n = size(obj) 33 function n = size(obj)
34 n = length(obj.grids); 34 n = length(obj.grids);
35 end 35 end
36 36
37 % n returns the number of points in the grid 37 % N returns the number of points in the grid
38 function o = N(obj) 38 function o = N(obj)
39 o = obj.nPoints; 39 o = obj.nPoints;
40 end
41
42 % Ns returns the number of points in each sub grid as a vector
43 function o = Ns(obj)
44 ns = zeros(1,obj.nBlocks);
45 for i = 1:obj.nBlocks;
46 ns(i) = obj.grids{i}.N();
47 end
48 o = ns;
40 end 49 end
41 50
42 function n = nBlocks(obj) 51 function n = nBlocks(obj)
43 n = length(obj.grids); 52 n = length(obj.grids);
44 end 53 end