diff +multiblock/setAllInterfaceTypes.m @ 979:7a5e770974ed feature/timesteppers

Merge with default
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 07 Jan 2019 16:26:00 +0100
parents dd95470d4baf
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/+multiblock/setAllInterfaceTypes.m	Mon Jan 07 16:26:00 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