Skip to content

Commit 29ee512

Browse files
sbryngelsonclaude
andcommitted
Add subroutine @brief descriptions and sidebar cross-navigation
- Add ~170 !> @brief one-line descriptions to previously undocumented subroutines/functions across all 45 source files - Add cross-navigation links (User Guide, Pre-Process/Simulation/Post- Process API) injected at the top of the Doxygen sidebar via JavaScript - Fix stale @param ib in s_ib_3D_airfoil Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bf2b25f commit 29ee512

45 files changed

Lines changed: 254 additions & 19 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/custom.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,38 @@
33
* Overrides for doxygen-awesome theme
44
*/
55

6+
/* Cross-navigation panel at top of sidebar */
7+
#mfc-nav {
8+
display: flex;
9+
flex-direction: column;
10+
padding: 10px 12px 8px;
11+
border-bottom: 1px solid var(--separator-color);
12+
background: var(--side-nav-background);
13+
font-size: 0.8rem;
14+
}
15+
16+
#mfc-nav a {
17+
display: block;
18+
padding: 4px 8px;
19+
border-radius: 4px;
20+
color: var(--page-foreground-color);
21+
text-decoration: none;
22+
opacity: 0.75;
23+
transition: background 0.12s, opacity 0.12s;
24+
}
25+
26+
#mfc-nav a:hover {
27+
opacity: 1;
28+
background: var(--side-nav-background-highlight, rgba(0,0,0,0.05));
29+
}
30+
31+
#mfc-nav a.active {
32+
font-weight: 600;
33+
opacity: 1;
34+
color: var(--primary-color);
35+
background: var(--side-nav-background-highlight, rgba(0,0,0,0.05));
36+
}
37+
638
/* Narrower left navigation panel */
739
html {
840
--side-nav-fixed-width: 210px;

docs/header.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,27 @@
6666
</table>
6767
</div>
6868
<!--END TITLEAREA-->
69+
<!-- Cross-navigation injected into sidebar via script below -->
70+
<script>
71+
document.addEventListener('DOMContentLoaded', function() {
72+
var nav = document.createElement('div');
73+
nav.id = 'mfc-nav';
74+
var items = [
75+
['../documentation/index.html', 'documentation', 'User Guide'],
76+
['../pre_process/index.html', 'pre_process', 'Pre-Process API'],
77+
['../simulation/index.html', 'simulation', 'Simulation API'],
78+
['../post_process/index.html', 'post_process', 'Post-Process API']
79+
];
80+
var path = window.location.pathname;
81+
for (var i = 0; i < items.length; i++) {
82+
var a = document.createElement('a');
83+
a.href = items[i][0];
84+
a.textContent = items[i][2];
85+
if (path.indexOf('/' + items[i][1] + '/') !== -1) a.className = 'active';
86+
nav.appendChild(a);
87+
}
88+
var sideNav = document.getElementById('side-nav');
89+
if (sideNav) sideNav.insertBefore(nav, sideNav.firstChild);
90+
});
91+
</script>
6992
<!-- end header part -->

src/common/m_boundary_common.fpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ module m_boundary_common
5252

5353
contains
5454

55+
!> @brief Allocates and sets up boundary condition buffer arrays for all coordinate directions.
5556
impure subroutine s_initialize_boundary_common_module()
5657

5758
integer :: i, j
@@ -296,6 +297,7 @@ contains
296297

297298
end subroutine s_populate_variables_buffers
298299

300+
!> @brief Fills ghost cells by copying the nearest boundary cell value along the specified direction.
299301
subroutine s_ghost_cell_extrapolation(q_prim_vf, bc_dir, bc_loc, k, l)
300302
$:GPU_ROUTINE(function_name='s_ghost_cell_extrapolation', &
301303
& parallelism='[seq]', cray_inline=True)
@@ -357,6 +359,7 @@ contains
357359

358360
end subroutine s_ghost_cell_extrapolation
359361

362+
!> @brief Applies reflective (symmetry) boundary conditions by mirroring primitive variables and flipping the normal velocity component.
360363
subroutine s_symmetry(q_prim_vf, bc_dir, bc_loc, k, l, pb_in, mv_in)
361364
$:GPU_ROUTINE(parallelism='[seq]')
362365
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
@@ -617,6 +620,7 @@ contains
617620

618621
end subroutine s_symmetry
619622

623+
!> @brief Applies periodic boundary conditions by copying values from the opposite domain boundary.
620624
subroutine s_periodic(q_prim_vf, bc_dir, bc_loc, k, l, pb_in, mv_in)
621625
$:GPU_ROUTINE(parallelism='[seq]')
622626
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
@@ -756,6 +760,7 @@ contains
756760

757761
end subroutine s_periodic
758762

763+
!> @brief Applies axis boundary conditions for cylindrical coordinates by reflecting values across the axis with azimuthal phase shift.
759764
subroutine s_axis(q_prim_vf, pb_in, mv_in, k, l)
760765
$:GPU_ROUTINE(parallelism='[seq]')
761766
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
@@ -815,6 +820,7 @@ contains
815820

816821
end subroutine s_axis
817822

823+
!> @brief Applies slip wall boundary conditions by extrapolating scalars and reflecting the wall-normal velocity component.
818824
subroutine s_slip_wall(q_prim_vf, bc_dir, bc_loc, k, l)
819825
$:GPU_ROUTINE(function_name='s_slip_wall',parallelism='[seq]', &
820826
& cray_inline=True)
@@ -906,6 +912,7 @@ contains
906912

907913
end subroutine s_slip_wall
908914

915+
!> @brief Applies no-slip wall boundary conditions by reflecting and negating all velocity components at the wall.
909916
subroutine s_no_slip_wall(q_prim_vf, bc_dir, bc_loc, k, l)
910917
$:GPU_ROUTINE(function_name='s_no_slip_wall',parallelism='[seq]', &
911918
& cray_inline=True)
@@ -1034,6 +1041,7 @@ contains
10341041

10351042
end subroutine s_no_slip_wall
10361043

1044+
!> @brief Applies Dirichlet boundary conditions by prescribing ghost cell values from stored boundary buffers.
10371045
subroutine s_dirichlet(q_prim_vf, bc_dir, bc_loc, k, l)
10381046
$:GPU_ROUTINE(function_name='s_dirichlet',parallelism='[seq]', &
10391047
& cray_inline=True)
@@ -1103,6 +1111,7 @@ contains
11031111

11041112
end subroutine s_dirichlet
11051113

1114+
!> @brief Extrapolates QBMM bubble pressure and mass-vapor variables into ghost cells by copying boundary values.
11061115
subroutine s_qbmm_extrapolation(bc_dir, bc_loc, k, l, pb_in, mv_in)
11071116
$:GPU_ROUTINE(parallelism='[seq]')
11081117
real(stp), optional, dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:, 1:), intent(inout) :: pb_in, mv_in
@@ -1175,6 +1184,7 @@ contains
11751184

11761185
end subroutine s_qbmm_extrapolation
11771186

1187+
!> @brief Populates ghost cell buffers for the color function and its divergence used in capillary surface tension.
11781188
impure subroutine s_populate_capillary_buffers(c_divs, bc_type)
11791189

11801190
type(scalar_field), dimension(num_dims + 1), intent(inout) :: c_divs
@@ -1310,6 +1320,7 @@ contains
13101320
#:endif
13111321
end subroutine s_populate_capillary_buffers
13121322

1323+
!> @brief Applies periodic boundary conditions to the color function and its divergence fields.
13131324
subroutine s_color_function_periodic(c_divs, bc_dir, bc_loc, k, l)
13141325
$:GPU_ROUTINE(function_name='s_color_function_periodic', &
13151326
& parallelism='[seq]', cray_inline=True)
@@ -1365,6 +1376,7 @@ contains
13651376

13661377
end subroutine s_color_function_periodic
13671378

1379+
!> @brief Applies reflective boundary conditions to the color function and its divergence fields.
13681380
subroutine s_color_function_reflective(c_divs, bc_dir, bc_loc, k, l)
13691381
$:GPU_ROUTINE(function_name='s_color_function_reflective', &
13701382
& parallelism='[seq]', cray_inline=True)
@@ -1444,6 +1456,7 @@ contains
14441456

14451457
end subroutine s_color_function_reflective
14461458

1459+
!> @brief Extrapolates the color function and its divergence into ghost cells by copying boundary values.
14471460
subroutine s_color_function_ghost_cell_extrapolation(c_divs, bc_dir, bc_loc, k, l)
14481461
$:GPU_ROUTINE(function_name='s_color_function_ghost_cell_extrapolation', &
14491462
& parallelism='[seq]', cray_inline=True)
@@ -1499,6 +1512,7 @@ contains
14991512

15001513
end subroutine s_color_function_ghost_cell_extrapolation
15011514

1515+
!> @brief Populates ghost cell buffers for the Jacobian scalar field used in the IGR elliptic solver.
15021516
impure subroutine s_populate_F_igr_buffers(bc_type, jac_sf)
15031517

15041518
type(integer_field), dimension(1:num_dims, 1:2), intent(in) :: bc_type
@@ -1670,6 +1684,7 @@ contains
16701684
#:endif
16711685
end subroutine s_populate_F_igr_buffers
16721686

1687+
!> @brief Creates MPI derived datatypes for boundary condition type arrays and buffer arrays used in parallel I/O.
16731688
impure subroutine s_create_mpi_types(bc_type)
16741689

16751690
type(integer_field), dimension(1:num_dims, 1:2), intent(in) :: bc_type
@@ -1703,6 +1718,7 @@ contains
17031718
#endif
17041719
end subroutine s_create_mpi_types
17051720

1721+
!> @brief Writes boundary condition type and buffer data to serial (unformatted) restart files.
17061722
subroutine s_write_serial_boundary_condition_files(q_prim_vf, bc_type, step_dirpath, old_grid_in)
17071723

17081724
type(scalar_field), dimension(sys_size), intent(in) :: q_prim_vf
@@ -1744,6 +1760,7 @@ contains
17441760

17451761
end subroutine s_write_serial_boundary_condition_files
17461762

1763+
!> @brief Writes boundary condition type and buffer data to per-rank parallel files using MPI I/O.
17471764
subroutine s_write_parallel_boundary_condition_files(q_prim_vf, bc_type)
17481765

17491766
type(scalar_field), dimension(sys_size), intent(in) :: q_prim_vf
@@ -1810,6 +1827,7 @@ contains
18101827

18111828
end subroutine s_write_parallel_boundary_condition_files
18121829

1830+
!> @brief Reads boundary condition type and buffer data from serial (unformatted) restart files.
18131831
subroutine s_read_serial_boundary_condition_files(step_dirpath, bc_type)
18141832

18151833
character(LEN=*), intent(in) :: step_dirpath
@@ -1856,6 +1874,7 @@ contains
18561874

18571875
end subroutine s_read_serial_boundary_condition_files
18581876

1877+
!> @brief Reads boundary condition type and buffer data from per-rank parallel files using MPI I/O.
18591878
subroutine s_read_parallel_boundary_condition_files(bc_type)
18601879

18611880
type(integer_field), dimension(1:num_dims, 1:2), intent(inout) :: bc_type
@@ -1922,6 +1941,7 @@ contains
19221941

19231942
end subroutine s_read_parallel_boundary_condition_files
19241943

1944+
!> @brief Packs primitive variable boundary slices into bc_buffers arrays for serialization.
19251945
subroutine s_pack_boundary_condition_buffers(q_prim_vf)
19261946

19271947
type(scalar_field), dimension(sys_size), intent(in) :: q_prim_vf
@@ -1968,6 +1988,7 @@ contains
19681988

19691989
end subroutine s_pack_boundary_condition_buffers
19701990

1991+
!> @brief Initializes the per-cell boundary condition type arrays with the global default BC values.
19711992
subroutine s_assign_default_bc_type(bc_type)
19721993

19731994
type(integer_field), dimension(1:num_dims, 1:2), intent(in) :: bc_type
@@ -2183,6 +2204,7 @@ contains
21832204

21842205
end subroutine s_populate_grid_variables_buffers
21852206

2207+
!> @brief Deallocates boundary condition buffer arrays allocated during module initialization.
21862208
subroutine s_finalize_boundary_common_module()
21872209

21882210
if (bc_io) then

src/common/m_checker_common.fpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ contains
3838

3939
#ifndef MFC_SIMULATION
4040

41+
!> @brief Verifies that the total number of grid cells meets the minimum required by the number of dimensions and MPI ranks.
4142
impure subroutine s_check_total_cells
4243
character(len=18) :: numStr !< for int to string conversion
4344
integer(kind=8) :: min_cells
@@ -52,6 +53,7 @@ contains
5253

5354
#endif
5455

56+
!> @brief Checks that simulation parameters stay within AMD GPU compiler limits when case optimization is disabled.
5557
impure subroutine s_check_amd
5658

5759
#:if not MFC_CASE_OPTIMIZATION

src/common/m_chemistry.fpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ module m_chemistry
3434

3535
contains
3636

37+
!> @brief Computes mixture viscosities for left and right states and inverts them for use as reciprocal Reynolds numbers.
3738
subroutine compute_viscosity_and_inversion(T_L, Ys_L, T_R, Ys_R, Re_L, Re_R)
3839

3940
$:GPU_ROUTINE(function_name='compute_viscosity_and_inversion',parallelism='[seq]', &
@@ -49,6 +50,7 @@ contains
4950

5051
end subroutine compute_viscosity_and_inversion
5152

53+
!> @brief Initializes the temperature field from conservative variables by inverting the energy equation.
5254
subroutine s_compute_q_T_sf(q_T_sf, q_cons_vf, bounds)
5355

5456
! Initialize the temperature field at the start of the simulation to
@@ -91,6 +93,7 @@ contains
9193

9294
end subroutine s_compute_q_T_sf
9395

96+
!> @brief Computes the temperature field from primitive variables using the ideal gas law and mixture molecular weight.
9497
subroutine s_compute_T_from_primitives(q_T_sf, q_prim_vf, bounds)
9598

9699
type(scalar_field), intent(inout) :: q_T_sf
@@ -116,6 +119,7 @@ contains
116119

117120
end subroutine s_compute_T_from_primitives
118121

122+
!> @brief Adds chemical reaction source terms to the species transport RHS using net production rates.
119123
subroutine s_compute_chemistry_reaction_flux(rhs_vf, q_cons_qp, q_T_sf, q_prim_qp, bounds)
120124

121125
type(scalar_field), dimension(sys_size), intent(inout) :: rhs_vf
@@ -168,6 +172,7 @@ contains
168172

169173
end subroutine s_compute_chemistry_reaction_flux
170174

175+
!> @brief Computes species mass diffusion fluxes at cell interfaces using mixture-averaged diffusivities.
171176
subroutine s_compute_chemistry_diffusion_flux(idir, q_prim_qp, flux_src_vf, irx, iry, irz)
172177

173178
type(scalar_field), dimension(sys_size), intent(in) :: q_prim_qp

src/common/m_compile_specific.f90

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ impure subroutine s_create_directory(dir_name)
2525

2626
end subroutine s_create_directory
2727

28+
!> @brief Deletes a file at the given path using a platform-specific system command.
2829
impure subroutine s_delete_file(filepath)
2930
character(LEN=*), intent(in) :: filepath
3031

@@ -36,6 +37,7 @@ impure subroutine s_delete_file(filepath)
3637

3738
end subroutine s_delete_file
3839

40+
!> @brief Recursively deletes a directory using a platform-specific system command.
3941
impure subroutine s_delete_directory(dir_name)
4042
character(LEN=*), intent(in) :: dir_name
4143

@@ -62,12 +64,14 @@ impure subroutine my_inquire(fileloc, dircheck)
6264

6365
end subroutine my_inquire
6466

67+
!> @brief Retrieves the current working directory path via the GETCWD intrinsic.
6568
impure subroutine s_get_cwd(cwd)
6669
character(LEN=*), intent(out) :: cwd
6770

6871
call GETCWD(cwd)
6972
end subroutine s_get_cwd
7073

74+
!> @brief Extracts the base filename from a directory path using the system basename command.
7175
impure subroutine s_get_basename(dirpath, basename)
7276
character(LEN=*), intent(in) :: dirpath
7377
character(LEN=*), intent(out) :: basename

src/common/m_delay_file_access.f90

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ module m_delay_file_access
1616

1717
contains
1818

19+
!> @brief Introduces a rank-dependent busy-wait delay to stagger parallel file access and reduce I/O contention.
1920
impure subroutine DelayFileAccess(ProcessRank)
2021
integer, intent(in) :: ProcessRank
2122

src/common/m_helper.fpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ contains
6565

6666
end subroutine s_comp_n_from_prim
6767

68+
!> @brief Computes the bubble number density from the conservative void fraction and weighted bubble radii.
6869
subroutine s_comp_n_from_cons(vftmp, nRtmp, ntmp, weights)
6970
$:GPU_ROUTINE(parallelism='[seq]')
7071
real(wp), intent(in) :: vftmp
@@ -79,6 +80,7 @@ contains
7980

8081
end subroutine s_comp_n_from_cons
8182

83+
!> @brief Prints a 2D real array to standard output, optionally dividing each element by a given scalar.
8284
impure subroutine s_print_2D_array(A, div)
8385

8486
real(wp), dimension(:, :), intent(in) :: A
@@ -274,6 +276,7 @@ contains
274276

275277
end subroutine s_transcoeff
276278

279+
!> @brief Converts an integer to its trimmed string representation.
277280
elemental subroutine s_int_to_str(i, res)
278281

279282
integer, intent(in) :: i
@@ -664,6 +667,7 @@ contains
664667
665668
end function f_gx
666669
670+
!> @brief Downsamples conservative variable fields by a factor of 3 in each direction using volume averaging.
667671
subroutine s_downsample_data(q_cons_vf, q_cons_temp, m_ds, n_ds, p_ds, m_glb_ds, n_glb_ds, p_glb_ds)
668672
669673
type(scalar_field), dimension(sys_size), intent(inout) :: q_cons_vf, q_cons_temp
@@ -705,6 +709,7 @@ contains
705709
706710
end subroutine s_downsample_data
707711
712+
!> @brief Upsamples conservative variable fields from a coarsened grid back to the original resolution using interpolation.
708713
subroutine s_upsample_data(q_cons_vf, q_cons_temp)
709714
710715
type(scalar_field), intent(inout), dimension(sys_size) :: q_cons_vf, q_cons_temp

src/common/m_model.fpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ contains
462462

463463
end function f_read_line
464464

465+
!> @brief Reads the next non-comment line from a model file, using a buffered look-ahead mechanism.
465466
impure subroutine s_skip_ignored_lines(iunit, buffered_line, is_buffered)
466467
integer, intent(in) :: iunit
467468
character(80), intent(inout) :: buffered_line

0 commit comments

Comments
 (0)