Mercurial > repos > public > sbplib
changeset 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 | 56eb7c088bd4 |
children | d5bce13ece23 |
files | +multiblock/Grid.m |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/+multiblock/Grid.m Wed May 10 13:16:12 2017 +0200 +++ b/+multiblock/Grid.m Thu May 11 10:09:52 2017 +0200 @@ -79,6 +79,19 @@ gfs = mat2cell(gf, N, 1); end + % Converts a gridfunction to a set of plot matrices + % Takes a grid function and and a structured grid. + function F = funcToPlotMatrices(obj, gf) + gfs = obj.splitFunc(gf); + + F = cell(1, obj.nBlocks()); + + for i = 1:obj.nBlocks() + F{i} = grid.funcToPlotMatrix(obj.grids{i}, gfs{i}); + end + end + + % Restricts the grid function gf on obj to the subgrid g. function gf = restrictFunc(obj, gf, g) gfs = obj.splitFunc(gf);