comparison +grid/Cartesian.m @ 717:8e4274ee6dd8 feature/utux2D

Merge with feature/poroelastic
author Martin Almquist <malmquist@stanford.edu>
date Sat, 03 Mar 2018 14:58:21 -0800
parents fcf004066ea9
children 0ef96fcdc028
comparison
equal deleted inserted replaced
666:2d85f17a8aec 717:8e4274ee6dd8
3 n % Number of points in the grid 3 n % Number of points in the grid
4 d % Number of dimensions 4 d % Number of dimensions
5 m % Number of points in each direction 5 m % Number of points in each direction
6 x % Cell array of vectors with node placement for each dimension. 6 x % Cell array of vectors with node placement for each dimension.
7 h % Spacing/Scaling 7 h % Spacing/Scaling
8 lim % Cell array of left and right boundaries for each dimension.
8 end 9 end
9 10
10 % General d dimensional grid with n points 11 % General d dimensional grid with n points
11 methods 12 methods
12 % Creates a cartesian grid given vectors conatining the coordinates 13 % Creates a cartesian grid given vectors conatining the coordinates
25 if obj.n == 0 26 if obj.n == 0
26 error('grid:Cartesian:EmptyGrid','Input parameter gives an empty grid.') 27 error('grid:Cartesian:EmptyGrid','Input parameter gives an empty grid.')
27 end 28 end
28 29
29 obj.h = []; 30 obj.h = [];
31 obj.lim = [];
30 end 32 end
31 % n returns the number of points in the grid 33 % n returns the number of points in the grid
32 function o = N(obj) 34 function o = N(obj)
33 o = obj.n; 35 o = obj.n;
34 end 36 end