Mercurial > repos > public > sbplib
comparison +multiblock/Grid.m @ 578:1fe16b34f114 feature/grids
Add a type check for the grids cell array and a note regarding missplaced method
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 07 Sep 2017 09:18:55 +0200 |
parents | 08b6281ba2a9 |
children | b0386d2c180d |
comparison
equal
deleted
inserted
replaced
577:e45c9b56d50d | 578:1fe16b34f114 |
---|---|
20 % The boundary groups can be used to collect block | 20 % The boundary groups can be used to collect block |
21 % boundaries into physical boundaries to simplify | 21 % boundaries into physical boundaries to simplify |
22 % getting boundary operators and setting boundary conditions | 22 % getting boundary operators and setting boundary conditions |
23 function obj = Grid(grids, connections, boundaryGroups) | 23 function obj = Grid(grids, connections, boundaryGroups) |
24 default_arg('boundaryGroups', struct()); | 24 default_arg('boundaryGroups', struct()); |
25 assertType(grids, 'cell') | |
25 obj.grids = grids; | 26 obj.grids = grids; |
26 obj.connections = connections; | 27 obj.connections = connections; |
27 | 28 |
28 obj.nPoints = 0; | 29 obj.nPoints = 0; |
29 for i = 1:length(grids) | 30 for i = 1:length(grids) |
86 % Should the method to split an operator be moved here instead of being in multiblock.DiffOp? | 87 % Should the method to split an operator be moved here instead of being in multiblock.DiffOp? |
87 | 88 |
88 % Converts a gridfunction to a set of plot matrices | 89 % Converts a gridfunction to a set of plot matrices |
89 % Takes a grid function and and a structured grid. | 90 % Takes a grid function and and a structured grid. |
90 function F = funcToPlotMatrices(obj, gf) | 91 function F = funcToPlotMatrices(obj, gf) |
92 % TODO: This method should problably not be here. | |
93 % The funcToPlotMatrix uses .size poperty of the grids | |
94 % Which doesn't always exist for all types of grids. | |
95 % It's only valid for structured grids | |
91 gfs = obj.splitFunc(gf); | 96 gfs = obj.splitFunc(gf); |
92 | 97 |
93 F = cell(1, obj.nBlocks()); | 98 F = cell(1, obj.nBlocks()); |
94 | 99 |
95 for i = 1:obj.nBlocks() | 100 for i = 1:obj.nBlocks() |