Skip to content

Commit 17b6fdd

Browse files
committed
Standardize Doxygen: remove obvious @param, clean verbose headers, consistent style
1 parent 81e4e98 commit 17b6fdd

67 files changed

Lines changed: 488 additions & 1542 deletions

Some content is hidden

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

src/common/include/1dHardcodedIC.fpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@
1313
! magnetic field
1414
q_prim_vf(B_idx%end - 1)%sf(i, 0, 0) = 0.1_wp*sin(2._wp*pi*x_cc(i))
1515
q_prim_vf(B_idx%end)%sf(i, 0, 0) = 0.1_wp*cos(2._wp*pi*x_cc(i))
16-
case (170)
16+
case (170) ! 1D profile from external data (e.g. Cantera, SDtoolbox)
1717
! This hardcoded case can be used to start a simulation with initial conditions given from a known 1D profile (e.g. Cantera,
1818
! SDtoolbox)
1919
@: HardcodedReadValues()
20-
case (180)
20+
case (180) ! Shu-Osher problem
2121
! This is patch is hard-coded for test suite optimization used in the 1D_shuoser cases: "patch_icpp(2)%alpha_rho(1)": "1 +
2222
! 0.2*sin(5*x)"
2323
if (patch_id == 2) then
2424
q_prim_vf(contxb + 0)%sf(i, 0, 0) = 1 + 0.2*sin(5*x_cc(i))
2525
end if
26-
case (181)
26+
case (181) ! Titarev-Torro problem
2727
! This is patch is hard-coded for test suite optimization used in the 1D_titarevtorro cases: "patch_icpp(2)%alpha_rho(1)":
2828
! "1 + 0.1*sin(20*x*pi)"
2929
q_prim_vf(contxb + 0)%sf(i, 0, 0) = 1 + 0.1*sin(20*x_cc(i)*pi)
30-
case (182)
30+
case (182) ! Multi-component diffusion
3131
! This patch is a hard-coded for test suite optimization (multiple component diffusion)
3232
x_mid_diffu = 0.05_wp/2.0_wp
3333
width_sq = (2.5_wp*10.0_wp**(-3.0_wp))**2

src/common/include/2dHardcodedIC.fpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#:def Hardcoded2D()
2020
select case (patch_icpp(patch_id)%hcid) ! 2D_hardcoded_ic example case
21-
case (200)
21+
case (200) ! Two-fluid cubic interface
2222
if (y_cc(j) <= (-x_cc(i)**3 + 1)**(1._wp/3._wp)) then
2323
! Volume Fractions
2424
q_prim_vf(advxb)%sf(i, j, 0) = eps
@@ -263,10 +263,10 @@
263263
q_prim_vf(B_idx%beg + 1)%sf(i, j, 0) = (5._wp/sqrt(4._wp*pi))*sinA + (5._wp/sqrt(4._wp*pi))*cosA
264264
end if
265265
! v^z and B^z remain zero by default
266-
case (270)
266+
case (270) ! 2D extrusion of 1D profile from external data
267267
! This hardcoded case extrudes a 1D profile to initialize a 2D simulation domain
268268
@: HardcodedReadValues()
269-
case (280)
269+
case (280) ! Isentropic vortex
270270
! This is patch is hard-coded for test suite optimization used in the 2D_isentropicvortex case: This analytic patch uses
271271
! geometry 2
272272
if (patch_id == 1) then
@@ -283,7 +283,7 @@
283283
& 0) = 0.0 - (x_cc(i) - patch_icpp(1)%x_centroid)*(5.0/(2.0*pi))*exp(1.0*(1.0 - (x_cc(i) - patch_icpp(1) &
284284
& %x_centroid)**2.0 - (y_cc(j) - patch_icpp(1)%y_centroid)**2.0))
285285
end if
286-
case (281)
286+
case (281) ! Acoustic pulse
287287
! This is patch is hard-coded for test suite optimization used in the 2D_acoustic_pulse case: This analytic patch uses
288288
! geometry 2
289289
if (patch_id == 2) then
@@ -292,7 +292,7 @@
292292
q_prim_vf(contxb + 0)%sf(i, j, &
293293
& 0) = 1*(1 - 0.5*(1.4 - 1)*(0.4)**2*exp(0.5*(1 - sqrt(x_cc(i)**2 + y_cc(j)**2))))**(1/(1.4 - 1))
294294
end if
295-
case (282)
295+
case (282) ! Zero-circulation vortex
296296
! This is patch is hard-coded for test suite optimization used in the 2D_zero_circ_vortex case: This analytic patch uses
297297
! geometry 2
298298
if (patch_id == 2) then

src/common/include/3dHardcodedIC.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@
165165
end if
166166

167167
q_prim_vf(E_idx)%sf(i, j, k) = p_th*rcut*xcut + p_am
168-
case (370)
168+
case (370) ! 3D extrusion of 2D profile from external data
169169
! This hardcoded case extrudes a 2D profile to initialize a 3D simulation domain
170170
@: HardcodedReadValues()
171-
case (380)
171+
case (380) ! Taylor-Green vortex
172172
! This is patch is hard-coded for test suite optimization used in the 3D_TaylorGreenVortex case: This analytic patch used
173173
! geometry 9
174174
Mach = 0.1

src/common/include/ExtrusionHardcodedIC.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
!> @brief Allocate memory and read initial condition data for IC extrusion.
1+
!> Allocate memory and read initial condition data for IC extrusion.
22
!>
33
!> @details
44
!> This macro handles the complete initialization process for IC extrusion by:

src/common/include/macros.fpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
! Caution: This macro requires the use of a binding script to set CUDA_VISIBLE_DEVICES, such that we have one GPU device per MPI
1616
! rank. That's because for both cudaMemAdvise (preferred location) and cudaMemPrefetchAsync we use location = device_id = 0. For an
17-
! example see misc/nvidia_uvm/bind.sh.
17+
! example see misc/nvidia_uvm/bind.sh. NVIDIA unified memory page placement hint
1818
#:def PREFER_GPU(*args)
1919
#ifdef MFC_SIMULATION
2020
#ifdef __NVCOMPILER_GPU_UNIFIED_MEM
@@ -55,6 +55,7 @@
5555
#endif
5656
#:enddef
5757
58+
! Allocate and create GPU device memory
5859
#:def ALLOCATE(*args)
5960
@:LOG({'@:ALLOCATE(${re.sub(' +', ' ', ', '.join(args))}$)'})
6061
#:set allocated_variables = ', '.join(args)
@@ -74,13 +75,15 @@
7475
$:GPU_ENTER_DATA(create='[' + joined + ']')
7576
#:enddef ALLOCATE
7677
78+
! Free GPU device memory and deallocate
7779
#:def DEALLOCATE(*args)
7880
@:LOG({'@:DEALLOCATE(${re.sub(' +', ' ', ', '.join(args))}$)'})
7981
#:set allocated_variables = ', '.join(args)
8082
$:GPU_EXIT_DATA(delete=('[' + allocated_variables + ']'))
8183
deallocate (${allocated_variables}$)
8284
#:enddef DEALLOCATE
8385
86+
! Cray-specific GPU pointer setup for vector fields
8487
#:def ACC_SETUP_VFs(*args)
8588
#ifdef _CRAYFTN
8689
block
@@ -104,6 +107,7 @@
104107
#endif
105108
#:enddef
106109
110+
! Cray-specific GPU pointer setup for scalar fields
107111
#:def ACC_SETUP_SFs(*args)
108112
#ifdef _CRAYFTN
109113
block
@@ -119,6 +123,7 @@
119123
#endif
120124
#:enddef
121125
126+
! Cray-specific GPU pointer setup for acoustic source spatials
122127
#:def ACC_SETUP_source_spatials(*args)
123128
#ifdef _CRAYFTN
124129
block

src/common/m_boundary_common.fpp

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ module m_boundary_common
3939

4040
contains
4141

42-
!> @brief Allocates and sets up boundary condition buffer arrays for all coordinate directions.
42+
!> Allocate and set up boundary condition buffer arrays for all coordinate directions.
4343
impure subroutine s_initialize_boundary_common_module()
4444

4545
integer :: i, j
@@ -70,8 +70,7 @@ contains
7070

7171
end subroutine s_initialize_boundary_common_module
7272

73-
!> The purpose of this procedure is to populate the buffers of the primitive variables, depending on the selected boundary
74-
!! conditions.
73+
!> Populate the buffers of the primitive variables based on the selected boundary conditions.
7574
impure subroutine s_populate_variables_buffers(bc_type, q_prim_vf, pb_in, mv_in)
7675

7776
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
@@ -272,7 +271,7 @@ contains
272271

273272
end subroutine s_populate_variables_buffers
274273

275-
!> @brief Fills ghost cells by copying the nearest boundary cell value along the specified direction.
274+
!> Fill ghost cells by copying the nearest boundary cell value along the specified direction.
276275
subroutine s_ghost_cell_extrapolation(q_prim_vf, bc_dir, bc_loc, k, l)
277276

278277
$:GPU_ROUTINE(function_name='s_ghost_cell_extrapolation', parallelism='[seq]', cray_inline=True)
@@ -327,8 +326,7 @@ contains
327326

328327
end subroutine s_ghost_cell_extrapolation
329328

330-
!> @brief Applies reflective (symmetry) boundary conditions by mirroring primitive variables and flipping the normal velocity
331-
!! component.
329+
!> Apply reflective (symmetry) boundary conditions by mirroring primitive variables and flipping the normal velocity component.
332330
subroutine s_symmetry(q_prim_vf, bc_dir, bc_loc, k, l, pb_in, mv_in)
333331

334332
$:GPU_ROUTINE(parallelism='[seq]')
@@ -551,7 +549,7 @@ contains
551549

552550
end subroutine s_symmetry
553551

554-
!> @brief Applies periodic boundary conditions by copying values from the opposite domain boundary.
552+
!> Apply periodic boundary conditions by copying values from the opposite domain boundary.
555553
subroutine s_periodic(q_prim_vf, bc_dir, bc_loc, k, l, pb_in, mv_in)
556554

557555
$:GPU_ROUTINE(parallelism='[seq]')
@@ -673,8 +671,7 @@ contains
673671

674672
end subroutine s_periodic
675673

676-
!> @brief Applies axis boundary conditions for cylindrical coordinates by reflecting values across the axis with azimuthal phase
677-
!! shift.
674+
!> Apply axis boundary conditions for cylindrical coordinates by reflecting values across the axis with azimuthal phase shift.
678675
subroutine s_axis(q_prim_vf, pb_in, mv_in, k, l)
679676

680677
$:GPU_ROUTINE(parallelism='[seq]')
@@ -724,7 +721,7 @@ contains
724721

725722
end subroutine s_axis
726723

727-
!> @brief Applies slip wall boundary conditions by extrapolating scalars and reflecting the wall-normal velocity component.
724+
!> Apply slip wall boundary conditions by extrapolating scalars and reflecting the wall-normal velocity component.
728725
subroutine s_slip_wall(q_prim_vf, bc_dir, bc_loc, k, l)
729726

730727
$:GPU_ROUTINE(function_name='s_slip_wall',parallelism='[seq]', cray_inline=True)
@@ -803,7 +800,7 @@ contains
803800

804801
end subroutine s_slip_wall
805802

806-
!> @brief Applies no-slip wall boundary conditions by reflecting and negating all velocity components at the wall.
803+
!> Apply no-slip wall boundary conditions by reflecting and negating all velocity components at the wall.
807804
subroutine s_no_slip_wall(q_prim_vf, bc_dir, bc_loc, k, l)
808805

809806
$:GPU_ROUTINE(function_name='s_no_slip_wall',parallelism='[seq]', cray_inline=True)
@@ -907,7 +904,7 @@ contains
907904

908905
end subroutine s_no_slip_wall
909906

910-
!> @brief Applies Dirichlet boundary conditions by prescribing ghost cell values from stored boundary buffers.
907+
!> Apply Dirichlet boundary conditions by prescribing ghost cell values from stored boundary buffers.
911908
subroutine s_dirichlet(q_prim_vf, bc_dir, bc_loc, k, l)
912909

913910
$:GPU_ROUTINE(function_name='s_dirichlet',parallelism='[seq]', cray_inline=True)
@@ -970,7 +967,7 @@ contains
970967

971968
end subroutine s_dirichlet
972969

973-
!> @brief Extrapolates QBMM bubble pressure and mass-vapor variables into ghost cells by copying boundary values.
970+
!> Extrapolate QBMM bubble pressure and mass-vapor variables into ghost cells by copying boundary values.
974971
subroutine s_qbmm_extrapolation(bc_dir, bc_loc, k, l, pb_in, mv_in)
975972

976973
$:GPU_ROUTINE(parallelism='[seq]')
@@ -1043,7 +1040,7 @@ contains
10431040

10441041
end subroutine s_qbmm_extrapolation
10451042

1046-
!> @brief Populates ghost cell buffers for the color function and its divergence used in capillary surface tension.
1043+
!> Populate ghost cell buffers for the color function and its divergence used in capillary surface tension.
10471044
impure subroutine s_populate_capillary_buffers(c_divs, bc_type)
10481045

10491046
type(scalar_field), dimension(num_dims + 1), intent(inout) :: c_divs
@@ -1178,7 +1175,7 @@ contains
11781175

11791176
end subroutine s_populate_capillary_buffers
11801177

1181-
!> @brief Applies periodic boundary conditions to the color function and its divergence fields.
1178+
!> Apply periodic boundary conditions to the color function and its divergence fields.
11821179
subroutine s_color_function_periodic(c_divs, bc_dir, bc_loc, k, l)
11831180

11841181
$:GPU_ROUTINE(function_name='s_color_function_periodic', parallelism='[seq]', cray_inline=True)
@@ -1233,7 +1230,7 @@ contains
12331230

12341231
end subroutine s_color_function_periodic
12351232

1236-
!> @brief Applies reflective boundary conditions to the color function and its divergence fields.
1233+
!> Apply reflective boundary conditions to the color function and its divergence fields.
12371234
subroutine s_color_function_reflective(c_divs, bc_dir, bc_loc, k, l)
12381235

12391236
$:GPU_ROUTINE(function_name='s_color_function_reflective', parallelism='[seq]', cray_inline=True)
@@ -1312,7 +1309,7 @@ contains
13121309

13131310
end subroutine s_color_function_reflective
13141311

1315-
!> @brief Extrapolates the color function and its divergence into ghost cells by copying boundary values.
1312+
!> Extrapolate the color function and its divergence into ghost cells by copying boundary values.
13161313
subroutine s_color_function_ghost_cell_extrapolation(c_divs, bc_dir, bc_loc, k, l)
13171314

13181315
$:GPU_ROUTINE(function_name='s_color_function_ghost_cell_extrapolation', parallelism='[seq]', cray_inline=True)
@@ -1367,7 +1364,7 @@ contains
13671364

13681365
end subroutine s_color_function_ghost_cell_extrapolation
13691366

1370-
!> @brief Populates ghost cell buffers for the Jacobian scalar field used in the IGR elliptic solver.
1367+
!> Populate ghost cell buffers for the Jacobian scalar field used in the IGR elliptic solver.
13711368
impure subroutine s_populate_F_igr_buffers(bc_type, jac_sf)
13721369

13731370
type(integer_field), dimension(1:num_dims, 1:2), intent(in) :: bc_type
@@ -1534,7 +1531,7 @@ contains
15341531

15351532
end subroutine s_populate_F_igr_buffers
15361533

1537-
!> @brief Creates MPI derived datatypes for boundary condition type arrays and buffer arrays used in parallel I/O.
1534+
!> Create MPI derived datatypes for boundary condition type arrays and buffer arrays used in parallel I/O.
15381535
impure subroutine s_create_mpi_types(bc_type)
15391536

15401537
type(integer_field), dimension(1:num_dims, 1:2), intent(in) :: bc_type
@@ -1569,7 +1566,7 @@ contains
15691566

15701567
end subroutine s_create_mpi_types
15711568

1572-
!> @brief Writes boundary condition type and buffer data to serial (unformatted) restart files.
1569+
!> Write boundary condition type and buffer data to serial (unformatted) restart files.
15731570
subroutine s_write_serial_boundary_condition_files(q_prim_vf, bc_type, step_dirpath, old_grid_in)
15741571

15751572
type(scalar_field), dimension(sys_size), intent(in) :: q_prim_vf
@@ -1608,7 +1605,7 @@ contains
16081605

16091606
end subroutine s_write_serial_boundary_condition_files
16101607

1611-
!> @brief Writes boundary condition type and buffer data to per-rank parallel files using MPI I/O.
1608+
!> Write boundary condition type and buffer data to per-rank parallel files using MPI I/O.
16121609
subroutine s_write_parallel_boundary_condition_files(q_prim_vf, bc_type)
16131610

16141611
type(scalar_field), dimension(sys_size), intent(in) :: q_prim_vf
@@ -1673,7 +1670,7 @@ contains
16731670

16741671
end subroutine s_write_parallel_boundary_condition_files
16751672

1676-
!> @brief Reads boundary condition type and buffer data from serial (unformatted) restart files.
1673+
!> Read boundary condition type and buffer data from serial (unformatted) restart files.
16771674
subroutine s_read_serial_boundary_condition_files(step_dirpath, bc_type)
16781675

16791676
character(LEN=*), intent(in) :: step_dirpath
@@ -1718,7 +1715,7 @@ contains
17181715

17191716
end subroutine s_read_serial_boundary_condition_files
17201717

1721-
!> @brief Reads boundary condition type and buffer data from per-rank parallel files using MPI I/O.
1718+
!> Read boundary condition type and buffer data from per-rank parallel files using MPI I/O.
17221719
subroutine s_read_parallel_boundary_condition_files(bc_type)
17231720

17241721
type(integer_field), dimension(1:num_dims, 1:2), intent(inout) :: bc_type
@@ -1783,7 +1780,7 @@ contains
17831780

17841781
end subroutine s_read_parallel_boundary_condition_files
17851782

1786-
!> @brief Packs primitive variable boundary slices into bc_buffers arrays for serialization.
1783+
!> Pack primitive variable boundary slices into bc_buffers arrays for serialization.
17871784
subroutine s_pack_boundary_condition_buffers(q_prim_vf)
17881785

17891786
type(scalar_field), dimension(sys_size), intent(in) :: q_prim_vf
@@ -1826,7 +1823,7 @@ contains
18261823

18271824
end subroutine s_pack_boundary_condition_buffers
18281825

1829-
!> @brief Initializes the per-cell boundary condition type arrays with the global default BC values.
1826+
!> Initialize the per-cell boundary condition type arrays with the global default BC values.
18301827
subroutine s_assign_default_bc_type(bc_type)
18311828

18321829
type(integer_field), dimension(1:num_dims, 1:2), intent(in) :: bc_type
@@ -1852,8 +1849,8 @@ contains
18521849

18531850
end subroutine s_assign_default_bc_type
18541851

1855-
!> The purpose of this subroutine is to populate the buffers of the grid variables, which are constituted of the cell- boundary
1856-
!! locations and cell-width distributions, based on the boundary conditions.
1852+
!> Populate the buffers of the grid variables, which are constituted of the cell-boundary locations and cell-width
1853+
!! distributions, based on the boundary conditions.
18571854
subroutine s_populate_grid_variables_buffers
18581855

18591856
integer :: i
@@ -2037,7 +2034,7 @@ contains
20372034

20382035
end subroutine s_populate_grid_variables_buffers
20392036

2040-
!> @brief Deallocates boundary condition buffer arrays allocated during module initialization.
2037+
!> Deallocate boundary condition buffer arrays allocated during module initialization.
20412038
subroutine s_finalize_boundary_common_module()
20422039

20432040
if (bc_io) then

src/common/m_checker_common.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ contains
3232
end subroutine s_check_inputs_common
3333

3434
#ifndef MFC_SIMULATION
35-
!> @brief Verifies that the total number of grid cells meets the minimum required by the number of dimensions and MPI ranks.
35+
!> Verify that the total number of grid cells meets the minimum required by the number of dimensions and MPI ranks.
3636
impure subroutine s_check_total_cells
3737

3838
character(len=18) :: numStr !< for int to string conversion
@@ -48,7 +48,7 @@ contains
4848
end subroutine s_check_total_cells
4949
#endif
5050

51-
!> @brief Checks that simulation parameters stay within AMD GPU compiler limits when case optimization is disabled.
51+
!> Check that simulation parameters stay within AMD GPU compiler limits when case optimization is disabled.
5252
impure subroutine s_check_amd
5353

5454
#:if not MFC_CASE_OPTIMIZATION

0 commit comments

Comments
 (0)