@@ -866,6 +866,10 @@ contains
866866 call s_pressure_relaxation_procedure(q_cons_ts(1 )%vf)
867867 end if
868868
869+ q_cons_ts(1 )%vf(advxb)%sf(10 , 10 , 0 ) = - 1
870+ q_cons_ts(1 )%vf(contxe)%sf(10 , 10 , 0 ) = - 1
871+ q_Cons_ts(1 )%vf(advxe)%sf(5 , 5 , 0 ) = 1.1
872+
869873 if (comp_debug) call s_comprehensive_debug(q_cons_ts(1 )%vf, q_prim_vf, t_step, 3 )
870874
871875 if (adv_n) call s_comp_alpha_from_n(q_cons_ts(1 )%vf)
@@ -1034,79 +1038,10 @@ contains
10341038
10351039 type(scalar_field), dimension (sys_size) :: q_cons_vf, q_prim_vf
10361040 integer , intent (in ) :: t_step, stage
1037- integer :: j, k, l, i
1038- integer errors
1039- logical :: exists
1040-
1041- character (LEN= name_len) :: file_name = ' comp_debug.txt'
1042- character (LEN= path_len + name_len) :: file_path
1043- character (100 ) :: str_format
1044-
1045- ! Opening the run- time information file
1046- file_path = trim (case_dir)// ' /' // trim (file_name)
1047-
1048- str_format = " (I9, A, I3, A, I4, I4, I4, A, I2, A, I5, A, I5, I5, I5)"
10491041
1050- open (12 , FILE= trim (file_path), &
1051- STATUS= ' replace' )
1042+ integer :: errors
10521043
1053- errors = 0
1054-
1055- ! Check all variables for NaNs
1056- do i = 1 , sys_size
1057- !$acc update host(q_cons_vf(i)%sf)
1058- do l = 0 , p
1059- do k = 0 , n
1060- do j = 0 , m
1061- if (ieee_is_nan(q_cons_vf(i)%sf(j, k, l))) then
1062- write (12 , str_format) t_step, " NaN(s) in conservative variables after RK stage " , &
1063- stage, " at (j,k,l) " , j, k, l, " equation" , i, " proc" , proc_rank, &
1064- " (m, n, p)" , m, n, p
1065- errors = errors + 1
1066- end if
1067- end do
1068- end do
1069- end do
1070- end do
1071-
1072- ! Check for invalid volume fractions
1073- do i = advxb, advxe
1074- do l = 0 , p
1075- do k = 0 , n
1076- do j = 0 , m
1077- if (q_cons_vf(i)%sf(j, k, l) < 0d0 ) then
1078- write (12 , str_format) t_step, " Volume fraction < 0 after RK stage " , &
1079- stage, " at (j,k,l) " , j, k, l, " equation" , i, " proc" , proc_rank, &
1080- " (m, n, p)" , m, n, p
1081- errors = errors + 1
1082- elseif (q_cons_vf(i)%sf(j, k, l) > 1d0 + verysmall) then
1083- write (12 , str_format) t_step, " Volume fraction > 1 after RK stage " , &
1084- stage, " at (j,k,l) " , j, k, l, " equation" , i, " proc" , proc_rank, &
1085- " (m, n, p)" , m, n, p
1086- errors = errors + 1
1087- end if
1088- end do
1089- end do
1090- end do
1091- end do
1092-
1093- ! Check for invalid densities
1094- do i = contxb, contxe
1095- do l = 0 , p
1096- do k = 0 , n
1097- do j = 0 , m
1098- if (q_cons_vf(advxb + i - 1 )%sf(j, k, l) < 0d0 .and. q_cons_vf(i)%sf(j, k, l) < 0d0 .or. &
1099- q_cons_vf(advxb + i - 1 )%sf(j, k, l) > 0d0 .and. q_cons_Vf(i)%sf(j, k, l) < 0d0 ) then
1100- print * , q_cons_vf(advxb + i - 1 )%sf(j, k, l), q_cons_vf(i)%sf(j, k, l)
1101- write (12 , str_format) t_step, " Density is negative after RK stage " , &
1102- stage, " at (j,k,l) " , j, k, l, " equation" , i, " proc" , proc_rank, &
1103- " (m, n, p)" , m, n, p
1104- errors = errors + 1
1105- end if
1106- end do
1107- end do
1108- end do
1109- end do
1044+ call s_check_cells(q_cons_vf, q_prim_vf, t_step, stage, errors)
11101045
11111046 if (errors /= 0 ) then
11121047 close (12 )
0 commit comments