-
Notifications
You must be signed in to change notification settings - Fork 121
fix: Add missing intent attributes to subroutine arguments #1023
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
base: master
Are you sure you want to change the base?
Conversation
Resolved fortitude lint errors: - [C061] Added intent(inout) to q_prim_vf and bc_type in s_apply_boundary_patches() (m_boundary_conditions.fpp:233-234) This fixes pre-existing lint violations that were preventing documentation-only PRs from passing CI checks.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨No code suggestions found for the 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.
Pull Request Overview
This PR adds explicit intent(inout) declarations to the arguments of the s_apply_boundary_patches subroutine and adds "Sur" to the typo checker whitelist.
- Adds explicit
intent(inout)to two arguments ofs_apply_boundary_patchesto comply with Fortran coding standards - Whitelists "Sur" in
.typos.tomlto prevent false-positive spell-check warnings
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/pre_process/m_boundary_conditions.fpp | Adds explicit intent(inout) declarations to q_prim_vf and bc_type parameters in s_apply_boundary_patches |
| .typos.toml | Whitelists the word "Sur" to prevent typo checker from flagging it as a misspelling |
|
|
||
| type(scalar_field), dimension(sys_size) :: q_prim_vf | ||
| type(integer_field), dimension(1:num_dims, -1:1) :: bc_type | ||
| type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf |
Copilot
AI
Nov 4, 2025
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.
The parameter q_prim_vf is declared with intent(inout) but is never used or modified in the subroutine body. Based on the subroutine implementation (lines 237-261), only bc_type is passed to helper subroutines (s_circle_bc, s_rectangle_bc, s_line_segment_bc). This parameter should be declared with intent(in) instead, or removed entirely if not needed.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1023 +/- ##
=======================================
Coverage 46.02% 46.02%
=======================================
Files 67 67
Lines 13437 13437
Branches 1550 1550
=======================================
Hits 6185 6185
Misses 6362 6362
Partials 890 890 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
User description
Resolved fortitude lint errors:
This fixes pre-existing lint violations that were preventing documentation-only PRs from passing CI checks.
Description
Please include a summary of the changes and the related issue(s) if they exist.
Please also include relevant motivation and context.
Fixes #(issue) [optional]
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?
Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration
Test Configuration:
Checklist
docs/)examples/that demonstrate my new feature performing as expected.They run to completion and demonstrate "interesting physics"
./mfc.sh formatbefore committing my codeIf 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:
nvtxranges so that they can be identified in profiles./mfc.sh run XXXX --gpu -t simulation --nsys, and have attached the output file (.nsys-rep) and plain text results to this PR./mfc.sh run XXXX --gpu -t simulation --rsys --hip-trace, and have attached the output file and plain text results to this PR.PR Type
Bug fix
Description
Added missing
intent(inout)attributes to subroutine argumentsResolves Fortitude lint error [C061] in
s_apply_boundary_patches()Updated typos configuration with "Sur" exception
Diagram Walkthrough
File Walkthrough
m_boundary_conditions.fpp
Add intent attributes to subroutine parameterssrc/pre_process/m_boundary_conditions.fpp
intent(inout)attribute toq_prim_vfparameter ins_apply_boundary_patches()subroutineintent(inout)attribute tobc_typeparameter ins_apply_boundary_patches()subroutine.typos.toml
Add Sur to typos exceptions.typos.toml