annotate +multiblock/setAllInterfaceTypes.m @ 928:1c61d8fa9903 feature/utux2D

Replace opts by type everywhere
author Martin Almquist <malmquist@stanford.edu>
date Mon, 03 Dec 2018 15:01:24 -0800
parents
children dd95470d4baf
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
928
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
1 % g: multiblock grid
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
2 % opts: struct of options
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
3 % Returns g.nBlocks x g.nBlocks cell array with all interface opts set to opts.
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
4 function optsCell = setAllInterfaceTypes(g, opts)
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
5
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
6 optsCell = cell(g.nBlocks(), g.nBlocks());
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
7 for i = 1:g.nBlocks()
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
8 for j = 1:g.nBlocks
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
9 if ~isempty(g.connections{i,j})
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
10 optsCell{i,j} = opts;
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
11 end
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
12 end
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
13 end
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
14
1c61d8fa9903 Replace opts by type everywhere
Martin Almquist <malmquist@stanford.edu>
parents:
diff changeset
15 end