Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
5a8ca06
MTHINC interface compression method
sbryngelson Mar 26, 2026
b7f85c6
fix: remove stale THINC comment from m_muscl.fpp
sbryngelson Mar 26, 2026
4c67385
fix: add GPU_DECLARE/GPU_UPDATE for int_comp, ic_eps, ic_beta
sbryngelson Mar 27, 2026
102c3f1
fix MPI decomposition
wilfonba Mar 29, 2026
80cc822
fix openmp build and add nvtx ranges
wilfonba Mar 30, 2026
ec3d918
fix weno/muscl_order = 1 with int_comp > 0 test suite error
wilfonba Mar 30, 2026
d8731d7
Merge branch 'master' into MTHINC
sbryngelson Mar 31, 2026
6ef3991
review comments. Passes with OpenMP and OpenACC on NVHPC 25.11
wilfonba Mar 31, 2026
e50b2cc
Merge remote-tracking branch 'upstream/master' into MTHINC
wilfonba Apr 1, 2026
c913cc8
fixes for CCE
wilfonba Apr 1, 2026
ff02cc6
Merge branch 'master' into MTHINC
sbryngelson Apr 1, 2026
f3caca5
Merge branch 'master' into MTHINC
sbryngelson Apr 2, 2026
a4e0967
restor RDMA MPI golden files
wilfonba Apr 2, 2026
f515368
Merge branch 'MTHINC' of github.com:wilfonba/MFC-Wilfong into MTHINC
wilfonba Apr 2, 2026
38a4bf4
styleistic changes
wilfonba Apr 4, 2026
8310981
Merge remote-tracking branch 'upstream/master' into MTHINC
wilfonba Apr 4, 2026
9c875b1
precheck
wilfonba Apr 4, 2026
a4bed32
add claude review suggestions
wilfonba Apr 9, 2026
c045e06
Merge remote-tracking branch 'upstream/master' into MTHINC
wilfonba Apr 9, 2026
5f1a1e5
fix test suite for num_fluids==2 requirement with int_comp enabled
wilfonba Apr 9, 2026
2c18593
fix interface compression tests by using sharp IC
wilfonba Apr 9, 2026
0ad7445
add cases.py changes for int_comp tests IC
wilfonba Apr 9, 2026
e2c090e
Merge remote-tracking branch 'upstream/master' into MTHINC
wilfonba Apr 9, 2026
b06fdfa
restore RDMA test files
wilfonba Apr 9, 2026
6d10d7b
merge
wilfonba Apr 11, 2026
8bb2f25
add normal snapping for near grid aligned normals in MTHINC
wilfonba Apr 11, 2026
4e306df
avoid dividing by zero in MTHINC
wilfonba Apr 12, 2026
41950bc
Merge master into MTHINC: resolve conflicts
sbryngelson May 4, 2026
c183e43
fix: use compact declaration style in m_global_parameters.fpp to pass…
sbryngelson May 4, 2026
b4e01f8
fix: clear weno_eps/wenoz_q/teno_CT in alter_int_comp MUSCL push to p…
sbryngelson May 4, 2026
631ca82
format: collapse multi-line ValueError in registry.py to pass formatter
sbryngelson May 4, 2026
78062e3
test: regenerate 5126B21F golden file with gfortran CPU (matches CI)
sbryngelson May 4, 2026
5d4d53d
fix: stable log_cosh difference and prohibit int_comp with viscous/su…
sbryngelson May 5, 2026
b1ae94d
fix: remove int_comp from rayleigh_taylor_muscl example (incompatible…
sbryngelson May 5, 2026
f31ce15
fix: use full reconstruction with int_comp to enable THINC with visco…
sbryngelson May 5, 2026
3e3661c
test: regenerate 35635326 golden after enabling THINC with viscous re…
sbryngelson May 5, 2026
8991b27
fix: extend int_comp full reconstruction to surface_tension path
sbryngelson May 5, 2026
5b52d83
fix: correct MTHINC normals on non-uniform grids by weighting by cell…
sbryngelson May 5, 2026
ae74a6a
test: add MTHINC non-uniform grid golden test (circular bubble + stre…
sbryngelson May 5, 2026
cbabce3
fix: copy Gauss-quadrature constants to device, remove dead f_log_cosh
sbryngelson May 6, 2026
3ebb1e3
fix: add use m_nvtx, clamp atanh in f_log_cosh_diff, add Fortran chec…
sbryngelson May 6, 2026
0f37542
fix: prohibit int_comp > 0 with model_eqns = 3 (THINC leaves int_en s…
sbryngelson May 7, 2026
234717e
refactor: remove Fortran checks already covered by Python validator
sbryngelson May 7, 2026
e6cd3c1
merge: resolve conflicts with master after #1303 merge
sbryngelson May 7, 2026
99ae595
test: add surface_tension+int_comp golden tests and negative validato…
sbryngelson May 7, 2026
6051590
Merge branch 'master' into MTHINC
sbryngelson May 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/simulation/m_muscl.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module m_muscl
use m_mpi_proxy
use m_helper
use m_thinc
use m_nvtx

private; public :: s_initialize_muscl_module, s_muscl, s_finalize_muscl_module

Expand Down
11 changes: 10 additions & 1 deletion src/simulation/m_rhs.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,16 @@ contains
& qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, id)
end if
else
if (all(Re_size == 0)) then
if (int_comp > 0) then
! THINC reads cont and adv from v_rs_ws; must reconstruct full sys_size range to populate both
iv%beg = 1; iv%end = sys_size
call s_reconstruct_cell_boundary_values(q_prim_qp%vf(1:sys_size), qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
& qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, id)
! Surface tension requires first-order energy; overwrite the higher-order result from the full pass above
iv%beg = eqn_idx%E; iv%end = eqn_idx%E
call s_reconstruct_cell_boundary_values_first_order(q_prim_qp%vf(eqn_idx%E), qL_rsx_vf, qL_rsy_vf, &
& qL_rsz_vf, qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, id)
else if (all(Re_size == 0)) then
iv%beg = 1; iv%end = eqn_idx%E - 1
call s_reconstruct_cell_boundary_values(q_prim_qp%vf(iv%beg:iv%end), qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
& qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, id)
Expand Down
29 changes: 7 additions & 22 deletions src/simulation/m_thinc.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,32 +30,14 @@ module m_thinc
real(wp) :: gq3_pts(3) = [-5e-1_wp*0.7745966692414834_wp, 0._wp, 5e-1_wp*0.7745966692414834_wp]
!> Weights: 5/18, 8/18, 5/18
real(wp) :: gq3_wts(3) = [5._wp/18._wp, 8._wp/18._wp, 5._wp/18._wp]
!> ln(2)
real(wp) :: ln2 = 0.6931471805599453_wp
$:GPU_DECLARE(create='[gq3_pts, gq3_wts, ln2]')
$:GPU_DECLARE(copyin='[gq3_pts, gq3_wts]')

real(wp), allocatable, dimension(:,:,:,:) :: mthinc_nhat !> Unit normal vector
real(wp), allocatable, dimension(:,:,:) :: mthinc_d !> Interface position parameter
$:GPU_DECLARE(create='[mthinc_nhat, mthinc_d]')

contains

!> @brief Stable computation of ln(cosh(x))
function f_log_cosh(x) result(res)

$:GPU_ROUTINE(parallelism='[seq]')
real(wp), intent(in) :: x
real(wp) :: res, ax

ax = abs(x)
if (ax > 20._wp) then
res = ax - ln2
else
res = ax + log(1._wp + exp(-2._wp*ax)) - ln2
end if

end function f_log_cosh

!> @brief Stable difference: log_cosh(a+h) - log_cosh(a-h) = 2*atanh(tanh(a)*tanh(h)). Avoids catastrophic cancellation when h
!! is small relative to a.
function f_log_cosh_diff(a, h) result(res)
Expand Down Expand Up @@ -259,16 +241,19 @@ contains
ac = v_vf(eqn_idx%adv%beg)%sf(j, k, l)

if (ac >= ic_eps .and. ac <= 1._wp - ic_eps) then
nr_x = (v_vf(eqn_idx%adv%beg)%sf(j + 1, k, l) - v_vf(eqn_idx%adv%beg)%sf(j - 1, k, l))*5e-1_wp
nr_x = (v_vf(eqn_idx%adv%beg)%sf(j + 1, k, l) - v_vf(eqn_idx%adv%beg)%sf(j - 1, k, &
& l))*(x_cb(j) - x_cb(j - 1))/(x_cc(j + 1) - x_cc(j - 1))

nr_y = 0._wp
if (n > 0) then
nr_y = (v_vf(eqn_idx%adv%beg)%sf(j, k + 1, l) - v_vf(eqn_idx%adv%beg)%sf(j, k - 1, l))*5e-1_wp
nr_y = (v_vf(eqn_idx%adv%beg)%sf(j, k + 1, l) - v_vf(eqn_idx%adv%beg)%sf(j, k - 1, &
& l))*(y_cb(k) - y_cb(k - 1))/(y_cc(k + 1) - y_cc(k - 1))
end if

nr_z = 0._wp
if (p > 0) then
nr_z = (v_vf(eqn_idx%adv%beg)%sf(j, k, l + 1) - v_vf(eqn_idx%adv%beg)%sf(j, k, l - 1))*5e-1_wp
nr_z = (v_vf(eqn_idx%adv%beg)%sf(j, k, l + 1) - v_vf(eqn_idx%adv%beg)%sf(j, k, &
& l - 1))*(z_cb(l) - z_cb(l - 1))/(z_cc(l + 1) - z_cc(l - 1))
end if

nmag = sqrt(nr_x*nr_x + nr_y*nr_y + nr_z*nr_z)
Expand Down
163 changes: 163 additions & 0 deletions tests/1ED671BA/golden-metadata.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions tests/1ED671BA/golden.txt

Large diffs are not rendered by default.

Loading
Loading