@@ -157,13 +157,15 @@ contains
157157 status = ' new'
158158 end if
159159
160- checkboundary: do i = 1 , 3
161- if (any (bc_type(1 , - 1 )%sf == - 17 ) .or. any (bc_type(i, 1 )%sf == - 17 )) then
162- call s_write_serial_boundary_condition_files(q_prim_vf, bc_type, t_step_dir)
163- exit checkboundary
160+ checkboundary1: do i = 1 , num_bc_patches
161+ if (bc_x%beg == - 17 .or. bc_x%beg == - 17 &
162+ .or. bc_y%beg == - 17 .or. bc_y%end == - 17 &
163+ .or. bc_z%beg == - 17 .or. bc_z%end == - 17 &
164+ .or. patch_bc(i)%type == - 17 ) then
165+ call s_write_serial_boundary_condition_files(q_prim_vf, bc_type, t_step_dir)
166+ exit checkboundary1
164167 end if
165- end do checkboundary
166-
168+ end do checkboundary1
167169 ! x- coordinate direction
168170 file_loc = trim (t_step_dir)// ' /x_cb.dat'
169171 open (1 , FILE= trim (file_loc), FORM= ' unformatted' , STATUS= status)
@@ -847,12 +849,15 @@ contains
847849 end if
848850#endif
849851
850- checkboundary: do i = 1 , 3
851- if (any (bc_type(1 , - 1 )%sf == - 17 ) .or. any (bc_type(i, 1 )%sf == - 17 )) then
852+ checkboundary2: do i = 1 , num_bc_patches
853+ if (bc_x%beg == - 17 .or. bc_x%beg == - 17 &
854+ .or. bc_y%beg == - 17 .or. bc_y%end == - 17 &
855+ .or. bc_z%beg == - 17 .or. bc_z%end == - 17 &
856+ .or. patch_bc(i)%type == - 17 ) then
852857 call s_write_parallel_boundary_condition_files(q_prim_vf, bc_type)
853- exit checkboundary
854- end if
855- end do checkboundary
858+ exit checkboundary2
859+ end if
860+ end do checkboundary2
856861
857862 end subroutine s_write_parallel_data_files
858863
0 commit comments