From bec4881cbf2309a3642b9db4e48d3140a7c706b2 Mon Sep 17 00:00:00 2001 From: William Pringle Date: Thu, 7 Feb 2019 10:46:51 -0500 Subject: [PATCH] Update writefort15.m - fix for no open boundary conditions --- @msh/private/writefort15.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/@msh/private/writefort15.m b/@msh/private/writefort15.m index 9014d248..0d536df8 100644 --- a/@msh/private/writefort15.m +++ b/@msh/private/writefort15.m @@ -158,8 +158,10 @@ ibtype = [2 12 22 32 52] ; sm = 0 ; -for k = 1: length(ibtype) - sm = sm + sum(~(boudat.ibtype - ibtype(k))) ; +if ~isempty(boudat) + for k = 1: length(ibtype) + sm = sm + sum(~(boudat.ibtype - ibtype(k))) ; + end end if ( sm > 0 ) fprintf( fid, '%d \t \t ! NFFR \n', f15dat.nffr ) ;