Mercurial > repos > public > sbplib
diff +multiblock/setAllInterfaceTypes.m @ 955:92c3c170e90b
Merged in feature/utux2D (pull request #11)
Feature/utux2D
Approved-by: Jonatan Werpers <jonatan.werpers@it.uu.se>
Approved-by: Martin Almquist <malmquist@stanford.edu>
Approved-by: Vidar Stiernström <vidar.stiernstrom@it.uu.se>
author | Jonatan Werpers <jonatan.werpers@it.uu.se> |
---|---|
date | Mon, 10 Dec 2018 08:29:41 +0000 |
parents | dd95470d4baf |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/+multiblock/setAllInterfaceTypes.m Mon Dec 10 08:29:41 2018 +0000 @@ -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