Mercurial > repos > public > sbplib
view +grid/evalOnStaggered.m @ 1278:ce422ba8964e feature/poroelastic
Add extra input pars to multiblock/Grid.getBoundary(), to be able to use the Staggered getBoundary method
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Sun, 07 Jun 2020 11:28:22 -0700 |
parents | 8aa0909125a4 |
children |
line wrap: on
line source
function gf = evalOnStaggered(g, f, gridGroup, subGrids) default_arg('gridGroup', 1); gf = []; if isa(g, 'multiblock.Grid') nSubGrids = numel(g.grids{1}.gridGroups{gridGroup}); default_arg('subGrids', 1:nSubGrids ); for i = 1:g.nBlocks() for j = subGrids gf = [gf; grid.evalOn(g.grids{i}.gridGroups{gridGroup}{j}, f)]; end end else nSubGrids = numel(g.gridGroups{gridGroup}); default_arg('subGrids', 1:nSubGrids ); for j = subGrids gf = [gf; grid.evalOn(g.grids{i}.gridGroups{gridGroup}{j}, f)]; end end end