comparison +multiblock/setAllInterfaceTypes.m @ 934:dd95470d4baf feature/utux2D

Change from opts to type in multiblock.setAllInterfaceTypes
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 04 Dec 2018 12:37:44 +0100
parents 1c61d8fa9903
children
comparison
equal deleted inserted replaced
928:1c61d8fa9903 934:dd95470d4baf
1 % g: multiblock grid 1 % Create interface configuration with a single type for all interfaces
2 % opts: struct of options 2 % g -- multiblock grid
3 % Returns g.nBlocks x g.nBlocks cell array with all interface opts set to opts. 3 % type -- type for all interfaces
4 function optsCell = setAllInterfaceTypes(g, opts) 4 function intfTypes = setAllInterfaceTypes(g, type)
5 5 intfTypes = cell(g.nBlocks(), g.nBlocks());
6 optsCell = cell(g.nBlocks(), g.nBlocks());
7 for i = 1:g.nBlocks() 6 for i = 1:g.nBlocks()
8 for j = 1:g.nBlocks 7 for j = 1:g.nBlocks()
9 if ~isempty(g.connections{i,j}) 8 if ~isempty(g.connections{i,j})
10 optsCell{i,j} = opts; 9 intfTypes{i,j} = type;
11 end 10 end
12 end 11 end
13 end 12 end
14
15 end 13 end