Skip to content

Commit 40187df

Browse files
committed
Merge branch 'master' into 1d2dhyper
2 parents be859c5 + b6c2863 commit 40187df

File tree

10 files changed

+246
-20
lines changed

10 files changed

+246
-20
lines changed

src/common/m_checker_common.fpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,11 @@ contains
331331
if (any((/bc_${X}$%${VB2}$, bc_${X}$%${VB3}$/) /= 0._wp)) then
332332
call s_mpi_abort("bc_${X}$%beg must be -15 if "// &
333333
"bc_${X}$%${VB2}$ or bc_${X}$%${VB3}$ "// &
334-
"is set. Exiting.")
334+
"is set. Exiting.", CASE_FILE_ERROR_CODE)
335335
end if
336336
elseif (bc_${X}$%beg /= -16) then
337337
call s_mpi_abort("bc_${X}$%beg must be -15 or -16 if "// &
338-
"bc_${X}$%vb[1,2,3] is set. Exiting.")
338+
"bc_${X}$%vb[1,2,3] is set. Exiting.", CASE_FILE_ERROR_CODE)
339339
end if
340340
end if
341341
#:endfor
@@ -346,11 +346,11 @@ contains
346346
if (any((/bc_${X}$%${VE2}$, bc_${X}$%${VE3}$/) /= 0._wp)) then
347347
call s_mpi_abort("bc_${X}$%end must be -15 if "// &
348348
"bc_${X}$%${VE2}$ or bc_${X}$%${VE3}$ "// &
349-
"is set. Exiting.")
349+
"is set. Exiting.", CASE_FILE_ERROR_CODE)
350350
end if
351351
elseif (bc_${X}$%end /= -16) then
352352
call s_mpi_abort("bc_${X}$%end must be -15 or -16 if "// &
353-
"bc_${X}$%ve[1,2,3] is set. Exiting.")
353+
"bc_${X}$%ve[1,2,3] is set. Exiting.", CASE_FILE_ERROR_CODE)
354354
end if
355355
end if
356356
#:endfor

src/common/m_constants.fpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,7 @@ module m_constants
7878
real(wp), parameter :: ERRCON = 1.89e-4_wp !< Limit to slightly increase dt when truncation error is between ERRCON and 1
7979
real(wp), parameter :: PGROW = -0.2_wp !< Factor to increase dt when truncation error is between ERRCON and 1
8080

81+
! System constants
82+
integer, parameter :: CASE_FILE_ERROR_CODE = 22
83+
8184
end module m_constants

src/common/m_helper.fpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -475,17 +475,14 @@ contains
475475
subroutine s_prohibit_abort(condition, message)
476476
character(len=*), intent(in) :: condition, message
477477
478-
print *, " "
479-
print *, " "
480-
print *, " CASE FILE ERROR "
481-
print *, " "
482-
print *, "Prohibited condition: ", trim(condition)
478+
print *, ""
479+
print *, "CASE FILE ERROR"
480+
print *, " - Prohibited condition: ", trim(condition)
483481
if (len_trim(message) > 0) then
484-
print *, "Note: ", trim(message)
482+
print *, " - Note: ", trim(message)
485483
end if
486-
print *, " "
487484
print *, ""
488-
call s_mpi_abort
485+
call s_mpi_abort(code=CASE_FILE_ERROR_CODE)
489486
end subroutine s_prohibit_abort
490487
491488
!> This function generates the unassociated legendre poynomials

src/common/m_mpi_common.fpp

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -474,9 +474,10 @@ contains
474474
475475
!> The subroutine terminates the MPI execution environment.
476476
!! @param prnt error message to be printed
477-
subroutine s_mpi_abort(prnt)
477+
subroutine s_mpi_abort(prnt, code)
478478
479479
character(len=*), intent(in), optional :: prnt
480+
integer, intent(in), optional :: code
480481
481482
if (present(prnt)) then
482483
print *, prnt
@@ -485,14 +486,18 @@ contains
485486
end if
486487
487488
#ifndef MFC_MPI
488-
489-
stop 1
490-
489+
if (present(code)) then
490+
stop code
491+
else
492+
stop 1
493+
end if
491494
#else
492-
493495
! Terminating the MPI environment
494-
call MPI_ABORT(MPI_COMM_WORLD, 1, ierr)
495-
496+
if (present(code)) then
497+
call MPI_ABORT(MPI_COMM_WORLD, code, ierr)
498+
else
499+
call MPI_ABORT(MPI_COMM_WORLD, 1, ierr)
500+
end if
496501
#endif
497502
498503
end subroutine s_mpi_abort

src/pre_process/m_checker.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ contains
7676
"${DIR}$_domain%${BOUND}$ must not be set when ${VAR}$ > 0 and old_grid = T")
7777
@:PROHIBIT(${VAR}$ > 0 .and. (.not. old_grid) .and. f_is_default(${DIR}$_domain%${BOUND}$), &
7878
"${DIR}$_domain%${BOUND}$ must be set when ${VAR}$ > 0 and old_grid = F")
79-
@:PROHIBIT(${VAR}$ > 0 .and. ${DIR}$_domain%beg >= ${DIR}$_domain%end, &
79+
@:PROHIBIT(${VAR}$ > 0 .and. (.not. old_grid) .and. ${DIR}$_domain%beg >= ${DIR}$_domain%end, &
8080
"${DIR}$_domain%beg must be less than ${DIR}$_domain%end when both are set")
8181
#:endfor
8282
end if

src/simulation/m_riemann_solvers.fpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,31 @@ contains
853853
flux_src_rs${XYZ}$_vf(j, k, l, i) = 0._wp
854854
end do
855855
end if
856+
857+
#:if (NORM_DIR == 2)
858+
if (cyl_coord) then
859+
!Substituting the advective flux into the inviscid geometrical source flux
860+
!$acc loop seq
861+
do i = 1, E_idx
862+
flux_gsrc_rs${XYZ}$_vf(j, k, l, i) = flux_rs${XYZ}$_vf(j, k, l, i)
863+
end do
864+
! Recalculating the radial momentum geometric source flux
865+
flux_gsrc_rs${XYZ}$_vf(j, k, l, contxe + dir_idx(1)) = &
866+
(s_M*(rho_R*vel_R(dir_idx(1)) &
867+
*vel_R(dir_idx(1))) &
868+
- s_P*(rho_L*vel_L(dir_idx(1)) &
869+
*vel_L(dir_idx(1))) &
870+
+ s_M*s_P*(rho_L*vel_L(dir_idx(1)) &
871+
- rho_R*vel_R(dir_idx(1)))) &
872+
/(s_M - s_P)
873+
! Geometrical source of the void fraction(s) is zero
874+
!$acc loop seq
875+
do i = advxb, advxe
876+
flux_gsrc_rs${XYZ}$_vf(j, k, l, i) = 0._wp
877+
end do
878+
end if
879+
#:endif
880+
856881
end do
857882
end do
858883
end do

tests/6FE484B5/golden-metadata.txt

Lines changed: 176 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)