@@ -94,28 +94,28 @@ module m_start_up
9494 s_perform_time_step, s_save_data, &
9595 s_save_performance_metrics
9696
97- abstract interface ! ===================================================
9897
99- !! @param q_cons_vf Conservative variables
100- subroutine s_read_abstract_data_files (q_cons_vf )
101-
102- import :: scalar_field, sys_size, pres_field
103-
104- type(scalar_field), &
105- dimension (sys_size), &
106- intent (inout ) :: q_cons_vf
98+ type(scalar_field), allocatable, dimension (:) :: grad_x_vf, grad_y_vf, grad_z_vf, norm_vf
10799
108- end subroutine s_read_abstract_data_files
100+ real ( kind ( 0d0 )) :: dt_init
109101
110- end interface ! ========================================================
102+ contains
111103
112- type(scalar_field), allocatable, dimension (:) :: grad_x_vf, grad_y_vf, grad_z_vf, norm_vf
104+ !> Read data files. Dispatch subroutine that replaces procedure pointer.
105+ !! @param q_cons_vf Conservative variables
106+ subroutine s_read_data_files (q_cons_vf )
113107
114- procedure(s_read_abstract_data_files), pointer :: s_read_data_files = > null()
108+ type(scalar_field), &
109+ dimension (sys_size), &
110+ intent (inout ) :: q_cons_vf
115111
116- real (kind (0d0 )) :: dt_init
112+ if (.not. parallel_io) then
113+ call s_read_serial_data_files(q_cons_vf)
114+ else
115+ call s_read_parallel_data_files(q_cons_vf)
116+ end if
117117
118- contains
118+ end subroutine s_read_data_files
119119
120120 !> The purpose of this procedure is to first verify that an
121121 !! input file has been made available by the user. Provided
@@ -1350,13 +1350,6 @@ contains
13501350 call acc_present_dump()
13511351#endif
13521352
1353- ! Associate pointers for serial or parallel I/ O
1354- if (parallel_io .neqv. .true. ) then
1355- s_read_data_files = > s_read_serial_data_files
1356- else
1357- s_read_data_files = > s_read_parallel_data_files
1358- end if
1359-
13601353 ! Reading in the user provided initial condition and grid data
13611354 call s_read_data_files(q_cons_ts(1 )%vf)
13621355
@@ -1490,8 +1483,6 @@ contains
14901483 end subroutine s_initialize_gpu_vars
14911484
14921485 subroutine s_finalize_modules
1493- ! Disassociate pointers for serial and parallel I/ O
1494- s_read_data_files = > null()
14951486
14961487 call s_finalize_time_steppers_module()
14971488 call s_finalize_derived_variables_module()
0 commit comments