-
Notifications
You must be signed in to change notification settings - Fork 125
Adding internal energies to the output of the conservative variables (6-equation model) #1059
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
Conversation
Complete version of the SG EoS
|
CodeAnt AI is reviewing your PR. |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
Note Other AI code review bot(s) detectedCodeRabbit 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. WalkthroughAdds a per‑fluid energy output flag through the namelist, exposes the flag in global parameters and MPI broadcasts, and writes per‑fluid energy ( Changes
Sequence Diagram(s)sequenceDiagram
participant User as User / Namelist
participant Startup as s_read_input_file
participant Globals as m_global_parameters
participant MPI as s_mpi_bcast_user_inputs
participant Save as s_save_data
note over Startup,Globals: Input parsing & flag registration
User->>Startup: provide alpha_rho_e_wrt in namelist
Startup->>Globals: set alpha_rho_e_wrt(num_fluids)
Globals->>MPI: expose alpha_rho_e_wrt for broadcast
MPI->>MPI: broadcast alpha_rho_e_wrt to all ranks
note over Save: Runtime output decision
Save->>Save: if model_eqns==3 and (alpha_rho_e_wrt or cons_vars_wrt)
Save->>Save: loop over fluids -> compute q_sf -> write `alpha_rho_e` per fluid
Save-->>User: formatted database updated with per-fluid alpha_rho_e
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested labels
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this 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 1 file
There was a problem hiding this 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: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/post_process/m_start_up.fpp(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{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 withm_<feature>prefix (e.g.,m_transport)
Name public subroutines ass_<verb>_<noun>(e.g.,s_compute_flux) and functions asf_<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
Avoidgotostatements (except unavoidable legacy); avoid global state (COMMON,save)
Every variable must haveintent(in|out|inout)specification and appropriatedimension/allocatable/pointer
Uses_mpi_abort(<msg>)for error termination instead ofstop
Use!>style documentation for header comments; follow Doxygen Fortran format with!! @paramand!! @returntags
Useimplicit nonestatement in all modules
Useprivatedeclaration followed by explicitpublicexports in modules
Use derived types with pointers for encapsulation (e.g.,pointer, dimension(:,:,:) => null())
Usepureandelementalattributes for side-effect-free functions; combine them for array ...
Files:
src/post_process/m_start_up.fpp
src/**/*.fpp
📄 CodeRabbit inference engine (.cursor/rules/mfc-agent-rules.mdc)
src/**/*.fpp: Use.fppfile extension for Fypp preprocessed files; CMake transpiles them to.f90
Start module files with Fypp include for macros:#:include 'macros.fpp'
Use the fyppASSERTmacro for validating conditions:@:ASSERT(predicate, message)
Use fypp macro@:ALLOCATE(var1, var2)for device-aware allocation instead of standard Fortranallocate
Use fypp macro@:DEALLOCATE(var1, var2)for device-aware deallocation instead of standard Fortrandeallocate
Files:
src/post_process/m_start_up.fpp
🪛 GitHub Actions: Lint Source
src/post_process/m_start_up.fpp
[error] 1-1: Process completed with exit code 1 during file inspection step: grep -iR -e '...' -e '---' -e '===' ./src/*
⏰ 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: cubic · AI code reviewer
- GitHub Check: Self Hosted (gpu, omp, frontier)
- GitHub Check: Github (ubuntu, mpi, no-debug, false)
- GitHub Check: Github (macos, mpi, debug, false)
- GitHub Check: Self Hosted (gpu, acc, gt)
- GitHub Check: Self Hosted (gpu, omp, gt)
- GitHub Check: Github (macos, mpi, no-debug, false)
- GitHub Check: Github (ubuntu, no-mpi, single, no-debug, false)
- GitHub Check: Github (ubuntu, mpi, no-debug, true)
- GitHub Check: Github (ubuntu, mpi, debug, true)
- GitHub Check: Github (ubuntu, mpi, debug, false)
- GitHub Check: Code Cleanliness Check
- GitHub Check: Coverage Test on CodeCov
- GitHub Check: Build & Publish
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1059 +/- ##
=======================================
Coverage 44.35% 44.36%
=======================================
Files 71 71
Lines 20587 20596 +9
Branches 1993 1995 +2
=======================================
+ Hits 9132 9138 +6
- Misses 10310 10312 +2
- Partials 1145 1146 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
CodeAnt AI is running Incremental review |
|
CodeAnt AI Incremental review completed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 7 files (reviewed changes from recent commits).
Prompt for AI agents (all 1 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="src/post_process/m_start_up.fpp">
<violation number="1" location="src/post_process/m_start_up.fpp:426">
New alpha_rho_e fields are written to the formatted database, but dbvars is not incremented, so the binary header advertises too few variables and downstream readers desynchronize.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
User description
User description
Description
This PR comprises the addition of the individual internal energies for N fluids when the 6-equation model is used and the conservative variables are output. It facilitates data analysis when this variable is needed.
Type of change
Please delete options that are not relevant.
Scope
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:
Checklist
./mfc.sh formatbefore committing my codePR Type
Enhancement
Description
Add individual internal energies output for 6-equation model
Output conservative variables for each fluid phase
Enable energy analysis in post-processing visualization
Diagram Walkthrough
File Walkthrough
m_start_up.fpp
Add internal energies output loop for 6-equation modelsrc/post_process/m_start_up.fpp
6-equation model is active
variables
q_cons_vfarray with proper indexing andoffset handling
alpha_rho_e_ifor eachfluid phase
CodeAnt-AI Description
Expose per-fluid internal energies when exporting six-equation conservative data
What Changed
Impact
✅ Enables per-fluid internal energy visualization✅ More comprehensive six-equation conservative dumps✅ MPI runs respect new per-fluid energy requests💡 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:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
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:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
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
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.