comparison +grid/evalOnStaggered.m @ 1331:60c875c18de3 feature/D2_boundary_opt

Merge with feature/poroelastic for Elastic schemes
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 10 Mar 2022 16:54:26 +0100
parents 8aa0909125a4
children
comparison
equal deleted inserted replaced
1330:855871e0b852 1331:60c875c18de3
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