Skip to content

Commit ae59e8d

Browse files
committed
chore(burgers): tidy up
This commit better documents the main program of example/burgers-1D.F90 and removes commented code.
1 parent 365a7f8 commit ae59e8d

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

‎example/burgers-1D.F90‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ pure function initial_condition(x)
1818
end module
1919

2020
program burgers_1D
21-
!! Advance the 1D Burgers partial differential equation over time.
21+
!! This program demonstrates the use of Formal to solve the partial differential equation of
22+
!! Burgers (1948) in conservative form using the 2nd- or 4th-order mimetic discretizations of
23+
!! Corbino & Castillo (2020) and Dumett & Castillo (2022).
24+
!!
25+
!! * Burgers, J.M. (1948) https://doi.org/10.1016/S0065-2156(08)70100-5
26+
!! * Corbino & Castillo (2020) https://doi.org/10.1016/j.cam.2019.06.042.
27+
!! * Dumett & Castillo (2022) https://doi.org/10.13140/RG.2.2.26630.14400
2228
use initial_condition_m, only : initial_condition
2329
use julienne_m, only : command_line_t
2430
use formal_m, only : scalar_1D_t, scalar_1D_initializer_i, d_dx, d2_dx2
@@ -67,14 +73,11 @@ program burgers_1D
6773

6874
scalar_1D_initializer => initial_condition
6975
u = scalar_1D_t(scalar_1D_initializer, order, x_min=0D0, x_max=2*pi, cells=20)
70-
!dt = u%runge_kutta_2nd_step(nu ,grid_resolution)
71-
72-
!do while (t<=t_final) ! 2nd-order Runge-Kutta:
73-
associate(u_half => u + d_dt(u)*dt/2) ! first substep
74-
u = u + d_dt(u_half)*dt ! second substep
75-
end associate
76-
!t = t + dt
77-
!end do
76+
77+
runge_kutta_2nd_order: &
78+
associate(u_half => u + d_dt(u)*dt/2) ! first substep
79+
u = u + d_dt(u_half)*dt ! second substep
80+
end associate runge_kutta_2nd_order
7881

7982
end block
8083

0 commit comments

Comments
 (0)