Skip to content

Body Forces Bug Fix #920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 6, 2025
Merged

Body Forces Bug Fix #920

merged 4 commits into from
Jul 6, 2025

Conversation

wilfonba
Copy link
Contributor

@wilfonba wilfonba commented Jul 4, 2025

User description

Description

Fixes a bug in the body forces code.

Fixes #913

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Scope

  • This PR comprises a set of related changes with a common goal

How Has This Been Tested?

This was validated against the linear theory for the Rayleigh-Taylor instability given in (https://pubs.aip.org/aapt/ajp/article/74/12/1095/1042158/The-Rayleigh-Taylor-instability) for examples/2D_rayleigh_taylor/case.py. The validation plot is attached:
result


PR Type

Bug fix


Description

  • Fixed argument order in body forces subroutine call

  • Updated test golden files with new metadata

  • Simplified Rayleigh-Taylor example documentation


Changes diagram

flowchart LR
  A["Time Stepper"] -- "calls with wrong order" --> B["Body Forces RHS"]
  B -- "fixed parameter order" --> C["Correct Calculation"]
  D["Test Suite"] -- "regenerated" --> E["Updated Golden Files"]
Loading

Changes walkthrough 📝

Relevant files
Bug fix
1 files
m_body_forces.fpp
Fixed subroutine parameter order                                                 
+1/-1     
Tests
6 files
golden-metadata.txt
Updated test metadata timestamps                                                 
+40/-40 
golden-metadata.txt
Updated test metadata timestamps                                                 
+40/-40 
golden-metadata.txt
Updated test metadata timestamps                                                 
+40/-40 
golden-metadata.txt
Updated test metadata timestamps                                                 
+40/-40 
golden-metadata.txt
Updated test metadata timestamps                                                 
+40/-40 
golden-metadata.txt
Updated test metadata timestamps                                                 
+40/-40 
Documentation
1 files
README.md
Simplified documentation with single result image               
+1/-2     
Additional files
6 files
golden.txt +5/-5     
golden.txt +4/-4     
golden.txt +6/-6     
golden.txt +5/-5     
golden.txt +6/-6     
golden.txt +4/-4     

Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @Copilot Copilot AI review requested due to automatic review settings July 4, 2025 19:03
    @wilfonba wilfonba requested review from a team and sbryngelson as code owners July 4, 2025 19:03
    Copy link

    qodo-merge-pro bot commented Jul 4, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🎫 Ticket compliance analysis ✅

    913 - Fully compliant

    Compliant requirements:

    • Fix the bug in body force calculation where arguments are passed in wrong order
    • Correct the subroutine call from s_compute_body_forces_rhs(q_prim_vf, q_cons_vf, rhs_vf) to match the definition s_compute_body_forces_rhs(q_cons_vf, q_prim_vf, rhs_vf)

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Parameter Order

    The subroutine signature was changed to match the calling convention, but this creates inconsistency with the documentation comments which still list q_cons_vf before q_prim_vf. The parameter documentation should be updated to match the new order.

    !! @param q_cons_vf Conservative variables
    !! @param q_prim_vf Primitive variables
    subroutine s_compute_body_forces_rhs(q_prim_vf, q_cons_vf, rhs_vf)

    Copy link

    qodo-merge-pro bot commented Jul 4, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    Copy link
    Contributor

    @Copilot Copilot AI left a comment

    Choose a reason for hiding this comment

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

    Pull Request Overview

    This PR updates the golden test outputs and associated metadata to reflect the corrected body forces calculation, ensuring CI passes after the bug fix. Key changes include:

    • Updated numeric values in golden.txt for cases DEA0A0D6, reflecting the new solution.
    • Refreshed metadata timestamps, CMake/compilers, and added -j 8 & single=No flags in golden-metadata.txt across multiple tests.
    • Swapped section labels (e.g., post_processpre_process, simulationsyscheck) to match current test harness behavior.

    Reviewed Changes

    Copilot reviewed 10 out of 17 changed files in this pull request and generated no comments.

    File Description
    tests/E21940B3/golden-metadata.txt Metadata updated with new timestamp, flags
    tests/DEA0A0D6/golden.txt Golden outputs regenerated for bug fix
    tests/DEA0A0D6/golden-metadata.txt Metadata updated with new timestamp, flags
    tests/B54BB9D8/golden-metadata.txt Metadata updated with new timestamp, flags
    Comments suppressed due to low confidence (3)

    tests/E21940B3/golden-metadata.txt:5

    • [nitpick] Consider removing the -j 8 flag from the test invocation to ensure sequential, reproducible golden file generation and avoid nondeterministic failures when tests run in parallel.
        Invocation: test --generate -o Bodyforces -j 8
    

    tests/DEA0A0D6/golden-metadata.txt:5

    • [nitpick] Consider removing the -j 8 flag from the test invocation to ensure sequential, reproducible golden file generation and avoid nondeterministic failures when tests run in parallel.
        Invocation: test --generate -o Bodyforces -j 8
    

    tests/B54BB9D8/golden-metadata.txt:5

    • [nitpick] Consider removing the -j 8 flag from the test invocation to ensure sequential, reproducible golden file generation and avoid nondeterministic failures when tests run in parallel.
        Invocation: test --generate -o Bodyforces -j 8
    

    Copy link

    codecov bot commented Jul 4, 2025

    Codecov Report

    All modified and coverable lines are covered by tests ✅

    Project coverage is 44.15%. Comparing base (6f58eec) to head (a6bff24).
    Report is 1 commits behind head on master.

    Additional details and impacted files
    @@           Coverage Diff           @@
    ##           master     #920   +/-   ##
    =======================================
      Coverage   44.15%   44.15%           
    =======================================
      Files          68       68           
      Lines       18347    18347           
      Branches     2227     2227           
    =======================================
      Hits         8101     8101           
      Misses       8943     8943           
      Partials     1303     1303           

    ☔ View full report in Codecov by Sentry.
    📢 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.

    @sbryngelson
    Copy link
    Member

    curious to make sure the benchmarking behaves well on the new Frontier benchmark. after that will merge.

    @sbryngelson sbryngelson merged commit 1e74a60 into MFlowCode:master Jul 6, 2025
    50 of 57 checks passed
    prathi-wind pushed a commit to prathi-wind/MFC-prathi that referenced this pull request Jul 13, 2025
    @wilfonba wilfonba deleted the BCBugFix branch July 22, 2025 14:43
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Development

    Successfully merging this pull request may close these issues.

    Detected bug in body force calculation
    2 participants
    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy