changeset 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 e45c9b56d50d
children a5f1b0267dba
files +multiblock/Grid.m
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
diff -r e45c9b56d50d -r 1fe16b34f114 +multiblock/Grid.m
--- a/+multiblock/Grid.m	Thu Sep 07 09:16:12 2017 +0200
+++ b/+multiblock/Grid.m	Thu Sep 07 09:18:55 2017 +0200
@@ -22,6 +22,7 @@
         %                   getting boundary operators and setting boundary conditions
         function obj = Grid(grids, connections, boundaryGroups)
             default_arg('boundaryGroups', struct());
+            assertType(grids, 'cell')
             obj.grids = grids;
             obj.connections = connections;
 
@@ -88,6 +89,10 @@
         % Converts a gridfunction to a set of plot matrices
         % Takes a grid function and and a structured grid.
         function F = funcToPlotMatrices(obj, gf)
+            % TODO: This method should problably not be here.
+            % The funcToPlotMatrix uses .size poperty of the grids
+            % Which doesn't always exist for all types of grids.
+            % It's only valid for structured grids
             gfs = obj.splitFunc(gf);
 
             F = cell(1, obj.nBlocks());