Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1f83aeb
Integrate ffmt Fortran formatter into MFC
sbryngelson Mar 20, 2026
d9d7ee2
Apply ffmt formatting with comment alignment and idempotency fixes
sbryngelson Mar 21, 2026
cb33f11
Apply ffmt: remove bare !<, convert to !> block comments, align inlin…
sbryngelson Mar 21, 2026
49353ad
Apply ffmt: blank line formatting, comment rewrapping, use/declaratio…
sbryngelson Mar 21, 2026
01fd1b6
Apply ffmt: remove blanks after #ifdef, fix Fypp continuation alignment
sbryngelson Mar 21, 2026
91eabae
Apply ffmt: fix blank lines after #ifdef in declaration regions
sbryngelson Mar 21, 2026
023a5b4
Apply ffmt: remove blank lines after #else/#elif continuations
sbryngelson Mar 21, 2026
83576b6
Apply ffmt: strip trailing !& no-op comments from m_weno.fpp
sbryngelson Mar 21, 2026
adc5219
Apply ffmt: strip comment-only continuation lines (& ! ...)
sbryngelson Mar 21, 2026
4ab00f4
Condense verbose multi-line comments across codebase
sbryngelson Mar 21, 2026
a1af509
Fix spelling errors and remove redundant comments across codebase
sbryngelson Mar 22, 2026
55e39d8
Fix stale comments and remove dead code
sbryngelson Mar 22, 2026
b6fa124
Remove commented-out dead code (debug prints, old IB I/O, stale imple…
sbryngelson Mar 22, 2026
861cb51
Add physics documentation: paper references, equation citations, algo…
sbryngelson Mar 22, 2026
9be1d12
Add documentation: model branch labels, solver references, algorithm …
sbryngelson Mar 22, 2026
237f38a
Trim verbose paper references and remove duplicate comments
sbryngelson Mar 22, 2026
17d142e
Fix unterminated comment: remove /**R pattern that triggers C-style b…
sbryngelson Mar 22, 2026
b15c089
Document GPU macros and constants; remove generic use-statement comments
sbryngelson Mar 22, 2026
eb81d5c
Fix dead Stanford link in NACA airfoil docs
sbryngelson Mar 22, 2026
81e4e98
Fix comment typos, remove dead code, apply ffmt S102/S081 formatting
sbryngelson Mar 22, 2026
17b6fdd
Standardize Doxygen: remove obvious @param, clean verbose headers, co…
sbryngelson Mar 22, 2026
eeece9b
Add missing subroutine headers; fix orphan !!, !!IB markers, !!> syntax
sbryngelson Mar 22, 2026
10c5a16
Fix Doxygen markers: !! to !<, !!< to !<, inline variable docs, conde…
sbryngelson Mar 23, 2026
e96eb98
Rename ffmt.toml to .ffmt.toml, fix corrupted UTF-8 em-dashes, add mi…
sbryngelson Mar 23, 2026
c00be3e
Compact slice subscripts, fix remaining Doxygen inline comments
sbryngelson Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .ffmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# MFC Fortran formatting configuration
# These are the defaults — this file makes them explicit.

indent-width = 4
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Use 2-space indentation in formatter config.

Line 4 sets indent-width = 4, which conflicts with the project Fortran style and can cause persistent formatting drift.

Suggested fix
-indent-width = 4
+indent-width = 2

As per coding guidelines: Use 2-space indentation, lowercase keywords, and explicit intent on all subroutine/function arguments in Fortran code.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
indent-width = 4
indent-width = 2

keyword-case = "lower"
normalize-keywords = true
indent-fypp = true

[whitespace]
relational = true
logical = true
plusminus = true
multdiv = false
power = false
assignment = true
declaration = true
comma = true
slice-colon = false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,4 @@ benchmarks/*.png
cce_*/
cce_*.log
run_cce_*.sh
.ffmt_cache/
2 changes: 1 addition & 1 deletion docs/documentation/case.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ Definitions for currently implemented immersed boundary patch types are listed i

- `c`, `t`, `p`, and `m` specify the parameters for a NACA airfoil.
`m` is the maximum camber, `p` is the location of maximum camber, `c` is the coord length, and `t` is the thickness.
Additional details on this specification can be found in [The Naca Airfoil Series](https://web.stanford.edu/~cantwell/AA200_Course_Material/The%20NACA%20airfoil%20series.pdf)
Additional details on this specification can be found in [NACA airfoil](https://en.wikipedia.org/wiki/NACA_airfoil).

- `slip` applies a slip boundary to the surface of the patch if true and a no-slip boundary condition to the surface if false.

Expand Down
34 changes: 13 additions & 21 deletions src/common/include/1dHardcodedIC.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,29 @@

#:def Hardcoded1D()
select case (patch_icpp(patch_id)%hcid)
case (150) ! 1D Smooth Alfven Case for MHD
case (150) ! 1D Smooth Alfven Case for MHD
! velocity
q_prim_vf(momxb + 1)%sf(i, 0, 0) = 0.1_wp*sin(2._wp*pi*x_cc(i))
q_prim_vf(momxb + 2)%sf(i, 0, 0) = 0.1_wp*cos(2._wp*pi*x_cc(i))

! magnetic field
q_prim_vf(B_idx%end - 1)%sf(i, 0, 0) = 0.1_wp*sin(2._wp*pi*x_cc(i))
q_prim_vf(B_idx%end)%sf(i, 0, 0) = 0.1_wp*cos(2._wp*pi*x_cc(i))

case (170)
! This hardcoded case can be used to start a simulation with initial conditions given from a known 1D profile (e.g. Cantera, SDtoolbox)
case (170) ! 1D profile from external data (e.g. Cantera, SDtoolbox)
! This hardcoded case can be used to start a simulation with initial conditions given from a known 1D profile (e.g. Cantera,
! SDtoolbox)
@: HardcodedReadValues()

case (180)
! This is patch is hard-coded for test suite optimization used in the
! 1D_shuoser cases: "patch_icpp(2)%alpha_rho(1)": "1 + 0.2*sin(5*x)"
case (180) ! Shu-Osher problem
! This is patch is hard-coded for test suite optimization used in the 1D_shuoser cases: "patch_icpp(2)%alpha_rho(1)": "1 +
! 0.2*sin(5*x)"
if (patch_id == 2) then
q_prim_vf(contxb + 0)%sf(i, 0, 0) = 1 + 0.2*sin(5*x_cc(i))
end if

case (181)
! This is patch is hard-coded for test suite optimization used in the
! 1D_titarevtorro cases: "patch_icpp(2)%alpha_rho(1)": "1 + 0.1*sin(20*x*pi)"
case (181) ! Titarev-Torro problem
! This is patch is hard-coded for test suite optimization used in the 1D_titarevtorro cases: "patch_icpp(2)%alpha_rho(1)":
! "1 + 0.1*sin(20*x*pi)"
q_prim_vf(contxb + 0)%sf(i, 0, 0) = 1 + 0.1*sin(20*x_cc(i)*pi)

case (182)
case (182) ! Multi-component diffusion
! This patch is a hard-coded for test suite optimization (multiple component diffusion)
x_mid_diffu = 0.05_wp/2.0_wp
width_sq = (2.5_wp*10.0_wp**(-3.0_wp))**2
Expand All @@ -51,16 +48,11 @@

temp = (320.0_wp - 1350.0_wp)*profile_shape + 1350.0_wp

molar_mass_inv = y1/31.998_wp + &
y2/18.01508_wp + &
y3/16.04256_wp + &
y4/28.0134_wp
molar_mass_inv = y1/31.998_wp + y2/18.01508_wp + y3/16.04256_wp + y4/28.0134_wp

q_prim_vf(contxb)%sf(i, 0, 0) = 1.01325_wp*(10.0_wp)**5/(temp*8.3144626_wp*1000.0_wp*molar_mass_inv)

case default
call s_int_to_str(patch_id, iStr)
call s_mpi_abort("Invalid hcid specified for patch "//trim(iStr))
call s_mpi_abort("Invalid hcid specified for patch " // trim(iStr))
end select

#:enddef
Loading
Loading