Skip to content

Anchored Dual-pass HLLD for Hypoelasticity (+ HLLC and interface-consistent HLL)#1414

Open
ChrisZYJ wants to merge 90 commits into
MFlowCode:masterfrom
ChrisZYJ:hypo_hlld
Open

Anchored Dual-pass HLLD for Hypoelasticity (+ HLLC and interface-consistent HLL)#1414
ChrisZYJ wants to merge 90 commits into
MFlowCode:masterfrom
ChrisZYJ:hypo_hlld

Conversation

@ChrisZYJ

@ChrisZYJ ChrisZYJ commented May 9, 2026

Copy link
Copy Markdown
Contributor

Description

Adds:

  1. Hypoelasticity: Anchored Dual-pass HLLD
  2. Hypoelasticity: HLLC
  3. Hypoelasticity: HLL option (interface-consistent)
  4. HLL option (alpha div U) so non-conservative treatment aligns with HLLC

Key Design Choices

Separate HLLD Riemann Solvers

At a glance it might be tempting to combine HLLD MHD with dual-pass hypoelasticity HLLD, but keeping them separate makes the code cleaner and much easier to maintain because:

  1. Unlike HLL or HLLC, HLLD is a class of HLLD-type solvers, with formulas and states dependent on the eigenstructure of the governing equations, so the inner states' equations are completely different for MHD vs Hypoelasticity.
  2. HLLD hypoelasticity has a newly developed dual-pass anchored form, making it different from any convenional HLLD Riemann solver. The anchored forms are necessary for the non-conservative hypoelasticity terms, which MHD does not have.
  3. MHD and Hypoelasticity deal with completely different physical regimes with different governing equations, and any changes or new physical models added in the future will not apply to both modules at once.

Riemann Source Terms

For the non-conservative terms, unlike the usual governing equations that only need div U i.e. du/dx, dv/dy, dw/dz (alpha div U, K div U, etc.), Hypoelasticity has cross terms like du/dy, so we must also pass those Riemann-consistent traces from Riemann solver to the rhs. (The old Hypoelasticity code with the HLL Riemann solver uses finite difference for non-conservative rhs, which provides enough stability given that HLL smears the interface immediately, so there wasn't a need to pass the du/dy traces before this PR. But that does not work for HLLC/HLLD for Hypoelasticity.)

Also grouped/named the condition branches (with lots of comments within the code):

Branch Face quantity read RHS formula per $\alpha_k$ K*div(u) velocity source
adv_src_alpha_iface flux_src_n(dir)%vf(j_adv) = per-fluid $\Psi_{\alpha_k}$ $u_\text{cell} \cdot \Delta\Psi_\alpha / \Delta x$ nc_iface_vel_n(dir)%vf(1)
adv_src_vel_iface flux_src_n(dir)%vf(adv\%beg) = shared $\Psi_u$ $\alpha_k \cdot \Delta\Psi_u / \Delta x$ Same flux_src_n slot (already $\Psi_u$)
adv_src_none Skipped (HLLD handles internally)

The derivations, meanings, and usage of the Riemann source variables are not straightforward. I've added some hopefully very helpful notes in misc/dev_notes for future developers (or AI agents; directing them to my notes should help them make fewer mistakes with the source terms) in terms of the understanding and derivations for the HLL/HLLC non-conservative fluxes, and their variable mapping for Riemann solvers and RHS.

Backwards Compatibiilty

  • All default behaviors preserved exactly (newly added features as options)
    • The only exception is the removal of an incorrect ad-hoc fluids-limit guard that affects only Hypoelasticity HLL
  • All existing usage of Riemann and rhs source terms are preserved. No refactor is done to keep the scope of this PR limited (any refactoring would touch most of the existing HLLC functionalities)

Type of change

  • New feature

Testing

  • All tests passed locally on CPU and Nvidia GPU, and on Frontier.

  • Smooth Eigenmode Convergence

image
  • Weak Solution Comparison (Rodriguez & Johnsen (2019) §5.3(b))
image
  • Weak Scaling on Frontier
image

Checklist

  • I added or updated tests for new behavior
  • I updated documentation if user-facing behavior changed
  • GPU results match CPU results
  • Tested on NVIDIA GPU or AMD GPU

AI code reviews

Reviews are not triggered automatically. To request a review, comment on the PR:

  • @coderabbitai review — incremental review (new changes only)
  • @coderabbitai full review — full review from scratch
  • /review — Qodo review
  • /improve — Qodo code suggestions
  • @claude full review — Claude full review (also triggers on PR open/reopen/ready)
  • Add label claude-full-review — Claude full review via label

@ChrisZYJ

Copy link
Copy Markdown
Contributor Author

@sbryngelson Hi Spencer, I’ve completed the merge and the PR is ready for review. Would you mind reopening it when you have a chance? Thanks!

@sbryngelson sbryngelson reopened this Jun 23, 2026
@github-actions

Copy link
Copy Markdown

Claude Code Review

Head SHA: d55a3f3

Files changed:

  • 25
  • src/simulation/m_riemann_solver_hllc.fpp
  • src/simulation/m_riemann_solver_hypo_hlld.fpp
  • src/simulation/m_riemann_solver_hll.fpp
  • src/simulation/m_riemann_solver_lf.fpp
  • src/simulation/m_riemann_solvers.fpp
  • src/simulation/m_riemann_state.fpp
  • src/simulation/m_rhs.fpp
  • src/simulation/m_hypoelastic.fpp
  • src/simulation/m_checker.fpp
  • src/common/m_variables_conversion.fpp

Findings

1. CORRECTNESS — Index transposition in HLLC axisymmetric geometric source (y-sweep)

File: src/simulation/m_riemann_solver_hllc.fpp
Hunk context: Inside #:if (NORM_DIR == 2) block (diff lines ~3657–3729)

flux_gsrc_rsx_vf(${SF('')}$, eqn_idx%cont%end + dir_idx(1)) = flux_rsx_vf(j, k, l, &
                                         & eqn_idx%cont%end + dir_idx(1)) - p_face + tau_qq_face

The LHS correctly uses ${SF('')}$ which for NORM_DIR == 2 expands to (k, j, l) — placing the normal-direction loop variable k first, matching the rotated-storage convention of rsx arrays. The RHS reads from flux_rsx_vf(j, k, l, ...) with literal indices, so it reads (transverse, normal, other) instead of (normal, transverse, other). This is a silent index-transposition bug: the wrong element is read from flux_rsx_vf for every y-direction interface, producing incorrect geometric source momentum fluxes for all 2D/axisymmetric hypoelastic HLLC runs. The RHS should use flux_rsx_vf(${SF('')}$, ...).

For comparison, the analogous assignment in the HLLD geometric source path (diff line ~4621) correctly reads flux_rsx_vf via the SF macro.


2. CORRECTNESS — G1_eff/G2_eff hardcoded to fluid_pp(1:2) with no num_fluids guard for HLL/HLLC

File: src/simulation/m_rhs.fpp
Hunk context: s_compute_advection_source_term (diff lines ~2217–2236)

G1_eff = 0._wp; G2_eff = 0._wp
if (hypoelasticity) then
    G1_eff = fluid_pp(1)%G
    G2_eff = fluid_pp(2)%G
end if
! ...
blkmod1(...) = (gammas(1)*pres + pi_infs(1))/gammas(1) + (4._wp/3._wp)*G1_eff
blkmod2(...) = (gammas(2)*pres + pi_infs(2))/gammas(2) + (4._wp/3._wp)*G2_eff

This code runs for all hypoelastic Riemann solvers (HLL, HLLC, HLLD). The checker at diff line ~1092 enforces num_fluids == 2 only for HLLD (riemann_solver == 4). There is no matching restriction for HLL or HLLC + hypoelasticity. For num_fluids > 2 + HLLC + hypoelasticity + alt_soundspeed, fluids 3+ are silently excluded from the bulk-modulus correction, producing wrong sound speeds in the advection source. A @:PROHIBIT covering HLLC/HLL cases (or a generalized loop over all fluids) is needed.

@ChrisZYJ

Copy link
Copy Markdown
Contributor Author

The merge took a while because I first merged #1546, then did a performance refactor of the HLLD path, and had to re-merge onto #1550#1556. The refactored code is a lot cleaner now though. Thanks for the improvements!

The relocation map was helpful, and I followed it where I could. One thing I wanted to discuss is keeping m_riemann_solver_hypo_hlld.fpp separate from m_riemann_solver_hlld.fpp:

  • The infrastructure they share is already factored out into s_populate_riemann_states_variables_buffers, s_initialize/finalize_riemann_solver, and s_compute_speed_of_sound.
  • MHD and hypoelasticity are mutually exclusive, and the two solvers are mathematically different apart from the 5-wave structure. They share only like 40 lines of preamble (#:for scaffold, primitive unpack, mixture-property sum) that are common to all solvers, not just HLLD. Almost everything else is different, including different conservative variable vectors, magnetosonic vs elastic wave speeds, conservative vs non-conservative anchored dual-pass, etc.
  • That being said, I'm happy to fold both subroutines into m_riemann_solver_hlld.fpp if you'd prefer all the HLLD-type subroutines in one file.

On a side note, I think the two developer's notes in misc/ are pretty useful. Feel free to take a look, and let me know if you'd like them moved somewhere else.

@ChrisZYJ

Copy link
Copy Markdown
Contributor Author

For Claude Code Review: 1 is false positive. 2 I've added a PROHIBIT to be extra safe

@sbryngelson sbryngelson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High-level review of structure and organization, not a line-by-line bug pass. The change is smaller than the 110-file count suggests: most of those files are golden tests and examples. The real surface is about 6 files in src/simulation plus the global params and the dev notes.

What works, keep it:

  • The new HLLD solver gets its own module, which matches the existing one-module-per-solver layout. Your reasons for not fusing it with MHD HLLD are correct. Leave them separate.
  • The dev_notes derivations are good. This math is hard to recover later. Keep writing these.
  • The adv_src_* and hypo_nc_dual_pass flags are derived once in m_global_parameters, not raw user inputs. That is the right place for them.

Main point: hypoelasticity now enters the Riemann solvers in three different shapes.

  • HLLC: inline "if (hypoelasticity)" branches inside the existing ~1970-line s_hllc_riemann_solver.
  • HLL: similar inline branches.
  • HLLD: a separate module plus a separate hypo_nc_dual_pass selection path.
    Each choice on its own is fine. Together, anyone asking "how is hypoelasticity handled at interfaces" has to read three different shapes of code. I would not refactor HLLC in this PR (you scoped that out, correctly), but add a short comment at each site, and in dev_notes, that names all three and says why HLLD needs its own path.

Two cleanups that are cheap and in scope:

  1. Collapse the _hatR duplication in the dual pass. The second pass duplicates whole field sets (nc_iface_vel_n and nc_iface_vel_hatR_n) and finalize routines (the regular ones and their _hatR twins). The pass identity, left-anchored vs right-anchored, should be an argument, not a copied routine. This roughly halves the dual-pass code and stops the two copies from drifting apart.
  2. Replace the three adv_src_* booleans with one enum. They are mutually exclusive by construction, and the code already asks maintainers to keep them that way by hand. An enum makes the "two true at once" state impossible and drops the manual rule.

Two notes for later, mostly out of scope:
3. m_rhs.fpp is already ~2200 lines. The dual pass deepens it: allocate hatR fields, solve, finalize hat_L, assemble RHS, finalize hat_R, assemble RHS again. That orchestration would be better in its own routine. Not required here, just flagging it so it does not harden.
4. The 900 to 2000 line solver subroutines are a pre-existing pattern, not something you introduced. Your new solver at 934 lines is actually better than HLLC because you split out the finalize helpers. Splitting the left/right state setup and the per-wave blocks into helpers would set a good example, but it is not a blocker.

Net: the hard parts, the module boundary and the documentation, are right. Before this leaves draft I would do (1) parameterize the dual pass instead of copying hatR, and (2) make adv_src* an enum. The rest is comments or future debt. Inline notes below.

integer, intent(in) :: norm_dir
type(int_bounds_info), intent(in) :: ix, iy, iz

if (hypo_nc_dual_pass) then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a second solver-selection path. The other solvers are picked by riemann_solver == NUM in the loop below; the dual-pass HLLD is picked by this separate boolean and returns early. Since hypo_nc_dual_pass is derived from riemann_solver and the elasticity flags, the two paths stay consistent, so this is fine to ship. But it is the point where hypoelasticity splits into three different shapes across the Riemann solvers: inline branches in HLLC and HLL, and this separate module for HLLD. Worth a short comment here, and in dev_notes, that names all three and says why HLLD needs its own path.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comments and explained clearly. Also added a corresponding note in misc/dev_notes and back references at HLL/HLLC sites

Comment thread src/simulation/m_global_parameters.fpp Outdated
! adv_src_alpha_iface, adv_src_vel_iface, and adv_src_none true whenever this logic is modified.
!
! HLL Method 1 (alpha-interface): flux_src(adv_idx%beg:adv_idx%end) carries interface alpha_k per fluid.
adv_src_alpha_iface = (riemann_solver == 1 .and. .not. hll_u_interface)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These three booleans are mutually exclusive by construction, and the comment just above asks maintainers to keep them that way by hand. A single enum (for example adv_src_mode with values alpha_iface, vel_iface, none) would make the two-true-at-once state impossible and drop the manual rule. Same readability win at every if (adv_src_*) site downstream.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added adv_src_mode enum as you suggested and dropped the manual rule.

Comment thread src/simulation/m_rhs.fpp

!> hat_R-pass interface velocities for fused dual-pass HLLD: the axisymmetric geometric source consumes both passes' face
!! velocities after the direction loop, so the hat_R values need their own field set (hat_L uses nc_iface_vel_n).
type(vector_field), allocatable, dimension(:) :: nc_iface_vel_hatR_n

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This _hatR field set is a near copy of nc_iface_vel_n, and the dual pass also adds _hatR copies of the finalize routines in the hypo HLLD module. The left-anchored vs right-anchored distinction reads like it should be a parameter, not a duplicated field set plus routine. Passing the pass identity in would remove the copy and stop the two from drifting. Separate, larger point: the dual-pass orchestration (allocate hatR, solve, finalize hat_L, assemble, finalize hat_R, assemble again) sits inside an already ~2200-line m_rhs. Good candidate to move into its own routine later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used a template to factor out the _hatR routines and removed the duplicated parts. I kept nc_iface_vel_hatR_n as it's not a copy but a separate storage per pass. The axisymmetric geometric source needs to run after the direction loop and needs both passes' velocities, so we can't overwrite the hat_L values before the source uses it.

contains

!> HLLD Riemann solver resolves all 5 waves for the hypoelastic equations: 1 entropy wave, 2 shear stress waves, 2 fast waves.
subroutine s_hypo_hlld_riemann_solver(qL_prim_rsx_vf, dqL_prim_dx_vf, dqL_prim_dy_vf, dqL_prim_dz_vf, qL_prim_vf, &

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This subroutine is about 934 lines. That is actually better than the existing HLLC solver at ~1970, and you already split out the finalize helpers below, which is the right instinct. Not a blocker, and the giant-subroutine pattern is pre-existing here. If you want to set a better example, the left/right state setup and the per-wave-region blocks are natural helper boundaries.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed that it's not a blocker here

!! output arrays. Mirrors s_finalize_nc_iface_vel for the nc_iface_vel_hatR_rs* buffers.
!! @param nc_iface_vel_vf Output: physical hat_R velocity components at interfaces
!! @param norm_dir Sweep direction (1=x, 2=y, 3=z)
subroutine s_finalize_nc_iface_vel_hatR(nc_iface_vel_vf, norm_dir)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a copy of s_finalize_nc_iface_vel above with a _hatR suffix, and s_finalize_riemann_solver_hatR mirrors the regular finalize the same way. Two copies that have to stay in sync by hand. Consider one routine that takes the pass (left vs right) or the target field set as an argument, instead of the _hatR twin. Same point as the field duplication noted in m_rhs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used a template to factor out s_finalize_nc_iface_vel and _hatR. Kept s_finalize_riemann_solver_hatR as it's a subset of the shared finalize, without flux_src, gg3 gsrc.

@ChrisZYJ

Copy link
Copy Markdown
Contributor Author

Made all the requested changes other than a few minor caveats. I've explained all the changes in the comment replies

@sbryngelson

Copy link
Copy Markdown
Member

@ChrisZYJ - pushed two correctness fixes to this branch (bb0090e), both flagged by the Claude review:

  1. m_riemann_solver_hllc.fpp, the NORM_DIR == 2 cyl + hypoelastic geometric-source block: the eqn_idx%cont%end + dir_idx(1) flux read used literal flux_rsx_vf(j, k, l, ...) while the LHS and every sibling assignment use ${SF('')}$. For the y-sweep SF('') expands to (k, j, l), so the literal indices read a transposed element - wrong geometric-source momentum flux on 2D/axisymmetric hypoelastic HLLC runs. Switched it to flux_rsx_vf(${SF('')}$, ...).

  2. m_checker.fpp: G1_eff/G2_eff use fluid_pp(1:2) for all hypoelastic Riemann solvers, but only HLLD (riemann_solver == 4) had the num_fluids == 2 guard. Added the matching guard for HLL/HLLC (riemann_solver == 1 .or. == 2) so num_fluids > 2 is rejected rather than silently dropping fluids 3+ from the bulk modulus.

Both compile.

@ChrisZYJ

ChrisZYJ commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@sbryngelson Many thanks for the changes!

Speaking of point 2, there's an important, subtle bug outside of hypoelasticity: "num_fluids > 2 .and. alt_soundspeed" is not prohibited in the checkers, which silently computes the wrong "K-term". We should add a checker to enforce that alt_soundspeed is only used for 2 components (alt_soundspeed is only for the 5-equation model). I can open a separate PR for that.

@sbryngelson sbryngelson marked this pull request as ready for review June 24, 2026 22:43
Copilot AI review requested due to automatic review settings June 24, 2026 22:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds hypoelasticity support for additional Riemann solvers, including an anchored dual-pass HLLD path, and wires up new non-conservative (NC) RHS dataflow/validation/documentation to support these solvers.

Changes:

  • Adds hypoelasticity HLLD dual-pass dispatch plus supporting state buffers (hat-R flux set) and NC interface-velocity export.
  • Introduces new runtime/toolchain parameters + validation for hypoelasticity solver options (ADC, interface-consistent RHS, energy guard, HLL u-interface mode).
  • Updates docs, examples, and golden test artifacts for the new solver capabilities.

Reviewed changes

Copilot reviewed 70 out of 110 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
toolchain/mfc/test/case.py Loosens tolerance for hypoelasticity test comparisons.
toolchain/mfc/params/descriptions.py Documents newly introduced hypoelasticity/HLL configuration parameters.
toolchain/mfc/params/definitions.py Registers new parameters and adds constraints/visibility metadata.
toolchain/mfc/case_validator.py Extends toolchain-side validation for hypoelasticity + new flags.
tests/F31EAABF/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/DA44D68D/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/D41FFB94/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/CF11AA56/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/C7B686C0/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/B76C4F04/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/AE3ECF01/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/AB56B056/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/A26B7E00/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/9AEC024A/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/891C8626/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/879C490D/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/6AF90F3C/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/6736AFD0/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/6103FA4F/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/5D405BF9/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/4FBA4023/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/4912EFF1/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/481CA4B4/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/43CADBB8/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/34F3999B/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/345BC486/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/34336A1F/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/17E2C6D1/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/29C5D458/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/2097140E/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/19981E38/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/0DDE8A87/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/0648E422/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/03EB2617/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
tests/026AA23F/golden-metadata.txt Adds new golden metadata file for regression test artifacts.
src/simulation/m_riemann_state.fpp Adds new state buffers (flux hat-R + nc_iface_vel) and stress tensor permutation support for elasticity.
src/simulation/m_riemann_solvers.fpp Adds hypoelastic HLLD solver dispatch, alloc/dealloc for new buffers, and dual-pass early-return path.
src/simulation/m_riemann_solver_lf.fpp Updates hypoelastic elastic-energy contribution computation with optional guard and safe denominators.
src/simulation/m_global_parameters.fpp Adds derived NC modes, adv_src_mode selection, and use_nc_iface_vel flag; wires new parameters.
src/simulation/m_data_output.fpp Fixes pressure computation call site to pass energy by correct index.
src/simulation/m_checker.fpp Adds runtime input validation for new HLL/Hypo NC branches and solver compatibility rules.
src/pre_process/m_global_parameters.fpp Establishes default for hypo_energy_guard in pre_process.
src/post_process/m_global_parameters.fpp Establishes default for hypo_energy_guard in post_process.
src/common/m_variables_conversion.fpp Adds guarded elastic-energy (add/subtract) treatment to avoid division-by-near-zero G.
src/common/m_global_parameters_common.fpp Exposes new parameters to device via GPU_DECLARE.
src/common/include/shared_parallel_macros.fpp Improves folding of long GPU directives by also splitting oversized clauses at commas.
examples/3D_hypo_hlld/case.py Adds a 3D hypoelastic HLLD example configuration.
examples/2D_hypo_hlld/case.py Adds a 2D hypoelastic HLLD example configuration.
examples/2D_axisym_hypo_hlld/case.py Adds a 2D axisymmetric hypoelastic HLLD example configuration.
docs/module_categories.json Registers the new hypoelastic HLLD solver module in documentation categories.
docs/documentation/equations.md Documents hypoelastic HLLD and NC-term developer notes references.
docs/documentation/case.md Documents new user-facing parameters and updated solver availability for hypoelasticity.
Comments suppressed due to low confidence (1)

tests/F31EAABF/golden-metadata.txt:1

  • These golden metadata files embed ephemeral environment details (timestamp, local branch name, and a '(dirty)' marker). If any CI/test logic compares these files byte-for-byte, this will be brittle across regeneration and developer environments. Consider either excluding such metadata from golden comparisons (e.g., ignore sections/lines) or stripping volatile fields when generating the golden-metadata.txt files.

Comment on lines +342 to 351
! Elastic energy (guard skips when G near zero)
if (.not. hypo_energy_guard .or. ((G_L > verysmall) .and. (G_R > verysmall))) then
E_L = E_L + (tau_e_L(i)*tau_e_L(i))/max(4._wp*G_L, verysmall)
E_R = E_R + (tau_e_R(i)*tau_e_R(i))/max(4._wp*G_R, verysmall)
! Double for shear stresses
if (any(eqn_idx%stress%beg - 1 + i == shear_indices)) then
E_L = E_L + (tau_e_L(i)*tau_e_L(i))/(4._wp*G_L)
E_R = E_R + (tau_e_R(i)*tau_e_R(i))/(4._wp*G_R)
E_L = E_L + (tau_e_L(i)*tau_e_L(i))/max(4._wp*G_L, verysmall)
E_R = E_R + (tau_e_R(i)*tau_e_R(i))/max(4._wp*G_R, verysmall)
end if
end if
Comment thread src/simulation/m_checker.fpp Outdated
Comment on lines +139 to +142
@:PROHIBIT(hypoelasticity .and. riemann_solver == 4 .and. num_fluids /= 2, &
& "HLLD hypoelasticity currently requires exactly 2 fluid components")
@:PROHIBIT(hypoelasticity .and. (riemann_solver == 1 .or. riemann_solver == 2) .and. num_fluids /= 2, &
& "HLL/HLLC hypoelasticity currently requires exactly 2 fluid components (blkmod uses fluid_pp(1:2) only)")
Comment on lines 941 to +943
$:GPU_UPDATE(device='[int_comp, ic_eps, ic_beta]')
$:GPU_UPDATE(device='[muscl_eps]')
$:GPU_UPDATE(device='[dir_idx, dir_flg, dir_idx_tau]')
$:GPU_UPDATE(device='[dir_idx, dir_flg, dir_idx_tau, stress_perm]')
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.77605% with 405 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.59%. Comparing base (05eda2d) to head (0a3a7a9).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/simulation/m_riemann_solver_hypo_hlld.fpp 60.86% 155 Missing and 45 partials ⚠️
src/simulation/m_rhs.fpp 71.83% 48 Missing and 41 partials ⚠️
src/simulation/m_riemann_solver_hllc.fpp 68.13% 33 Missing and 25 partials ⚠️
src/simulation/m_riemann_solver_hll.fpp 52.63% 9 Missing and 9 partials ⚠️
src/simulation/m_riemann_solvers.fpp 10.52% 8 Missing and 9 partials ⚠️
src/simulation/m_hypoelastic.fpp 90.81% 3 Missing and 6 partials ⚠️
src/simulation/m_riemann_solver_lf.fpp 0.00% 5 Missing ⚠️
src/simulation/m_global_parameters.fpp 86.20% 0 Missing and 4 partials ⚠️
src/common/m_variables_conversion.fpp 66.66% 0 Missing and 2 partials ⚠️
src/simulation/m_checker.fpp 85.71% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1414      +/-   ##
==========================================
+ Coverage   60.48%   60.59%   +0.10%     
==========================================
  Files          83       84       +1     
  Lines       19888    20811     +923     
  Branches     2951     3095     +144     
==========================================
+ Hits        12030    12610     +580     
- Misses       5864     6089     +225     
- Partials     1994     2112     +118     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

3 participants