changeset 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 8f8f5ff23ead
children 4291731570bb
files +multiblock/setAllInterfaceOptions.m
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/+multiblock/setAllInterfaceOptions.m	Sun Dec 02 18:04:33 2018 -0800
+++ b/+multiblock/setAllInterfaceOptions.m	Mon Dec 03 12:02:27 2018 -0800
@@ -1,11 +1,15 @@
 % g: multiblock grid
 % opts: struct of options
-% Returns g.nBlocks x g.nBlocks cell array with all elements set to opts.
+% Returns g.nBlocks x g.nBlocks cell array with all interface opts set to opts.
 function optsCell = setAllInterfaceOptions(g, opts)
 
 	optsCell = cell(g.nBlocks(), g.nBlocks());
-	for i = 1:g.nBlocks()^2
-		optsCell{i} = opts;
+	for i = 1:g.nBlocks()
+		for j = 1:g.nBlocks
+			if ~isempty(g.connections{i,j})
+				optsCell{i,j} = opts;
+			end
+		end
 	end
 
 end
\ No newline at end of file