Mercurial > repos > public > sbplib
comparison +grid/evalOnStaggered.m @ 1274:8aa0909125a4 feature/poroelastic
Add support for plotting and evaluating on curvilinear multiblock staggered grids
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Tue, 02 Jun 2020 11:44:38 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1273:cf542444f022 | 1274:8aa0909125a4 |
---|---|
1 function gf = evalOnStaggered(g, f, gridGroup, subGrids) | |
2 | |
3 default_arg('gridGroup', 1); | |
4 | |
5 gf = []; | |
6 | |
7 if isa(g, 'multiblock.Grid') | |
8 | |
9 nSubGrids = numel(g.grids{1}.gridGroups{gridGroup}); | |
10 default_arg('subGrids', 1:nSubGrids ); | |
11 | |
12 for i = 1:g.nBlocks() | |
13 for j = subGrids | |
14 gf = [gf; grid.evalOn(g.grids{i}.gridGroups{gridGroup}{j}, f)]; | |
15 end | |
16 end | |
17 | |
18 else | |
19 | |
20 nSubGrids = numel(g.gridGroups{gridGroup}); | |
21 default_arg('subGrids', 1:nSubGrids ); | |
22 | |
23 for j = subGrids | |
24 gf = [gf; grid.evalOn(g.grids{i}.gridGroups{gridGroup}{j}, f)]; | |
25 end | |
26 | |
27 end | |
28 | |
29 end |