Mercurial > repos > public > sbplib
annotate +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 |
rev | line source |
---|---|
924
93a5c59dd2fb
Add helper function multiblock.SetAllInterfaceOptions.
Martin Almquist <malmquist@stanford.edu>
parents:
diff
changeset
|
1 % g: multiblock grid |
93a5c59dd2fb
Add helper function multiblock.SetAllInterfaceOptions.
Martin Almquist <malmquist@stanford.edu>
parents:
diff
changeset
|
2 % opts: struct of options |
926
60a3bc79835a
Make multiblock.setAllInterfaceOptions set opts only for those entries where grid.connections indicates interface couplings.
Martin Almquist <malmquist@stanford.edu>
parents:
924
diff
changeset
|
3 % Returns g.nBlocks x g.nBlocks cell array with all interface opts set to opts. |
924
93a5c59dd2fb
Add helper function multiblock.SetAllInterfaceOptions.
Martin Almquist <malmquist@stanford.edu>
parents:
diff
changeset
|
4 function optsCell = setAllInterfaceOptions(g, opts) |
93a5c59dd2fb
Add helper function multiblock.SetAllInterfaceOptions.
Martin Almquist <malmquist@stanford.edu>
parents:
diff
changeset
|
5 |
93a5c59dd2fb
Add helper function multiblock.SetAllInterfaceOptions.
Martin Almquist <malmquist@stanford.edu>
parents:
diff
changeset
|
6 optsCell = cell(g.nBlocks(), g.nBlocks()); |
926
60a3bc79835a
Make multiblock.setAllInterfaceOptions set opts only for those entries where grid.connections indicates interface couplings.
Martin Almquist <malmquist@stanford.edu>
parents:
924
diff
changeset
|
7 for i = 1:g.nBlocks() |
60a3bc79835a
Make multiblock.setAllInterfaceOptions set opts only for those entries where grid.connections indicates interface couplings.
Martin Almquist <malmquist@stanford.edu>
parents:
924
diff
changeset
|
8 for j = 1:g.nBlocks |
60a3bc79835a
Make multiblock.setAllInterfaceOptions set opts only for those entries where grid.connections indicates interface couplings.
Martin Almquist <malmquist@stanford.edu>
parents:
924
diff
changeset
|
9 if ~isempty(g.connections{i,j}) |
60a3bc79835a
Make multiblock.setAllInterfaceOptions set opts only for those entries where grid.connections indicates interface couplings.
Martin Almquist <malmquist@stanford.edu>
parents:
924
diff
changeset
|
10 optsCell{i,j} = opts; |
60a3bc79835a
Make multiblock.setAllInterfaceOptions set opts only for those entries where grid.connections indicates interface couplings.
Martin Almquist <malmquist@stanford.edu>
parents:
924
diff
changeset
|
11 end |
60a3bc79835a
Make multiblock.setAllInterfaceOptions set opts only for those entries where grid.connections indicates interface couplings.
Martin Almquist <malmquist@stanford.edu>
parents:
924
diff
changeset
|
12 end |
924
93a5c59dd2fb
Add helper function multiblock.SetAllInterfaceOptions.
Martin Almquist <malmquist@stanford.edu>
parents:
diff
changeset
|
13 end |
93a5c59dd2fb
Add helper function multiblock.SetAllInterfaceOptions.
Martin Almquist <malmquist@stanford.edu>
parents:
diff
changeset
|
14 |
93a5c59dd2fb
Add helper function multiblock.SetAllInterfaceOptions.
Martin Almquist <malmquist@stanford.edu>
parents:
diff
changeset
|
15 end |