Skip to content

Commit c595911

Browse files
sbryngelsonclaude
andcommitted
Fix misleading docstrings, typos, and add timing comments
- Remove copy-paste WENO/QP docstrings from acoustic source params - Add "why" comments on mytime placement and sim_time = mytime - Fix typos: "hane" -> "hand", "Temrs" -> "Terms", "pphysics" -> "physics", "sequel" -> "sequential" - Fix missing @ on Doxygen @param in m_body_forces.fpp Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 34b3744 commit c595911

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

src/simulation/m_acoustic_src.fpp

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,8 @@ contains
129129
!! @param rhs_vf rhs variables
130130
impure subroutine s_acoustic_src_calculations(q_cons_vf, q_prim_vf, rhs_vf)
131131

132-
type(scalar_field), dimension(sys_size), intent(inout) :: q_cons_vf !<
133-
!! This variable contains the WENO-reconstructed values of the cell-average
134-
!! conservative variables, which are located in q_cons_vf, at cell-interior
135-
!! Gaussian quadrature points (QP).
136-
137-
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf !<
138-
!! The primitive variables at cell-interior Gaussian quadrature points. These
139-
!! are calculated from the conservative variables and gradient magnitude (GM)
140-
!! of the volume fractions, q_cons_qp and gm_alpha_qp, respectively.
132+
type(scalar_field), dimension(sys_size), intent(inout) :: q_cons_vf !< Conservative variables
133+
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf !< Primitive variables
141134

142135
type(scalar_field), dimension(sys_size), intent(inout) :: rhs_vf
143136

@@ -165,7 +158,7 @@ contains
165158

166159
integer, parameter :: mass_label = 1, mom_label = 2
167160

168-
sim_time = mytime
161+
sim_time = mytime ! Accumulated time, correct under adaptive dt
169162

170163
$:GPU_PARALLEL_LOOP(private='[j,k,l]', collapse=3)
171164
do l = 0, p
@@ -181,7 +174,7 @@ contains
181174
end do
182175
$:END_GPU_PARALLEL_LOOP()
183176

184-
! Keep outer loop sequel because different sources can have very different number of points
177+
! Keep outer loop sequential because different sources can have very different number of points
185178
do ai = 1, num_source
186179
! Skip if the pulse has not started yet for sine and square waves
187180
if (.not. (sim_time < delay(ai) .and. (pulse(ai) == 1 .or. pulse(ai) == 3))) then

src/simulation/m_body_forces.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ contains
7272

7373
!> This subroutine calculates the mixture density at each cell
7474
!! center
75-
!! param q_cons_vf Conservative variable
75+
!! @param q_cons_vf Conservative variables
7676
subroutine s_compute_mixture_density(q_cons_vf)
7777

7878
type(scalar_field), dimension(sys_size), intent(in) :: q_cons_vf

src/simulation/m_rhs.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ contains
10101010
$:END_GPU_PARALLEL_LOOP()
10111011
end if
10121012
1013-
! Additional Physics and Source Temrs
1013+
! Additional Physics and Source Terms
10141014
! Additions for acoustic_source
10151015
if (acoustic_source) then
10161016
call nvtxStartRange("RHS-ACOUSTIC-SRC")
@@ -1057,7 +1057,7 @@ contains
10571057
10581058
if (cont_damage) call s_compute_damage_state(q_cons_qp%vf, rhs_vf)
10591059
1060-
! END: Additional pphysics and source terms
1060+
! END: Additional physics and source terms
10611061
10621062
if (run_time_info .or. probe_wrt .or. ib .or. bubbles_lagrange) then
10631063
if (.not. igr .or. dummy) then

src/simulation/m_start_up.fpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module m_start_up
3232

3333
use m_acoustic_src !< Acoustic source calculations
3434

35-
use m_rhs !< Right-hane-side (RHS) evaluation procedures
35+
use m_rhs !< Right-hand-side (RHS) evaluation procedures
3636

3737
use m_chemistry !< Chemistry module
3838

@@ -850,6 +850,7 @@ contains
850850
call s_tvd_rk(t_step, time_avg, time_stepper)
851851
end if
852852

853+
! Advance time after RK so source terms see current-step time
853854
mytime = mytime + dt
854855

855856
if (relax) call s_infinite_relaxation_k(q_cons_ts(1)%vf)

0 commit comments

Comments
 (0)