Skip to content

Commit 63ce00e

Browse files
committed
bug fixes
1 parent 84054d4 commit 63ce00e

File tree

8 files changed

+32
-21
lines changed

8 files changed

+32
-21
lines changed

src/common/m_helper_basic.fpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ contains
110110
res = f_approx_equal(var, real(nint(var), wp))
111111
end function f_is_integer
112112

113-
pure subroutine s_configure_coordinate_bounds(weno_polyn, buff_size, idwint, idwbuff, &
113+
pure subroutine s_configure_coordinate_bounds(weno_polyn, igr_order, buff_size, idwint, idwbuff, &
114114
viscous, bubbles_lagrange, m, n, p, num_dims, igr)
115115

116-
integer, intent(in) :: weno_polyn, m, n, p, num_dims
116+
integer, intent(in) :: weno_polyn, m, n, p, num_dims, igr_order
117117
integer, intent(inout) :: buff_size
118118
type(int_bounds_info), dimension(3), intent(inout) :: idwint, idwbuff
119119
logical, intent(in) :: viscous, bubbles_lagrange
@@ -125,9 +125,9 @@ contains
125125
! the next one
126126
if (igr) then
127127
if (viscous) then
128-
buff_size = 6
128+
buff_size = (igr_order - 1) / 2 + 2
129129
else
130-
buff_size = 4
130+
buff_size = (igr_order - 1) / 2 + 1
131131
end if
132132
else
133133
if (viscous) then

src/common/m_variables_conversion.fpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,10 +1147,12 @@ contains
11471147
end do
11481148
end if
11491149

1150-
$:GPU_LOOP(parallelism='[seq]')
1151-
do i = advxb, advxe
1152-
qK_prim_vf(i)%sf(j, k, l) = qK_cons_vf(i)%sf(j, k, l)
1153-
end do
1150+
if (.not. igr .or. num_fluids > 1) then
1151+
$:GPU_LOOP(parallelism='[seq]')
1152+
do i = advxb, advxe
1153+
qK_prim_vf(i)%sf(j, k, l) = qK_cons_vf(i)%sf(j, k, l)
1154+
end do
1155+
end if
11541156

11551157
if (surface_tension) then
11561158
qK_prim_vf(c_idx)%sf(j, k, l) = qK_cons_vf(c_idx)%sf(j, k, l)

src/post_process/m_global_parameters.fpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,11 +529,15 @@ contains
529529
adv_idx%end = E_idx + num_fluids
530530

531531
if (igr) then
532-
sys_size = adv_idx%end - 1
532+
adv_idx%beg = E_idx + 1
533+
adv_idx%end = E_idx + num_fluids - 1
533534
else
534-
sys_size = adv_idx%end
535+
adv_idx%beg = E_idx + 1
536+
adv_idx%end = E_idx + num_fluids
535537
end if
536538

539+
sys_size = adv_idx%end
540+
537541
if (bubbles_euler) then
538542
alf_idx = adv_idx%end
539543
else

src/pre_process/m_assign_variables.fpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,6 @@ contains
386386
end do
387387
end if
388388
389-
390389
if (.not. igr .or. num_fluids > 1) then
391390
! Volume fraction(s)
392391
do i = adv_idx%beg, adv_idx%end

src/pre_process/m_global_parameters.fpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -605,11 +605,15 @@ contains
605605
adv_idx%end = E_idx + num_fluids
606606

607607
if (igr) then
608-
sys_size = adv_idx%end - 1
608+
adv_idx%beg = E_idx + 1
609+
adv_idx%end = E_idx + num_fluids - 1
609610
else
610-
sys_size = adv_idx%end
611+
adv_idx%beg = E_idx + 1
612+
adv_idx%end = E_idx + num_fluids
611613
end if
612614

615+
sys_size = adv_idx%end
616+
613617
if (bubbles_euler) then
614618
alf_idx = adv_idx%end
615619
else
@@ -870,7 +874,7 @@ contains
870874
chemxb = species_idx%beg
871875
chemxe = species_idx%end
872876

873-
call s_configure_coordinate_bounds(weno_polyn, buff_size, &
877+
call s_configure_coordinate_bounds(weno_polyn, igr_order, buff_size, &
874878
idwint, idwbuff, viscous, &
875879
bubbles_lagrange, m, n, p, &
876880
num_dims, igr)

src/pre_process/m_mpi_proxy.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ contains
4646
& 'weno_order', 'precision', 'perturb_flow_fluid', &
4747
& 'perturb_sph_fluid', 'num_patches', 'thermal', 'nb', 'dist_type',&
4848
& 'R0_type', 'relax_model', 'num_ibs', 'n_start', 'elliptic_smoothing_iters', &
49-
& 'num_bc_patches', 'mixlayer_perturb_nk' ]
49+
& 'num_bc_patches', 'mixlayer_perturb_nk', 'igr_order' ]
5050
call MPI_BCAST(${VAR}$, 1, MPI_INTEGER, 0, MPI_COMM_WORLD, ierr)
5151
#:endfor
5252

src/simulation/m_global_parameters.fpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -861,15 +861,17 @@ contains
861861
mom_idx%beg = cont_idx%end + 1
862862
mom_idx%end = cont_idx%end + num_vels
863863
E_idx = mom_idx%end + 1
864-
adv_idx%beg = E_idx + 1
865-
adv_idx%end = E_idx + num_fluids
866864
867865
if (igr) then
868-
sys_size = adv_idx%end - 1
866+
adv_idx%beg = E_idx + 1
867+
adv_idx%end = E_idx + num_fluids - 1
869868
else
870-
sys_size = adv_idx%end
869+
adv_idx%beg = E_idx + 1
870+
adv_idx%end = E_idx + num_fluids
871871
end if
872872
873+
sys_size = adv_idx%end
874+
873875
if (bubbles_euler) then
874876
alf_idx = adv_idx%end
875877
else
@@ -1211,7 +1213,7 @@ contains
12111213
fd_number = max(1, fd_order/2)
12121214
end if
12131215
1214-
call s_configure_coordinate_bounds(weno_polyn, buff_size, &
1216+
call s_configure_coordinate_bounds(weno_polyn, igr_order, buff_size, &
12151217
idwint, idwbuff, viscous, &
12161218
bubbles_lagrange, m, n, p, &
12171219
num_dims, igr)

src/simulation/m_sim_helpers.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ contains
109109
if (igr) then
110110
if (num_fluids == 1) then
111111
alpha_rho(1) = q_prim_vf(contxb)%sf(j, k, l)
112-
alpha(1) = q_prim_vf(advxb)%sf(j, k, l)
112+
alpha(1) = 1._wp
113113
else
114114
$:GPU_LOOP(parallelism='[seq]')
115115
do i = 1, num_fluids - 1

0 commit comments

Comments
 (0)