diff +multiblock/setAllInterfaceTypes.m @ 1072:6468a5f6ec79 feature/grids/LaplaceSquared

Merge with default
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 12 Feb 2019 17:12:42 +0100
parents dd95470d4baf
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/+multiblock/setAllInterfaceTypes.m	Tue Feb 12 17:12:42 2019 +0100
@@ -0,0 +1,13 @@
+% Create interface configuration with a single type for all interfaces
+%    g -- multiblock grid
+% type -- type for all interfaces
+function intfTypes = setAllInterfaceTypes(g, type)
+	intfTypes = cell(g.nBlocks(), g.nBlocks());
+	for i = 1:g.nBlocks()
+		for j = 1:g.nBlocks()
+			if ~isempty(g.connections{i,j})
+				intfTypes{i,j} = type;
+			end
+		end
+	end
+end