Mercurial > repos > public > sbplib
comparison +multiblock/EmptyGrid.m @ 585:6e6da40091b7 feature/grids
Add an empty type of multiblock grid
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 08 Sep 2017 14:38:29 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
584:b0386d2c180d | 585:6e6da40091b7 |
---|---|
1 classdef EmptyGrid < grid.Empty & multiblock.Grid | |
2 methods | |
3 function obj = EmptyGrid(D) | |
4 obj@multiblock.Grid({},cell(0,0)); | |
5 obj@grid.Empty(D); | |
6 end | |
7 | |
8 % n returns the number of points in the grid | |
9 function o = N(obj) | |
10 o = N@grid.Empty(obj); | |
11 end | |
12 | |
13 % d returns the spatial dimension of the grid | |
14 function o = D(obj) | |
15 o = D@grid.Empty(obj); | |
16 end | |
17 | |
18 % points returns a n x d matrix containing the coordinates for all points. | |
19 function X = points(obj) | |
20 X = points@grid.Empty(obj); | |
21 end | |
22 | |
23 % Restricts the grid function gf on obj to the subgrid g. | |
24 function gf = restrictFunc(obj, gf, g) | |
25 gf = restrictFunc@grid.Empty(obj); | |
26 end | |
27 | |
28 % Projects the grid function gf on obj to the grid g. | |
29 function gf = projectFunc(obj, gf, g) | |
30 gf = projectFunc@grid.Empty(obj); | |
31 end | |
32 | |
33 % Return the grid.boundaryIdentifiers of all boundaries in a cell array. | |
34 function bs = getBoundaryNames(obj) | |
35 bs = getBoundaryNames@grid.Empty(obj); | |
36 end | |
37 | |
38 % Return coordinates for the given boundary | |
39 function b = getBoundary(obj, name) | |
40 b = getBoundary@grid.Empty(name); | |
41 end | |
42 | |
43 function s = size(obj) | |
44 s = size@multiblock.Grid(obj); | |
45 end | |
46 end | |
47 end |