Mercurial > repos > public > sbplib
comparison +grid/Cartesian.m @ 756:f891758ad7a4 feature/d1_staggered
Merge with feature/utux2d.
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Sat, 16 Jun 2018 14:30:45 -0700 |
parents | fcf004066ea9 |
children | 0ef96fcdc028 |
comparison
equal
deleted
inserted
replaced
755:14f0058356f2 | 756:f891758ad7a4 |
---|---|
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 |