comparison +grid/Nodes.m @ 875:5b06d4afa732

Add grid for just a collection of nodes
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 01 Nov 2018 14:10:47 +0100
parents
children
comparison
equal deleted inserted replaced
874:95993ad2bd70 875:5b06d4afa732
1 classdef Nodes < grid.Grid
2 properties
3 coords
4 end
5
6 methods
7 % Creates a grid with one point for each row in coords.
8 % The dimension equals the number of columns in coords.
9 function obj = Nodes(coords)
10 obj.coords = coords;
11 end
12
13 function o = N(obj)
14 o = size(obj.coords, 1);
15 end
16
17 % d returns the spatial dimension of the grid
18 function o = D(obj)
19 o = size(obj.coords, 2);
20 end
21
22 % points returns a n x d matrix containing the coordinates for all points.
23 function X = points(obj)
24 X = obj.coords;
25 end
26
27 % Restricts the grid function gf on obj to the subgrid g.
28 function gf = restrictFunc(obj, gf, g)
29 error('Not implemented');
30 end
31
32 % Projects the grid function gf on obj to the grid g.
33 function gf = projectFunc(obj, gf, g)
34 error('Not implemented');
35 end
36
37 % Return the grid.boundaryIdentifiers of all boundaries in a cell array.
38 function bs = getBoundaryNames(obj)
39 error('Not implemented');
40 end
41
42 % Return coordinates for the given boundary
43 function b = getBoundary(obj, name)
44 error('Not implemented');
45 end
46 end
47 end