Mercurial > repos > public > sbplib
comparison +multiblock/setAllInterfaceOptions.m @ 926:60a3bc79835a feature/utux2D
Make multiblock.setAllInterfaceOptions set opts only for those entries where grid.connections indicates interface couplings.
author | Martin Almquist <malmquist@stanford.edu> |
---|---|
date | Mon, 03 Dec 2018 12:02:27 -0800 |
parents | 93a5c59dd2fb |
children |
comparison
equal
deleted
inserted
replaced
925:8f8f5ff23ead | 926:60a3bc79835a |
---|---|
1 % g: multiblock grid | 1 % g: multiblock grid |
2 % opts: struct of options | 2 % opts: struct of options |
3 % Returns g.nBlocks x g.nBlocks cell array with all elements set to opts. | 3 % Returns g.nBlocks x g.nBlocks cell array with all interface opts set to opts. |
4 function optsCell = setAllInterfaceOptions(g, opts) | 4 function optsCell = setAllInterfaceOptions(g, opts) |
5 | 5 |
6 optsCell = cell(g.nBlocks(), g.nBlocks()); | 6 optsCell = cell(g.nBlocks(), g.nBlocks()); |
7 for i = 1:g.nBlocks()^2 | 7 for i = 1:g.nBlocks() |
8 optsCell{i} = opts; | 8 for j = 1:g.nBlocks |
9 if ~isempty(g.connections{i,j}) | |
10 optsCell{i,j} = opts; | |
11 end | |
12 end | |
9 end | 13 end |
10 | 14 |
11 end | 15 end |