Skip to content

Commit c913cc8

Browse files
committed
fixes for CCE
1 parent e50b2cc commit c913cc8

2 files changed

Lines changed: 6 additions & 17 deletions

File tree

src/simulation/m_thinc.fpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,13 @@ module m_thinc
2626
private; public :: s_initialize_thinc_module, s_thinc_compression, s_compute_mthinc_normals, s_finalize_thinc_module
2727

2828
!> 3-point Gauss-Legendre quadrature on [-1/2, 1/2]
29-
#if defined(MFC_OpenMP)
3029
!> Node locations: +-sqrt(3/5)/2, 0
3130
real(wp) :: gq3_pts(3) = [-5e-1_wp*0.7745966692414834_wp, 0._wp, 5e-1_wp*0.7745966692414834_wp]
3231
!> Weights: 5/18, 8/18, 5/18
3332
real(wp) :: gq3_wts(3) = [5._wp/18._wp, 8._wp/18._wp, 5._wp/18._wp]
3433
!> ln(2)
3534
real(wp) :: ln2 = 0.6931471805599453_wp
3635
$:GPU_DECLARE(create='[gq3_pts, gq3_wts, ln2]')
37-
#else
38-
!> Node locations: +-sqrt(3/5)/2, 0
39-
real(wp), parameter :: gq3_pts(3) = [-5e-1_wp*0.7745966692414834_wp, 0._wp, 5e-1_wp*0.7745966692414834_wp]
40-
!> Weights: 5/18, 8/18, 5/18
41-
real(wp), parameter :: gq3_wts(3) = [5._wp/18._wp, 8._wp/18._wp, 5._wp/18._wp]
42-
!> ln(2)
43-
real(wp), parameter :: ln2 = 0.6931471805599453_wp
44-
#endif
4536

4637
!> MTHINC precomputed data: unit normal components and interface position parameter d, computed before the dimensional splitting
4738
!! loop so multi-dimensional information is available per-direction.

src/simulation/m_weno.fpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,22 +1071,20 @@ contains
10711071
& - 2._wp*d_cbL_${XYZ}$ (0:weno_num_stencils,j))))
10721072
else if (wenoz) then
10731073
! Borges, et al. (2008)
1074-
10751074
tau = abs(beta(2) - beta(0)) ! Equation 25
10761075
$:GPU_LOOP(parallelism='[seq]')
1077-
do q = 0, weno_num_stencils
1078-
alpha(q) = d_cbL_${XYZ}$ (q, &
1079-
& j)*(1._wp + (tau/beta(q))) &
1080-
& ! Equation 28 (note: weno_eps was already added to beta)
1076+
do q = 0, weno_num_stencils ! Equation 28 (note: weno_eps was already added to beta)
1077+
alpha(q) = d_cbL_${XYZ}$ (q, j)*(1._wp + (tau/beta(q)))
10811078
end do
10821079
else if (teno) then
10831080
! Fu, et al. (2016) Fu''s code: https://dx.doi.org/10.13140/RG.2.2.36250.34247
10841081
tau = abs(beta(2) - beta(0)) ! Equation 25
10851082
$:GPU_LOOP(parallelism='[seq]')
10861083
do q = 0, weno_num_stencils
1087-
alpha(q) = 1._wp + tau/beta(q) ! Equation 22 (reuse alpha as gamma; pick C=1 & q=6)
1088-
alpha(q) = (alpha(q)**3._wp) &
1089-
& **2._wp ! Equation 22 cont. (some CPU compilers cannot optimize x**6.0)
1084+
! Equation 22 (reuse alpha as gamma; pick C=1 & q=6)
1085+
alpha(q) = 1._wp + tau/beta(q)
1086+
! Equation 22 cont. (some CPU compilers cannot optimize x**6.0)
1087+
alpha(q) = (alpha(q)**3._wp)**2._wp
10901088
end do
10911089
omega = alpha/sum(alpha)
10921090

0 commit comments

Comments
 (0)