Skip to content

Conversation

@hyeoksu-lee
Copy link
Contributor

@hyeoksu-lee hyeoksu-lee commented Dec 17, 2025

User description

User description

Description

As mentioned in #1085 and #1091, the gas and vapor properties were swapped in the code before #1085. #1085 fixed this in the code, but in order to validate the other changes though the CI tests, the input parameters in examples and tests where bubbles_lagrange = T were intentionally swapped. This PR corrects the input parameters and the golden files are updated accordingly.

With that, two minor fixes are included.

  • fix bubble parameter typo in documentation
  • remove no longer used lagrange bubble parameters

Fixes #(issue) [optional]
#1091

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Something else

Scope

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

If you cannot check the above box, please split your PR into multiple PRs that each have a common goal.

How Has This Been Tested?

Test Configuration:

  • What computers and compilers did you use to test this:

Checklist

  • I have added comments for the new code
  • I added Doxygen docstrings to the new code
  • I have made corresponding changes to the documentation (docs/)
  • I have added regression tests to the test suite so that people can verify in the future that the feature is behaving as expected
  • I have added example cases in examples/ that demonstrate my new feature performing as expected.
    They run to completion and demonstrate "interesting physics"
  • I ran ./mfc.sh format before committing my code
  • New and existing tests pass locally with my changes, including with GPU capability enabled (both NVIDIA hardware with NVHPC compilers and AMD hardware with CRAY compilers) and disabled
  • This PR does not introduce any repeated code (it follows the DRY principle)
  • I cannot think of a way to condense this code and reduce any introduced additional line count

If your code changes any code source files (anything in src/simulation)

To make sure the code is performing as expected on GPU devices, I have:

  • Checked that the code compiles using NVHPC compilers
  • Checked that the code compiles using CRAY compilers
  • Ran the code on either V100, A100, or H100 GPUs and ensured the new feature performed as expected (the GPU results match the CPU results)
  • Ran the code on MI200+ GPUs and ensure the new features performed as expected (the GPU results match the CPU results)
  • Enclosed the new feature via nvtx ranges so that they can be identified in profiles
  • Ran a Nsight Systems profile using ./mfc.sh run XXXX --gpu -t simulation --nsys, and have attached the output file (.nsys-rep) and plain text results to this PR
  • Ran a Rocprof Systems profile using ./mfc.sh run XXXX --gpu -t simulation --rsys --hip-trace, and have attached the output file and plain text results to this PR.
  • Ran my code using various numbers of different GPUs (1, 2, and 8, for example) in parallel and made sure that the results scale similarly to what happens if you run without the new code/feature

PR Type

Bug fix


Description

  • Corrects swapped vapor and gas properties in Lagrangian bubble examples

  • Updates bubble parameter assignments to use correct variable mappings

  • Removes deprecated fluid_pp parameters for bubble properties

  • Regenerates golden test files with corrected parameters


Diagram Walkthrough

flowchart LR
  A["Swapped Properties<br/>gam_v=gam_g, M_v=M_g"] -->|Fix| B["Correct Properties<br/>gam_v=gam_v, M_v=M_v"]
  B -->|Migrate| C["New bub_pp Parameters<br/>Centralized bubble config"]
  C -->|Remove| D["Old fluid_pp Parameters<br/>Deprecated properties"]
  D -->|Update| E["Golden Test Files<br/>Regenerated outputs"]
Loading

File Walkthrough

Relevant files
Bug fix
4 files
case.py
Fix swapped bubble gas and vapor properties                           
+24/-21 
case.py
Correct vapor and gas property assignments                             
+10/-10 
case.py
Correct vapor and gas property assignments                             
+10/-10 
cases.py
Update test case bubble parameter values                                 
+4/-4     
Miscellaneous
8 files
golden-metadata.txt
Regenerate golden metadata for test case                                 
+54/-85 
golden-metadata.txt
Regenerate golden metadata for test case                                 
+54/-85 
golden-metadata.txt
Regenerate golden metadata for test case                                 
+54/-85 
golden-metadata.txt
Regenerate golden metadata for test case                                 
+54/-85 
golden-metadata.txt
Regenerate golden metadata for test case                                 
+54/-85 
golden-metadata.txt
Regenerate golden metadata for test case                                 
+54/-85 
golden-metadata.txt
Regenerate golden metadata for test case                                 
+54/-85 
golden-metadata.txt
Regenerate golden metadata for test case                                 
+54/-85 
Additional files
8 files
golden.txt +9/-9     
golden.txt +7/-7     
golden.txt +9/-9     
golden.txt +7/-7     
golden.txt +7/-7     
golden.txt +7/-7     
golden.txt +9/-9     
golden.txt +9/-9     


CodeAnt-AI Description

fix swapped vapor and gas properties in Lagrangian bubble examples and tests

What Changed

  • Example cases for Lagrangian bubbles (2D and 3D) now assign vapor and gas physical properties to the correct fields so vapor parameters (molar mass, gamma, cp, k, R) are consistently used for vapor and gas values for gas.
  • Test case parameter dictionaries and generated golden files were updated to match the corrected property assignments.
  • Example input dictionaries include explicit bubble parameter entries and corrected option flags for Lagrangian bubble runs.

Impact

✅ Correct bubble physical behavior in Lagrange examples
✅ Matching test golden files for Lagrangian bubble cases
✅ Clearer, consistent property assignment for vapor vs. gas

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • Bug Fixes

    • Corrected mappings so bubble and fluid properties are assigned to the proper phases across examples.
  • Refactor

    • Removed legacy reference parameters and consolidated bubble/material reference values into a unified parameter block and consistent temperature scaling.
  • Chores

    • Updated test golden-metadata and build/run snapshots to reflect the current environment and toolchain.
  • Documentation

    • Standardized parameter table naming/escaping in docs.

✏️ Tip: You can customize this high-level summary in your review settings.


Note

Fix gas/vapor property assignments in Lagrangian bubble examples, migrate inputs to bub_pp, remove unused lag_params fields, and update docs/tests.

  • Examples (Lagrangian bubbles):
    • Correct gas vs. vapor parameter mapping (gam_v/gam_g, M_v/M_g, k_v/k_g, cp_v/cp_g, R_v/R_g).
    • Add thermal = 3, polytropic = F; set bubble inputs via bub_pp%* and remove obsolete per-fluid/lag fields; minor var rename (gamma_* -> gam_*).
  • Core (simulation/common):
    • Remove deprecated lag_params%{c0,rho0,T0,Thost,x0} from bubbles_lagrange_parameters, defaults, and MPI broadcasts.
  • Docs:
    • Fix table parameter escaping for bub_pp%%* in docs/documentation/case.md.
  • Tests:
    • Regenerate golden metadata/output snapshots to reflect corrected inputs and environment.

Written by Cursor Bugbot for commit 0a24e3f. Configure here.

@codeant-ai
Copy link

codeant-ai bot commented Dec 17, 2025

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 17, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Refactors bubble-parameter naming/layout and corrects vapor↔gas mappings in example cases, removes several fields from the Lagrange bubble parameter type and their MPI broadcasts, reorders test/tooling keys, adjusts docs formatting, and updates many golden-metadata snapshots to a different build/toolchain environment.

Changes

Cohort / File(s) Summary
2D example — new bub_pp block
examples/2D_lagrange_bubblescreen/case.py
Renamed gamma constants (gamma_ggam_g, gamma_vgam_v), added thermal=3 and polytropic="F" under bubbles_lagrange, replaced legacy base params with a new bub_pp%... block containing reference values and derived quantities, and updated fluid_pp(2) entries to use the renamed gam_* constants.
3D examples — fix vapor/gas mappings
examples/3D_lagrange_bubblescreen/case.py, examples/3D_lagrange_shbubcollapse/case.py
Corrected assignments so bub_pp entries map physical properties to the correct fluid role (swapped/fixed gam_v/gam_g, M_v/M_g, k_v/k_g, cp_v/cp_g, R_v/R_g). No control-flow changes.
Derived type and defaults removed
src/common/m_derived_types.fpp, src/simulation/m_global_parameters.fpp
Removed fields from bubbles_lagrange_parameters (c0, rho0, T0, Thost, x0) and removed their default initializations in the user-input assignment routine.
MPI / runtime param broadcast changes
src/simulation/m_mpi_proxy.fpp, toolchain/mfc/run/case_dicts.py
Reduced lag_params fields broadcast over MPI to only epsilonb, charwidth, and valmaxvoid; removed c0, rho0, T0, Thost, x0 from the broadcast and from ParamType.REAL listings.
Test tooling — key ordering
toolchain/mfc/test/cases.py
Reordered bub_pp parameter key sequence in alter_lag_bubbles (swapped ordering of M/k/R/cp entries between v/g).
Documentation formatting
docs/documentation/case.md
Escaped/adjusted percent signs in parameter identifiers for presentation; no behavioral changes.
Golden-metadata snapshots
tests/.../golden-metadata.txt (multiple files: 016C1B8B, 0D1FA5C5, 12ECE133, 2122A4F6, 4A1BD9B8, B9553426, CE7B0BC7, DFF6E349)
Replaced environment/build snapshots: timestamps, invocation flags, Git refs; swapped syscheck/simulation sections; CMake bumped to v4.1.2; toolchain/compilers changed (NVHPC → AppleClang/GNU); host changed to Apple M4 Pro; Fypp paths and many build toggles (SIMULATION, PRE_PROCESS, POST_PROCESS, SYSCHECK, OpenMP) adjusted. These are metadata-only updates.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay attention to:
    • Consistency of vapor↔gas mapping fixes across all example files.
    • All usages and I/O/serialization of removed bubbles_lagrange_parameters fields.
    • MPI broadcast reduction ensuring required parameters are still available on all ranks.
    • Tests/tooling expecting old key order or removed keys (golden snapshots, case validators).

Possibly related PRs

Suggested reviewers

  • sbryngelson
  • wilfonba

Poem

🐰 In code I hop, parameters in tow,
Gam_g and gam_v in tidy rows,
Vapors and gases now wear true names,
Broadcasts trimmed and docs escape % claims,
A little rabbit cheers the refactor glow!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix swapped vapor gas properties' accurately and concisely summarizes the primary change: correcting swapped vapor/gas property assignments in Lagrangian bubble examples and tests.
Description check ✅ Passed The PR description is comprehensive and well-structured with clear motivation, detailed problem statement, related issue reference, scope declaration, change summary, and diagram walkthrough of the fix approach.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codeant-ai codeant-ai bot added the size:XL This PR changes 500-999 lines, ignoring generated files label Dec 17, 2025
@qodo-code-review
Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

🎫 Ticket compliance analysis 🔶

1091 - Partially compliant

Compliant requirements:

  • Fix the bug where EL bubble vapor and gas properties are swapped.

Non-compliant requirements:

(empty)

Requires further human verification:

  • Ensure reproduction no longer shows the error in affected examples/tests.
⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
🧪 PR contains tests
🔒 Security concerns

Sensitive information exposure:
golden metadata now contains absolute local filesystem paths and a username-like home directory segment (e.g., Fypp : /Users/...). While not a secret key, this is still potentially sensitive environment information and can leak developer machine details into the repo/CI artifacts. Consider redacting or making metadata generation path-agnostic.

⚡ Recommended focus areas for review

Possible Issue

The PR renames gamma_g/gamma_v to gam_g/gam_v while other parts of the case still use gamma_* naming (e.g., gamma_host). Verify there is no remaining reference to the removed names in the full file and that all downstream consumers expect the new keys/values (especially when mixing bub_pp and fluid_pp).

R_uni = 8314  # Universal gas constant - J/kmol/K
MW_g = 28.0  # Molar weight of the gas - kg/kmol
MW_v = 18.0  # Molar weight of the vapor - kg/kmol
gam_g = 1.4  # Specific heat ratio of the gas
gam_v = 1.333  # Specific heat ratio of the vapor
pv = 2350  # Vapor pressure of the host - Pa
cp_g = 1.0e3  # Specific heat of the gas - J/kg/K
cp_v = 2.1e3  # Specific heat of the vapor - J/kg/K
k_g = 0.025  # Thermal conductivity of the gas - W/m/K
k_v = 0.02  # Thermal conductivity of the vapor - W/m/K
diffVapor = 2.5e-5  # Diffusivity coefficient of the vapor - m2/s
sigBubble = 0.069  # Surface tension of the bubble - N/m
mu_g = 1.48e-5

# Acoustic source properties
patm = 101325.0  # Atmospheric pressure - Pa
pamp = 1.0e5  # Amplitude of the acoustic source - Pa
freq = 300e03  # Source frequency - Hz
wlen = c_host / freq  # Wavelength - m

# Domain and time set up

xb = -12.0e-3  # Domain boundaries - m (x direction)
xe = 12.0e-3
yb = -2.5e-3  # Domain boundaries - m (y direction)
ye = 2.5e-3
z_virtual = 5.0e-3  # Virtual depth (z direction)

Nx = 240  # number of elements into x direction
Ny = 50  # number of elements into y direction

dt = 7.5e-9  # constant time-step - sec

# Configuring case dictionary
print(
    json.dumps(
        {
            # Logistics
            "run_time_info": "T",
            # Computational Domain Parameters
            "x_domain%beg": xb / x0,
            "x_domain%end": xe / x0,
            "y_domain%beg": yb / x0,
            "y_domain%end": ye / x0,
            "stretch_y": "F",
            "stretch_x": "F",
            "m": Nx,
            "n": Ny,
            "p": 0,
            "dt": dt * (c0 / x0),
            "t_step_start": 0,
            "t_step_stop": 3000,
            "t_step_save": 500,
            # Simulation Algorithm Parameters
            "model_eqns": 2,
            "time_stepper": 3,
            "num_fluids": 2,
            "num_patches": 1,
            "viscous": "T",
            "mpp_lim": "F",
            "weno_order": 5,
            "weno_eps": 1.0e-16,
            "mapped_weno": "T",
            "riemann_solver": 2,
            "wave_speeds": 1,
            "avg_state": 2,
            "bc_x%beg": -6,
            "bc_x%end": -6,
            "bc_y%beg": -1,
            "bc_y%end": -1,
            # Acoustic source
            "acoustic_source": "T",
            "num_source": 1,
            "acoustic(1)%support": 2,
            "acoustic(1)%pulse": 1,
            "acoustic(1)%npulse": 1,
            "acoustic(1)%mag": pamp / p0,
            "acoustic(1)%wavelength": wlen / x0,
            "acoustic(1)%length": 2 * (ye - yb) / x0,
            "acoustic(1)%loc(1)": -7.0e-03 / x0,
            "acoustic(1)%loc(2)": 0.0,
            "acoustic(1)%dir": 0.0,
            "acoustic(1)%delay": 0.0,
            # Formatted Database Files Structure Parameters
            "format": 1,
            "precision": 2,
            "prim_vars_wrt": "T",
            "parallel_io": "T",
            "lag_db_wrt": "T",
            # Patch 1: Water (left)
            "patch_icpp(1)%geometry": 3,
            "patch_icpp(1)%x_centroid": 0.0,
            "patch_icpp(1)%y_centroid": 0.0,
            "patch_icpp(1)%length_x": 2 * (xe - xb) / x0,
            "patch_icpp(1)%length_y": 2 * (ye - yb) / x0,
            "patch_icpp(1)%vel(1)": 0.0,
            "patch_icpp(1)%vel(2)": 0.0,
            "patch_icpp(1)%pres": patm / p0,
            "patch_icpp(1)%alpha_rho(1)": rho_host / rho0,
            "patch_icpp(1)%alpha_rho(2)": 0.0,
            "patch_icpp(1)%alpha(1)": 1.0,
            "patch_icpp(1)%alpha(2)": 0.0,
            # Lagrangian Bubbles
            "bubbles_lagrange": "T",
            "bubble_model": 2,  # Keller-Miksis model
            "thermal": 3,
            "polytropic": "F",
            "lag_params%nBubs_glb": 1194,  # Number of bubbles
            "lag_params%solver_approach": 2,
            "lag_params%cluster_type": 2,
            "lag_params%pressure_corrector": "T",
            "lag_params%smooth_type": 1,
            "lag_params%heatTransfer_model": "T",
            "lag_params%massTransfer_model": "T",
            "lag_params%epsilonb": 1.0,
            "lag_params%valmaxvoid": 0.9,
            "lag_params%write_bubbles": "F",
            "lag_params%write_bubbles_stats": "F",
            # Bubble parameters
            "bub_pp%R0ref": 1.0,
            "bub_pp%p0ref": 1.0,
            "bub_pp%rho0ref": 1.0,
            "bub_pp%T0ref": 1.0,
            "bub_pp%ss": sigBubble / (rho0 * x0 * c0 * c0),
            "bub_pp%pv": pv / p0,
            "bub_pp%vd": diffVapor / (x0 * c0),
            "bub_pp%mu_l": mu_host / (rho0 * x0 * c0),
            "bub_pp%gam_v": gam_v,
            "bub_pp%gam_g": gam_g,
            "bub_pp%M_v": MW_v,
            "bub_pp%M_g": MW_g,
            "bub_pp%k_v": k_v * (T0 / (x0 * rho0 * c0 * c0 * c0)),
            "bub_pp%k_g": k_g * (T0 / (x0 * rho0 * c0 * c0 * c0)),
            "bub_pp%cp_v": cp_v * (T0 / (c0 * c0)),
            "bub_pp%cp_g": cp_g * (T0 / (c0 * c0)),
            "bub_pp%R_v": (R_uni / MW_v) * (T0 / (c0 * c0)),
            "bub_pp%R_g": (R_uni / MW_g) * (T0 / (c0 * c0)),
            # Fluids Physical Parameters
            # Host medium
            "fluid_pp(1)%gamma": 1.0 / (gamma_host - 1.0),
            "fluid_pp(1)%pi_inf": gamma_host * (pi_inf_host / p0) / (gamma_host - 1.0),
            "fluid_pp(1)%Re(1)": 1.0 / (mu_host / (rho0 * c0 * x0)),
            # Bubble gas state
            "fluid_pp(2)%gamma": 1.0 / (gam_g - 1.0),
            "fluid_pp(2)%pi_inf": 0.0e00,
            "fluid_pp(2)%Re(1)": 1.0 / (mu_g / (rho0 * c0 * x0)),
Duplication

The block assigning many bub_pp%... parameters is repeated across multiple example case.py files. Consider centralizing this mapping (helper function or shared config) to reduce the risk of future partial swaps/inconsistencies between examples.

"lag_params%valmaxvoid": 0.9,
"lag_params%write_bubbles": "F",
"lag_params%write_bubbles_stats": "F",
# Bubble parameters
"bub_pp%R0ref": 1.0,
"bub_pp%p0ref": 1.0,
"bub_pp%rho0ref": 1.0,
"bub_pp%T0ref": 1.0,
"bub_pp%ss": sigBubble / (rho0 * x0 * c0 * c0),
"bub_pp%pv": pv / p0,
"bub_pp%vd": diffVapor / (x0 * c0),
"bub_pp%mu_l": mu_host / (rho0 * x0 * c0),
"bub_pp%gam_v": gam_v,
"bub_pp%gam_g": gam_g,
"bub_pp%M_v": MW_v,
"bub_pp%M_g": MW_g,
"bub_pp%k_v": k_v * (T0 / (x0 * rho0 * c0 * c0 * c0)),
"bub_pp%k_g": k_g * (T0 / (x0 * rho0 * c0 * c0 * c0)),
"bub_pp%cp_v": cp_v * (T0 / (c0 * c0)),
"bub_pp%cp_g": cp_g * (T0 / (c0 * c0)),
"bub_pp%R_v": (R_uni / MW_v) * (T0 / (c0 * c0)),
"bub_pp%R_g": (R_uni / MW_g) * (T0 / (c0 * c0)),
# Fluids Physical Parameters
Test Robustness

The regenerated golden metadata includes machine-specific details (absolute paths, hostnames, timestamps, and a dirty git state). This can create unnecessary churn and potential portability issues for CI or other developers. Consider filtering/redacting environment-specific fields from golden metadata, or excluding them from comparisons.

This file was created on 2025-12-16 20:33:48.365638.

mfc.sh:

    Invocation: test -o Lagrange Bubbles --generate
    Lock:       mpi=Yes & gpu=No & debug=No & gcov=No & unified=No & single=No & mixed=No & fastmath=No
    Git:        290200003ad4b30aa99f3c261cbf20a908ce3c6e on lag-swap (dirty)

simulation:

    CMake Configuration:

        CMake v4.1.2 on M4Pro.local

        C       : AppleClang v17.0.0.17000404 (/usr/bin/cc)
        Fortran : GNU v15.2.0 (/opt/homebrew/bin/gfortran)

        PRE_PROCESS   : OFF
        SIMULATION    : ON
        POST_PROCESS  : OFF
        SYSCHECK      : OFF
        DOCUMENTATION : OFF
        ALL           : OFF

        MPI     : ON
        OpenACC : OFF
        OpenMP  : OFF

        Fypp    : /Users/hyeoksu/MyWork/MFC-local/MFC/lag-swap/build/venv/bin/fypp
        Doxygen : 

        Build Type : Release

@codeant-ai
Copy link

codeant-ai bot commented Dec 17, 2025

Nitpicks 🔍

🔒 No security issues identified
⚡ Recommended areas for review

  • Missing scaling parameters
    Several previously-present scaling keys under lag_params (e.g. c0, rho0, T0, x0, diffcoefvap, Thost, charwidth) were removed. If downstream code or the solver expects these keys they will be absent and could cause incorrect behavior or runtime errors. Confirm the removal is intentional, or re-add the required lag_params%* entries with correct nondimensionalized values.

  • Unit-conversion checks
    New bub_pp%* entries apply many unit conversions (k_v/k_g, cp_v/cp_g, R_v/R_g). Verify that the conversion factors (powers of c0, x0, rho0, T0) match the solver's nondimensionalization convention; incorrect exponents or swapped variables will silently produce wrong physical behaviour.

  • Units / scaling correctness
    The new bub_pp entries apply nondimensionalization factors (k, cp, R). Verify these formulas are consistent across the codebase and match the solver's expected scaling (especially powers of c0 and placement of x0/rho0). A small mistake in these factors will silently change physical behavior.

  • Unit conversion consistency
    The nondimensionalization factors used for thermal conductivity, specific heat and the gas constant look fragile and repeated inline. Confirm the scaling expressions (e.g. T0 / (x0 * rho0 * c0 * c0 * c0) and T0 / (c0 * c0)) are correct and consistent with the rest of the codebase; a mismatch will lead to incorrect physical behaviour.

  • Property mapping correctness
    The mapping of vapor vs gas properties was corrected here. Verify that other parts of the code (readers, solvers, golden files, tests) expect the same ordering/keys for bub_pp%gam_v, bub_pp%gam_g, bub_pp%M_v, bub_pp%M_g, etc. Inconsistent expectations may reintroduce subtle bugs.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 20 files

@codeant-ai
Copy link

codeant-ai bot commented Dec 17, 2025

CodeAnt AI finished reviewing your PR.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

♻️ Duplicate comments (1)
tests/B9553426/golden-metadata.txt (1)

1-7: Same issue: Regenerate in CI environment.

This golden metadata file exhibits the same concerns as tests/2122A4F6/golden-metadata.txt - local generation on M4Pro.local with dirty git state.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2902000 and d4f382a.

📒 Files selected for processing (12)
  • examples/2D_lagrange_bubblescreen/case.py (3 hunks)
  • examples/3D_lagrange_bubblescreen/case.py (1 hunks)
  • examples/3D_lagrange_shbubcollapse/case.py (1 hunks)
  • tests/016C1B8B/golden-metadata.txt (1 hunks)
  • tests/0D1FA5C5/golden-metadata.txt (1 hunks)
  • tests/12ECE133/golden-metadata.txt (1 hunks)
  • tests/2122A4F6/golden-metadata.txt (1 hunks)
  • tests/4A1BD9B8/golden-metadata.txt (1 hunks)
  • tests/B9553426/golden-metadata.txt (1 hunks)
  • tests/CE7B0BC7/golden-metadata.txt (1 hunks)
  • tests/DFF6E349/golden-metadata.txt (1 hunks)
  • toolchain/mfc/test/cases.py (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-11-24T21:50:16.713Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T21:50:16.713Z
Learning: Add and update focused tests for changes; ensure no regressions in golden test outputs without clear justification

Applied to files:

  • tests/0D1FA5C5/golden-metadata.txt
  • tests/2122A4F6/golden-metadata.txt
  • tests/B9553426/golden-metadata.txt
  • tests/DFF6E349/golden-metadata.txt
  • tests/CE7B0BC7/golden-metadata.txt
  • tests/4A1BD9B8/golden-metadata.txt
  • tests/016C1B8B/golden-metadata.txt
  • tests/12ECE133/golden-metadata.txt
📚 Learning: 2025-11-24T21:50:46.909Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .cursor/rules/mfc-agent-rules.mdc:0-0
Timestamp: 2025-11-24T21:50:46.909Z
Learning: Draft a step-by-step plan before making changes; build after each step using `./mfc.sh build -t pre_process simulation -j $(nproc)`

Applied to files:

  • tests/0D1FA5C5/golden-metadata.txt
  • tests/2122A4F6/golden-metadata.txt
  • tests/B9553426/golden-metadata.txt
  • tests/DFF6E349/golden-metadata.txt
  • tests/CE7B0BC7/golden-metadata.txt
  • tests/4A1BD9B8/golden-metadata.txt
  • tests/016C1B8B/golden-metadata.txt
  • tests/12ECE133/golden-metadata.txt
📚 Learning: 2025-11-24T21:50:16.713Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T21:50:16.713Z
Learning: Applies to src/simulation/**/*.{fpp,f90} : Ensure GPU code compiles with Cray ftn, NVIDIA nvfortran, GNU gfortran, and Intel ifx/ifort compilers

Applied to files:

  • tests/0D1FA5C5/golden-metadata.txt
  • tests/2122A4F6/golden-metadata.txt
  • tests/B9553426/golden-metadata.txt
  • tests/DFF6E349/golden-metadata.txt
  • tests/CE7B0BC7/golden-metadata.txt
  • tests/4A1BD9B8/golden-metadata.txt
  • tests/016C1B8B/golden-metadata.txt
  • tests/12ECE133/golden-metadata.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (14)
  • GitHub Check: Coverage Test on CodeCov
  • GitHub Check: Code Cleanliness Check
  • GitHub Check: Github (macos, mpi, debug, false)
  • GitHub Check: Github (ubuntu, mpi, no-debug, true)
  • GitHub Check: Github (ubuntu, mpi, no-debug, false)
  • GitHub Check: Github (ubuntu, mpi, debug, false)
  • GitHub Check: Github (ubuntu, mpi, debug, true)
  • GitHub Check: Github (ubuntu, no-mpi, single, no-debug, false)
  • GitHub Check: Georgia Tech | Phoenix (gpu-acc)
  • GitHub Check: Github (macos, mpi, no-debug, false)
  • GitHub Check: Georgia Tech | Phoenix (gpu-omp)
  • GitHub Check: Georgia Tech | Phoenix (cpu)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Build & Publish
🔇 Additional comments (15)
tests/0D1FA5C5/golden-metadata.txt (1)

1-153: Clarify the rationale for re-baselining the entire build environment.

This file has been completely re-baselining from a Linux HPC environment to a macOS Apple Silicon (M4 Pro) environment. While the PR objectives mention updating golden files, the scope of this change—switching compilers, paths, CMake configuration, and CPU metadata across all sections—appears disproportionate to the stated goal of fixing swapped vapor/gas properties.

Key concerns:

  • Scope mismatch: The PR focuses on parameter corrections; this file reflects a full environmental migration, not a minimal golden-file update.
  • Reproducibility: If other CI/CD pipelines or developers run tests on Linux or different architectures, this baseline may cause failures or inconsistencies.
  • Justification: The PR description does not explain why the entire environment baseline is being switched. Per the learnings, golden test output changes should include clear justification.

Please clarify:

  1. Is this re-baselining intentional and necessary for the bubble parameter fixes?
  2. Will this file be the new baseline for all future tests, or is it specific to your local development environment?
  3. Should golden metadata be environment-agnostic, or is it acceptable to lock golden tests to a specific machine/architecture?

If this re-baselining is required, consider documenting the reasoning in the PR description or commit message for future reviewers.

tests/DFF6E349/golden-metadata.txt (1)

1-154: This file is correctly included in version control.

MFC's test infrastructure intentionally tracks golden-metadata.txt files with environment-specific details. The .gitignore explicitly includes !/tests/*/golden-metadata.txt, requiring these files to be committed. Build environment and device metadata are captured by design to support benchmarking and cross-system regression testing in an HPC context. The presence of different hostnames and paths across test cases reflects the expected behavior of the test suite running on multiple systems.

Likely an incorrect or invalid review comment.

tests/CE7B0BC7/golden-metadata.txt (3)

1-7: Clarify the scope and justification for golden-metadata.txt rebaseline.

The PR objective is to "fix swapped vapor gas properties" but this golden file reflects a complete environmental/toolchain rebaseline from Linux HPC to macOS Apple (M4 Pro), including compiler changes, Fypp paths, and CPU metadata. This appears disconnected from the vapor/gas property fix.

Verify:

  1. Whether the gas/vapor property corrections actually require this golden-metadata rebaseline, or if this is incidental environmental drift.
  2. Whether the dirty state on line 7 should be cleaned before commit.

27-27: Explain the OpenMP toggle change from ON to OFF.

All four component sections (simulation, syscheck, post_process, pre_process) show OpenMP switched from ON to OFF. This change is not mentioned in the PR summary. Clarify whether this is:

  • Intentional as part of fixing the vapor/gas properties, or
  • An incidental environmental quirk on the developer's macOS machine.

Also applies to: 61-61, 95-95, 129-129


145-154: Verify CPU metadata reflects the correct build environment.

The CPU metadata changed from Linux/Intel-like to Apple M4 Pro (macOS). If this golden file is meant to capture canonical build information for CI/CD regression testing, ensure this reflects the primary target environment (likely Linux/HPC), not a local development machine.

examples/3D_lagrange_shbubcollapse/case.py (1)

167-176: LGTM! Vapor/gas property mappings corrected.

The bubble parameter assignments now correctly map vapor properties (gam_v, M_v, k_v, cp_v, R_v) to their respective bub_pp%*_v parameters and gas properties to bub_pp%*_g parameters, aligning with the fix described in the PR objectives.

toolchain/mfc/test/cases.py (1)

865-868: LGTM! Test parameter keys reordered to match corrected vapor/gas mappings.

The bub_pp parameter keys have been reordered to align vapor properties (M_v, k_v, R_v) before their gas counterparts (M_g, k_g, R_g), consistent with the vapor/gas swap fix across the PR.

examples/3D_lagrange_bubblescreen/case.py (1)

165-174: LGTM! Vapor/gas property mappings corrected.

Bubble parameters correctly assign vapor and gas properties to their respective bub_pp fields, consistent with the fix in other example files.

examples/2D_lagrange_bubblescreen/case.py (3)

29-30: LGTM! Variable naming standardized.

The renaming from gamma_g/gamma_v to gam_g/gam_v aligns with the naming convention used for other gas/vapor properties in the codebase.


131-162: LGTM! Bubble parameter block correctly structured.

The new bub_pp parameter block properly organizes all bubble-related properties with correct vapor/gas mappings:

  • Vapor properties (gam_v, M_v, k_v, cp_v, R_v) → bub_pp%*_v
  • Gas properties (gam_g, M_g, k_g, cp_g, R_g) → bub_pp%*_g

The addition of thermal=3 and polytropic="F" configures the non-polytropic thermal model.


169-169: LGTM! Fluid property updated to use new variable name.

The update from gamma_g to gam_g maintains consistency with the variable renaming at the top of the file.

tests/2122A4F6/golden-metadata.txt (1)

1-7: Regenerate golden metadata in CI environment.

The golden metadata shows:

  • Generated on local macOS machine (M4Pro.local)
  • Git revision indicates "dirty" state with uncommitted changes

Golden test files should be generated in a clean CI environment to ensure consistency and avoid test failures when other contributors run tests on standard CI infrastructure.

Based on learnings, golden test outputs should match CI environment without local variations.

#!/bin/bash
# Verify if other golden metadata files also show local/dirty generation
echo "Checking for local machine names and dirty git states in golden metadata files:"
fd -e txt golden-metadata.txt tests/ --exec grep -l "M4Pro.local\|dirty" {} \;
⛔ Skipped due to learnings
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T21:50:16.713Z
Learning: Add and update focused tests for changes; ensure no regressions in golden test outputs without clear justification
tests/12ECE133/golden-metadata.txt (1)

1-10: Manual verification required for golden-metadata.txt changes.

The review raises valid concerns about golden file management and environment-specific paths, aligned with best practices (auto-generated files should regenerate only when upstream behavior changes). However, verification is inconclusive without direct access to: (1) the actual committed paths in golden-metadata.txt, (2) the repository's path sanitization practices, and (3) the functional changes in the PR that triggered the metadata regeneration.

Request clarification on whether these metadata changes are necessary artifacts of the vapor/gas property fixes or unrelated infrastructure updates that should be decoupled.

tests/4A1BD9B8/golden-metadata.txt (2)

36-38: Verify environment-specific compiler paths are reproducible.

Lines 36–38, 70–72, 104–106, and 138–140 hardcode absolute paths to compilers (/usr/bin/cc, /opt/homebrew/bin/gfortran). These are environment-specific and may not be reproducible across different systems or CI environments. Verify that:

  1. This golden file is intended for this specific developer environment only, or
  2. Paths should be normalized/abstracted for cross-environment reproducibility.

Also applies to: 70-72, 104-106, 138-140


1-8: Clarify scope and legitimacy of golden file re-baselining.

This golden file represents a significant re-baselining across multiple dimensions:

  • Build environment migration (Linux → macOS Apple M4 Pro)
  • CMake/toolchain versions updated
  • Configuration section reordering
  • User-specific paths introduced

The PR objectives focus on fixing swapped vapor/gas properties and correcting parameter inputs, but this file captures only build/environment metadata changes. Verify that:

  1. This re-baselining is intentional and necessary for the PR's correctness goals, and
  2. Other related golden files (and test outputs) in the PR follow the same environment migration pattern.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d4f382a and 2cc24c7.

📒 Files selected for processing (5)
  • docs/documentation/case.md (1 hunks)
  • src/common/m_derived_types.fpp (0 hunks)
  • src/simulation/m_global_parameters.fpp (0 hunks)
  • src/simulation/m_mpi_proxy.fpp (1 hunks)
  • toolchain/mfc/run/case_dicts.py (1 hunks)
💤 Files with no reviewable changes (2)
  • src/common/m_derived_types.fpp
  • src/simulation/m_global_parameters.fpp
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{fpp,f90}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{fpp,f90}: Use 2-space indentation; continuation lines align beneath &
Use lower-case keywords and intrinsics (do, end subroutine, etc.)
Name modules with m_ pattern (e.g., m_transport)
Name public subroutines with s_ pattern (e.g., s_compute_flux)
Name public functions with f
_ pattern
Keep subroutine size ≤ 500 lines, helper subroutines ≤ 150 lines, functions ≤ 100 lines, files ≤ 1000 lines
Limit routine arguments to ≤ 6; use derived-type params struct if more are needed
Forbid goto statements (except in legacy code), COMMON blocks, and save globals
Every argument must have explicit intent; use dimension/allocatable/pointer as appropriate
Call s_mpi_abort() for errors, never use stop or error stop

**/*.{fpp,f90}: Indent 2 spaces; continuation lines align under &
Use lower-case keywords and intrinsics (do, end subroutine, etc.)
Name modules with m_<feature> prefix (e.g., m_transport)
Name public subroutines as s_<verb>_<noun> (e.g., s_compute_flux) and functions as f_<verb>_<noun>
Keep private helpers in the module; avoid nested procedures
Enforce size limits: subroutine ≤ 500 lines, helper ≤ 150, function ≤ 100, module/file ≤ 1000
Limit subroutines to ≤ 6 arguments; otherwise pass a derived-type 'params' struct
Avoid goto statements (except unavoidable legacy); avoid global state (COMMON, save)
Every variable must have intent(in|out|inout) specification and appropriate dimension / allocatable / pointer
Use s_mpi_abort(<msg>) for error termination instead of stop
Use !> style documentation for header comments; follow Doxygen Fortran format with !! @param and !! @return tags
Use implicit none statement in all modules
Use private declaration followed by explicit public exports in modules
Use derived types with pointers for encapsulation (e.g., pointer, dimension(:,:,:) => null())
Use pure and elemental attributes for side-effect-free functions; combine them for array ...

Files:

  • src/simulation/m_mpi_proxy.fpp
src/simulation/**/*.{fpp,f90}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/simulation/**/*.{fpp,f90}: Wrap tight GPU loops with !$acc parallel loop gang vector default(present) reduction(...); add collapse(n) when safe; declare loop-local variables with private(...)
Allocate large GPU arrays with managed memory or move them into persistent !$acc enter data regions at start-up
Avoid stop/error stop inside GPU device code
Ensure GPU code compiles with Cray ftn, NVIDIA nvfortran, GNU gfortran, and Intel ifx/ifort compilers

src/simulation/**/*.{fpp,f90}: Mark GPU-callable helpers with $:GPU_ROUTINE(function_name='...', parallelism='[seq]') immediately after declaration
Do not use OpenACC or OpenMP directives directly; use Fypp macros from src/common/include/parallel_macros.fpp instead
Wrap tight loops with $:GPU_PARALLEL_FOR(private='[...]', copy='[...]') macro; add collapse=n for safe nested loop merging
Declare loop-local variables with private='[...]' in GPU parallel loop macros
Allocate large arrays with managed or move them into a persistent $:GPU_ENTER_DATA(...) region at start-up
Do not place stop or error stop inside device code

Files:

  • src/simulation/m_mpi_proxy.fpp
src/**/*.fpp

📄 CodeRabbit inference engine (.cursor/rules/mfc-agent-rules.mdc)

src/**/*.fpp: Use .fpp file extension for Fypp preprocessed files; CMake transpiles them to .f90
Start module files with Fypp include for macros: #:include 'macros.fpp'
Use the fypp ASSERT macro for validating conditions: @:ASSERT(predicate, message)
Use fypp macro @:ALLOCATE(var1, var2) for device-aware allocation instead of standard Fortran allocate
Use fypp macro @:DEALLOCATE(var1, var2) for device-aware deallocation instead of standard Fortran deallocate

Files:

  • src/simulation/m_mpi_proxy.fpp
🧠 Learnings (7)
📚 Learning: 2025-11-24T21:50:16.713Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T21:50:16.713Z
Learning: Applies to src/simulation/**/*.{fpp,f90} : Wrap tight GPU loops with !$acc parallel loop gang vector default(present) reduction(...); add collapse(n) when safe; declare loop-local variables with private(...)

Applied to files:

  • src/simulation/m_mpi_proxy.fpp
📚 Learning: 2025-11-24T21:50:46.909Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .cursor/rules/mfc-agent-rules.mdc:0-0
Timestamp: 2025-11-24T21:50:46.909Z
Learning: Applies to src/simulation/**/*.{fpp,f90} : Declare loop-local variables with `private='[...]'` in GPU parallel loop macros

Applied to files:

  • src/simulation/m_mpi_proxy.fpp
📚 Learning: 2025-11-24T21:50:46.909Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .cursor/rules/mfc-agent-rules.mdc:0-0
Timestamp: 2025-11-24T21:50:46.909Z
Learning: Applies to src/simulation/**/*.{fpp,f90} : Do not use OpenACC or OpenMP directives directly; use Fypp macros from `src/common/include/parallel_macros.fpp` instead

Applied to files:

  • src/simulation/m_mpi_proxy.fpp
📚 Learning: 2025-11-24T21:50:46.909Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .cursor/rules/mfc-agent-rules.mdc:0-0
Timestamp: 2025-11-24T21:50:46.909Z
Learning: Applies to src/simulation/**/*.{fpp,f90} : Wrap tight loops with `$:GPU_PARALLEL_FOR(private='[...]', copy='[...]')` macro; add `collapse=n` for safe nested loop merging

Applied to files:

  • src/simulation/m_mpi_proxy.fpp
📚 Learning: 2025-11-24T21:50:46.909Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .cursor/rules/mfc-agent-rules.mdc:0-0
Timestamp: 2025-11-24T21:50:46.909Z
Learning: Applies to **/*.{fpp,f90} : Limit subroutines to ≤ 6 arguments; otherwise pass a derived-type 'params' struct

Applied to files:

  • src/simulation/m_mpi_proxy.fpp
📚 Learning: 2025-11-24T21:50:16.713Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T21:50:16.713Z
Learning: Applies to src/simulation/**/*.{fpp,f90} : Ensure GPU code compiles with Cray ftn, NVIDIA nvfortran, GNU gfortran, and Intel ifx/ifort compilers

Applied to files:

  • src/simulation/m_mpi_proxy.fpp
📚 Learning: 2025-11-24T21:50:16.713Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T21:50:16.713Z
Learning: Applies to **/*.{fpp,f90} : Limit routine arguments to ≤ 6; use derived-type params struct if more are needed

Applied to files:

  • src/simulation/m_mpi_proxy.fpp
🪛 markdownlint-cli2 (0.18.1)
docs/documentation/case.md

755-755: Hard tabs
Column: 67

(MD010, no-hard-tabs)


756-756: Hard tabs
Column: 65

(MD010, no-hard-tabs)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: Code Cleanliness Check
  • GitHub Check: Coverage Test on CodeCov
  • GitHub Check: Github (ubuntu, mpi, debug, false)
  • GitHub Check: Github (macos, mpi, debug, false)
  • GitHub Check: Github (ubuntu, no-mpi, single, no-debug, false)
  • GitHub Check: Github (ubuntu, mpi, debug, true)
  • GitHub Check: Github (ubuntu, mpi, no-debug, false)
  • GitHub Check: Georgia Tech | Phoenix (gpu-omp)
  • GitHub Check: Github (ubuntu, mpi, no-debug, true)
  • GitHub Check: Github (macos, mpi, no-debug, false)
  • GitHub Check: Georgia Tech | Phoenix (gpu-acc)
  • GitHub Check: Build & Publish
🔇 Additional comments (3)
toolchain/mfc/run/case_dicts.py (1)

352-353: LGTM! Consistent parameter cleanup.

The reduction of lag_params real-typed fields to only epsilonb, valmaxvoid, and charwidth correctly aligns with the removal of c0, rho0, T0, x0, and Thost from the bubbles_lagrange_parameters derived type and their corresponding MPI broadcasts.

src/simulation/m_mpi_proxy.fpp (1)

143-145: LGTM! MPI broadcast correctly narrowed.

The MPI broadcast of lag_params fields now correctly transmits only epsilonb, charwidth, and valmaxvoid, consistent with the updated bubbles_lagrange_parameters derived type and the parameter dictionary in case_dicts.py.

docs/documentation/case.md (1)

758-777: Documentation updates look good.

The percent-sign escaping (%%) is correctly applied to all bub_pp parameter names for proper markdown table rendering. The parameter descriptions and footnote markers are clear and accurate.

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.98%. Comparing base (2902000) to head (a205146).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1093      +/-   ##
==========================================
- Coverage   43.99%   43.98%   -0.02%     
==========================================
  Files          71       71              
  Lines       20289    20284       -5     
  Branches     1982     1982              
==========================================
- Hits         8927     8922       -5     
  Misses      10225    10225              
  Partials     1137     1137              

☔ 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.

@codeant-ai
Copy link

codeant-ai bot commented Dec 20, 2025

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@sbryngelson
Copy link
Member

@wilfonba is this right?

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

"lag_params%write_bubbles": "F",
"lag_params%write_bubbles_stats": "F",
"lag_params%c0": c0,
"lag_params%rho0": rho0,
Copy link

Choose a reason for hiding this comment

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

Missing charwidth parameter in 2D Lagrangian bubble example

The 2D Lagrangian bubble example no longer sets lag_params%charwidth, but this parameter is required for 2D non-cylindrical simulations. The simulation code uses charwidth for cell volume calculations and particle domain boundary checks in m_bubbles_EL.fpp. Without setting it, the default value of -1e6 is used, causing incorrect volume calculations (negative volumes) and domain checks. The variable z_virtual is still defined on line 52 but is now unused after this change removed "lag_params%charwidth": z_virtual / x0.

Fix in Cursor Fix in Web

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

Labels

Possible security concern Review effort 3/5 size:XL This PR changes 500-999 lines, ignoring generated files

Development

Successfully merging this pull request may close these issues.

2 participants