view +multiblock/setAllInterfaceTypes.m @ 1254:204b47c51bf8 feature/FMMlabb

Add annulus
author Ylva Rydin <ylva.rydin@telia.com>
date Wed, 22 Jan 2020 15:18:11 +0100
parents dd95470d4baf
children
line wrap: on
line source

% 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