Skip to content

Commit 3c5c5c2

Browse files
committed
Continuing to mark subroutines as pure or impure
1 parent 6c57dcf commit 3c5c5c2

38 files changed

+254
-254
lines changed

src/common/m_variables_conversion.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ contains
115115
!! @param pres Pressure to calculate
116116
!! @param stress Shear Stress
117117
!! @param mom Momentum
118-
pure subroutine s_compute_pressure(energy, alf, dyn_p, pi_inf, gamma, rho, qv, rhoYks, pres, T, stress, mom, G, pres_mag)
118+
subroutine s_compute_pressure(energy, alf, dyn_p, pi_inf, gamma, rho, qv, rhoYks, pres, T, stress, mom, G, pres_mag)
119119

120120
#ifdef _CRAYFTN
121121
!DIR$ INLINEALWAYS s_compute_pressure

src/post_process/m_checker.fpp

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

2424
!> Checks compatibility of parameters in the input file.
2525
!! Used by the post_process stage
26-
subroutine s_check_inputs
26+
impure subroutine s_check_inputs
2727

2828
call s_check_inputs_output_format
2929
call s_check_inputs_partial_domain

src/post_process/m_derived_variables.fpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ contains
142142
!! values of the liquid stiffness, which are stored in the
143143
!! derived flow quantity storage variable, q_sf.
144144
!! @param q_sf Liquid stiffness
145-
subroutine s_derive_liquid_stiffness(q_sf)
145+
pure subroutine s_derive_liquid_stiffness(q_sf)
146146

147147
real(wp), &
148148
dimension(-offset_x%beg:m + offset_x%end, &
@@ -171,7 +171,7 @@ contains
171171
!! derived flow quantity storage variable, q_sf.
172172
!! @param q_prim_vf Primitive variables
173173
!! @param q_sf Speed of sound
174-
subroutine s_derive_sound_speed(q_prim_vf, q_sf)
174+
pure subroutine s_derive_sound_speed(q_prim_vf, q_sf)
175175

176176
type(scalar_field), &
177177
dimension(sys_size), &
@@ -228,7 +228,7 @@ contains
228228
!! @param i Component indicator
229229
!! @param q_prim_vf Primitive variables
230230
!! @param q_sf Flux limiter
231-
subroutine s_derive_flux_limiter(i, q_prim_vf, q_sf)
231+
pure subroutine s_derive_flux_limiter(i, q_prim_vf, q_sf)
232232

233233
integer, intent(in) :: i
234234

@@ -375,7 +375,7 @@ contains
375375
!! @param i Vorticity component indicator
376376
!! @param q_prim_vf Primitive variables
377377
!! @param q_sf Vorticity component
378-
subroutine s_derive_vorticity_component(i, q_prim_vf, q_sf)
378+
pure subroutine s_derive_vorticity_component(i, q_prim_vf, q_sf)
379379

380380
integer, intent(in) :: i
381381

@@ -564,7 +564,7 @@ contains
564564
!! variable, q_sf.
565565
!! @param q_cons_vf Conservative variables
566566
!! @param q_sf Numerical Schlieren function
567-
subroutine s_derive_numerical_schlieren_function(q_cons_vf, q_sf)
567+
impure subroutine s_derive_numerical_schlieren_function(q_cons_vf, q_sf)
568568
569569
type(scalar_field), &
570570
dimension(sys_size), &
@@ -691,7 +691,7 @@ contains
691691
end subroutine s_derive_numerical_schlieren_function
692692

693693
!> Deallocation procedures for the module
694-
subroutine s_finalize_derived_variables_module
694+
impure subroutine s_finalize_derived_variables_module
695695

696696
! Deallocating the variable containing the gradient magnitude of the
697697
! density field provided that the numerical Schlieren function was

src/post_process/m_global_parameters.fpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ contains
324324
!> Assigns default values to user inputs prior to reading
325325
!! them in. This allows for an easier consistency check of
326326
!! these parameters once they are read from the input file.
327-
subroutine s_assign_default_values_to_user_inputs
327+
impure subroutine s_assign_default_values_to_user_inputs
328328

329329
integer :: i !< Generic loop iterator
330330

@@ -463,7 +463,7 @@ contains
463463

464464
!> Computation of parameters, allocation procedures, and/or
465465
!! any other tasks needed to properly setup the module
466-
subroutine s_initialize_global_parameters_module
466+
impure subroutine s_initialize_global_parameters_module
467467

468468
integer :: i, j, fac
469469

@@ -885,7 +885,7 @@ contains
885885
end subroutine s_initialize_global_parameters_module
886886

887887
!> Subroutine to initialize parallel infrastructure
888-
subroutine s_initialize_parallel_io
888+
impure subroutine s_initialize_parallel_io
889889

890890
num_dims = 1 + min(1, n) + min(1, p)
891891

@@ -919,7 +919,7 @@ contains
919919
end subroutine s_initialize_parallel_io
920920

921921
!> Deallocation procedures for the module
922-
subroutine s_finalize_global_parameters_module
922+
impure subroutine s_finalize_global_parameters_module
923923

924924
integer :: i
925925

src/post_process/m_mpi_proxy.fpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ contains
4848
4949
!> Computation of parameters, allocation procedures, and/or
5050
!! any other tasks needed to properly setup the module
51-
subroutine s_initialize_mpi_proxy_module
51+
impure subroutine s_initialize_mpi_proxy_module
5252
5353
#ifdef MFC_MPI
5454
@@ -144,7 +144,7 @@ contains
144144
!! these are not available to the remaining processors. This
145145
!! subroutine is then in charge of broadcasting the required
146146
!! information.
147-
subroutine s_mpi_bcast_user_inputs
147+
impure subroutine s_mpi_bcast_user_inputs
148148
149149
#ifdef MFC_MPI
150150
integer :: i !< Generic loop iterator
@@ -206,7 +206,7 @@ contains
206206
!! as well as recomputing some of the global parameters so
207207
!! that they reflect the configuration of sub-domain that
208208
!! is overseen by the local processor.
209-
subroutine s_mpi_decompose_computational_domain
209+
impure subroutine s_mpi_decompose_computational_domain
210210
211211
#ifdef MFC_MPI
212212
@@ -646,7 +646,7 @@ contains
646646
!! cell-boundary locations is communicated.
647647
!! @param pbc_loc Processor boundary condition (PBC) location
648648
!! @param sweep_coord Coordinate direction normal to the processor boundary
649-
subroutine s_mpi_sendrecv_grid_vars_buffer_regions(pbc_loc, sweep_coord)
649+
impure subroutine s_mpi_sendrecv_grid_vars_buffer_regions(pbc_loc, sweep_coord)
650650
651651
character(LEN=3), intent(in) :: pbc_loc
652652
character, intent(in) :: sweep_coord
@@ -846,7 +846,7 @@ contains
846846
!! @param pbc_loc Processor boundary condition (PBC) location
847847
!! @param sweep_coord Coordinate direction normal to the processor boundary
848848
!! @param q_particle Projection of the lagrangian particles in the Eulerian framework
849-
subroutine s_mpi_sendrecv_cons_vars_buffer_regions(q_cons_vf, pbc_loc, &
849+
impure subroutine s_mpi_sendrecv_cons_vars_buffer_regions(q_cons_vf, pbc_loc, &
850850
sweep_coord, q_particle)
851851
852852
type(scalar_field), &
@@ -1496,7 +1496,7 @@ contains
14961496
!! @param spatial_extents Spatial extents for each processor's sub-domain. First dimension
14971497
!! corresponds to the minimum and maximum values, respectively, while
14981498
!! the second dimension corresponds to the processor rank.
1499-
subroutine s_mpi_gather_spatial_extents(spatial_extents)
1499+
impure subroutine s_mpi_gather_spatial_extents(spatial_extents)
15001500

15011501
real(wp), dimension(1:, 0:), intent(INOUT) :: spatial_extents
15021502

@@ -1615,7 +1615,7 @@ contains
16151615
!! puts back together the grid of the entire computational
16161616
!! domain on the rank 0 processor. This is only done for 1D
16171617
!! simulations.
1618-
subroutine s_mpi_defragment_1d_grid_variable
1618+
impure subroutine s_mpi_defragment_1d_grid_variable
16191619

16201620
#ifdef MFC_MPI
16211621

@@ -1651,7 +1651,7 @@ contains
16511651
!! First dimension of array corresponds to the former's minimum and
16521652
!! maximum values, respectively, while second dimension corresponds
16531653
!! to each processor's rank.
1654-
subroutine s_mpi_gather_data_extents(q_sf, data_extents)
1654+
impure subroutine s_mpi_gather_data_extents(q_sf, data_extents)
16551655

16561656
real(wp), dimension(:, :, :), intent(in) :: q_sf
16571657

@@ -1681,7 +1681,7 @@ contains
16811681
!! This is only done for 1D simulations.
16821682
!! @param q_sf Flow variable defined on a single computational sub-domain
16831683
!! @param q_root_sf Flow variable defined on the entire computational domain
1684-
subroutine s_mpi_defragment_1d_flow_variable(q_sf, q_root_sf)
1684+
impure subroutine s_mpi_defragment_1d_flow_variable(q_sf, q_root_sf)
16851685

16861686
real(wp), &
16871687
dimension(0:m), &
@@ -1705,7 +1705,7 @@ contains
17051705
end subroutine s_mpi_defragment_1d_flow_variable
17061706

17071707
!> Deallocation procedures for the module
1708-
subroutine s_finalize_mpi_proxy_module
1708+
impure subroutine s_finalize_mpi_proxy_module
17091709

17101710
#ifdef MFC_MPI
17111711

src/post_process/m_start_up.f90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module m_start_up
4848
!> Reads the configuration file post_process.inp, in order
4949
!! to populate parameters in module m_global_parameters.f90
5050
!! with the user provided inputs
51-
subroutine s_read_input_file
51+
impure subroutine s_read_input_file
5252

5353
character(LEN=name_len) :: file_loc !<
5454
!! Generic string used to store the address of a particular file
@@ -125,7 +125,7 @@ end subroutine s_read_input_file
125125
!! individual choices are compatible with the code's options
126126
!! and that the combination of these choices results into a
127127
!! valid configuration for the post-process
128-
subroutine s_check_input_file
128+
impure subroutine s_check_input_file
129129

130130
character(LEN=len_trim(case_dir)) :: file_loc !<
131131
!! Generic string used to store the address of a particular file
@@ -151,7 +151,7 @@ subroutine s_check_input_file
151151

152152
end subroutine s_check_input_file
153153

154-
subroutine s_perform_time_step(t_step)
154+
impure subroutine s_perform_time_step(t_step)
155155

156156
integer, intent(inout) :: t_step
157157
if (proc_rank == 0) then
@@ -189,7 +189,7 @@ subroutine s_perform_time_step(t_step)
189189

190190
end subroutine s_perform_time_step
191191

192-
subroutine s_save_data(t_step, varname, pres, c, H)
192+
impure subroutine s_save_data(t_step, varname, pres, c, H)
193193

194194
integer, intent(inout) :: t_step
195195
character(LEN=name_len), intent(inout) :: varname
@@ -671,7 +671,7 @@ subroutine s_save_data(t_step, varname, pres, c, H)
671671

672672
end subroutine s_save_data
673673

674-
subroutine s_initialize_modules
674+
impure subroutine s_initialize_modules
675675
! Computation of parameters, allocation procedures, and/or any other tasks
676676
! needed to properly setup the modules
677677
call s_initialize_global_parameters_module()
@@ -695,7 +695,7 @@ subroutine s_initialize_modules
695695
end if
696696
end subroutine s_initialize_modules
697697

698-
subroutine s_initialize_mpi_domain
698+
impure subroutine s_initialize_mpi_domain
699699
! Initialization of the MPI environment
700700
call s_mpi_initialize()
701701

@@ -720,7 +720,7 @@ subroutine s_initialize_mpi_domain
720720

721721
end subroutine s_initialize_mpi_domain
722722

723-
subroutine s_finalize_modules
723+
impure subroutine s_finalize_modules
724724
! Disassociate pointers for serial and parallel I/O
725725
s_read_data_files => null()
726726

src/pre_process/m_assign_variables.fpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ module m_assign_variables
6666

6767
contains
6868

69-
subroutine s_initialize_assign_variables_module
69+
impure subroutine s_initialize_assign_variables_module
7070

7171
allocate (alf_sum%sf(0:m, 0:n, 0:p))
7272

@@ -101,7 +101,7 @@ contains
101101
!! @param eta pseudo volume fraction
102102
!! @param q_prim_vf Primitive variables
103103
!! @param patch_id_fp Array to track patch ids
104-
subroutine s_assign_patch_mixture_primitive_variables(patch_id, j, k, l, &
104+
pure subroutine s_assign_patch_mixture_primitive_variables(patch_id, j, k, l, &
105105
eta, q_prim_vf, patch_id_fp)
106106
!$acc routine seq
107107
@@ -281,7 +281,7 @@ contains
281281
!! @param eta pseudo volume fraction
282282
!! @param q_prim_vf Primitive variables
283283
!! @param patch_id_fp Array to track patch ids
284-
subroutine s_assign_patch_species_primitive_variables(patch_id, j, k, l, &
284+
impure subroutine s_assign_patch_species_primitive_variables(patch_id, j, k, l, &
285285
eta, q_prim_vf, patch_id_fp)
286286
!$acc routine seq
287287
@@ -704,7 +704,7 @@ contains
704704
705705
end subroutine s_assign_patch_species_primitive_variables
706706
707-
subroutine s_finalize_assign_variables_module
707+
impure subroutine s_finalize_assign_variables_module
708708
709709
! Nullifying procedure pointer to the subroutine assigning either
710710
! the patch mixture or species primitive variables to a cell in the

src/pre_process/m_boundary_conditions.fpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module m_boundary_conditions
2929
s_write_parallel_boundary_condition_files
3030

3131
contains
32-
subroutine s_line_segment_bc(patch_id, q_prim_vf, bc_type)
32+
impure subroutine s_line_segment_bc(patch_id, q_prim_vf, bc_type)
3333

3434
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
3535
type(integer_field), dimension(1:num_dims, -1:1), intent(inout) :: bc_type
@@ -79,7 +79,7 @@ contains
7979

8080
end subroutine s_line_segment_bc
8181

82-
subroutine s_circle_bc(patch_id, q_prim_vf, bc_type)
82+
impure subroutine s_circle_bc(patch_id, q_prim_vf, bc_type)
8383

8484
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
8585
type(integer_field), dimension(1:num_dims, -1:1), intent(inout) :: bc_type
@@ -143,7 +143,7 @@ contains
143143

144144
end subroutine s_circle_bc
145145

146-
subroutine s_rectangle_bc(patch_id, q_prim_vf, bc_type)
146+
impure subroutine s_rectangle_bc(patch_id, q_prim_vf, bc_type)
147147

148148
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
149149
type(integer_field), dimension(1:num_dims, -1:1), intent(inout) :: bc_type
@@ -233,7 +233,7 @@ contains
233233

234234
end subroutine s_rectangle_bc
235235

236-
subroutine s_apply_boundary_patches(q_prim_vf, bc_type)
236+
impure subroutine s_apply_boundary_patches(q_prim_vf, bc_type)
237237

238238
type(scalar_field), dimension(sys_size) :: q_prim_vf
239239
type(integer_field), dimension(1:num_dims, -1:1) :: bc_type
@@ -267,7 +267,7 @@ contains
267267

268268
end subroutine s_apply_boundary_patches
269269

270-
subroutine s_write_serial_boundary_condition_files(q_prim_vf, bc_type, step_dirpath)
270+
impure subroutine s_write_serial_boundary_condition_files(q_prim_vf, bc_type, step_dirpath)
271271

272272
type(scalar_field), dimension(sys_size) :: q_prim_vf
273273
type(integer_field), dimension(1:num_dims, -1:1) :: bc_type
@@ -307,7 +307,7 @@ contains
307307

308308
end subroutine s_write_serial_boundary_condition_files
309309

310-
subroutine s_write_parallel_boundary_condition_files(q_prim_vf, bc_type)
310+
impure subroutine s_write_parallel_boundary_condition_files(q_prim_vf, bc_type)
311311

312312
type(scalar_field), dimension(sys_size) :: q_prim_vf
313313
type(integer_field), dimension(1:num_dims, -1:1) :: bc_type
@@ -369,9 +369,9 @@ contains
369369

370370
end subroutine s_write_parallel_boundary_condition_files
371371

372-
subroutine s_pack_boundary_condition_buffers(q_prim_vf)
372+
impure subroutine s_pack_boundary_condition_buffers(q_prim_vf)
373373

374-
type(scalar_field), dimension(sys_size) :: q_prim_vf
374+
type(scalar_field), dimension(sys_size), intent(in) :: q_prim_vf
375375
integer :: i, j, k
376376

377377
do k = 0, p

0 commit comments

Comments
 (0)