Mercurial > repos > public > sbplib
comparison +multiblock/Grid.m @ 453:819345fe7ff1 feature/grids
Add function to multiblock.Grid for getting plot matrices
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 11 May 2017 10:09:52 +0200 |
parents | b8ee5212f651 |
children | 8ba675cc8827 |
comparison
equal
deleted
inserted
replaced
452:56eb7c088bd4 | 453:819345fe7ff1 |
---|---|
77 end | 77 end |
78 | 78 |
79 gfs = mat2cell(gf, N, 1); | 79 gfs = mat2cell(gf, N, 1); |
80 end | 80 end |
81 | 81 |
82 % Converts a gridfunction to a set of plot matrices | |
83 % Takes a grid function and and a structured grid. | |
84 function F = funcToPlotMatrices(obj, gf) | |
85 gfs = obj.splitFunc(gf); | |
86 | |
87 F = cell(1, obj.nBlocks()); | |
88 | |
89 for i = 1:obj.nBlocks() | |
90 F{i} = grid.funcToPlotMatrix(obj.grids{i}, gfs{i}); | |
91 end | |
92 end | |
93 | |
94 | |
82 % Restricts the grid function gf on obj to the subgrid g. | 95 % Restricts the grid function gf on obj to the subgrid g. |
83 function gf = restrictFunc(obj, gf, g) | 96 function gf = restrictFunc(obj, gf, g) |
84 gfs = obj.splitFunc(gf); | 97 gfs = obj.splitFunc(gf); |
85 | 98 |
86 for i = 1:length(obj.grids) | 99 for i = 1:length(obj.grids) |