Mercurial > repos > public > sbplib
diff +multiblock/setAllInterfaceTypes.m @ 1033:037f203b9bf5 feature/burgers1d
Merge with branch feature/advectioRV to utilize the +rv package
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 17 Jan 2019 10:44:12 +0100 |
parents | dd95470d4baf |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/+multiblock/setAllInterfaceTypes.m Thu Jan 17 10:44:12 2019 +0100 @@ -0,0 +1,13 @@ +% Create interface configuration with a single type for all interfaces +% g -- multiblock grid +% type -- type for all interfaces +function intfTypes = setAllInterfaceTypes(g, type) + intfTypes = cell(g.nBlocks(), g.nBlocks()); + for i = 1:g.nBlocks() + for j = 1:g.nBlocks() + if ~isempty(g.connections{i,j}) + intfTypes{i,j} = type; + end + end + end +end