1# 1 "/home/runner/work/MFC/MFC/src/pre_process/m_start_up.fpp"
6# 1 "/home/runner/work/MFC/MFC/src/common/include/macros.fpp" 1
7# 1 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp" 1
8# 1 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp" 1
9# 2 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
10# 3 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
11# 4 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
12# 5 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
13# 6 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
15# 8 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
16# 9 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
17# 10 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
19# 17 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
21# 46 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
23# 58 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
25# 68 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
27# 98 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
29# 110 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
31# 120 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
33# 2 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp" 2
34# 1 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp" 1
35# 1 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp" 1
36# 2 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
37# 3 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
38# 4 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
39# 5 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
40# 6 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
42# 8 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
43# 9 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
44# 10 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
46# 17 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
48# 46 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
50# 58 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
52# 68 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
54# 98 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
56# 110 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
58# 120 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
60# 2 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp" 2
62# 4 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
63# 5 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
64# 6 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
65# 7 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
66# 8 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
68# 20 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
70# 43 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
72# 48 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
74# 53 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
76# 58 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
78# 63 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
80# 68 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
82# 76 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
84# 81 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
86# 86 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
88# 91 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
90# 96 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
92# 101 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
94# 106 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
96# 111 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
98# 116 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
100# 121 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
102# 151 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
104# 192 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
106# 207 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
108# 232 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
110# 243 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
112# 245 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
113# 255 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
115# 283 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
117# 293 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
119# 303 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
121# 312 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
123# 329 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
125# 339 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
127# 346 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
129# 352 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
131# 358 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
133# 364 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
135# 370 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
137# 376 "/home/runner/work/MFC/MFC/src/common/include/omp_macros.fpp"
139# 3 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp" 2
140# 1 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp" 1
141# 1 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp" 1
142# 2 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
143# 3 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
144# 4 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
145# 5 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
146# 6 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
148# 8 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
149# 9 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
150# 10 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
152# 17 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
154# 46 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
156# 58 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
158# 68 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
160# 98 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
162# 110 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
164# 120 "/home/runner/work/MFC/MFC/src/common/include/shared_parallel_macros.fpp"
166# 2 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp" 2
168# 7 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
170# 17 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
172# 22 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
174# 27 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
176# 32 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
178# 37 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
180# 42 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
182# 47 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
184# 52 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
186# 57 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
188# 62 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
190# 73 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
192# 78 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
194# 83 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
196# 88 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
198# 103 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
200# 131 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
202# 160 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
204# 175 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
206# 192 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
208# 213 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
210# 241 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
212# 256 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
214# 266 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
216# 275 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
218# 291 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
220# 301 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
222# 308 "/home/runner/work/MFC/MFC/src/common/include/acc_macros.fpp"
224# 4 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp" 2
226# 21 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
228# 37 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
230# 50 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
232# 104 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
234# 119 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
236# 130 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
238# 143 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
240# 171 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
242# 182 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
244# 193 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
246# 204 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
248# 214 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
250# 225 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
252# 236 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
254# 246 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
256# 252 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
258# 258 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
260# 264 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
262# 270 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
264# 272 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
265# 273 "/home/runner/work/MFC/MFC/src/common/include/parallel_macros.fpp"
267# 2 "/home/runner/work/MFC/MFC/src/common/include/macros.fpp" 2
269# 14 "/home/runner/work/MFC/MFC/src/common/include/macros.fpp"
275# 63 "/home/runner/work/MFC/MFC/src/common/include/macros.fpp"
277# 81 "/home/runner/work/MFC/MFC/src/common/include/macros.fpp"
279# 88 "/home/runner/work/MFC/MFC/src/common/include/macros.fpp"
281# 111 "/home/runner/work/MFC/MFC/src/common/include/macros.fpp"
283# 127 "/home/runner/work/MFC/MFC/src/common/include/macros.fpp"
285# 153 "/home/runner/work/MFC/MFC/src/common/include/macros.fpp"
287# 159 "/home/runner/work/MFC/MFC/src/common/include/macros.fpp"
289# 167 "/home/runner/work/MFC/MFC/src/common/include/macros.fpp"
291# 6 "/home/runner/work/MFC/MFC/src/pre_process/m_start_up.fpp" 2
300 use m_mpi_proxy !< message passing interface (mpi) module proxy
307 use m_grid !< procedures to generate (non-)uniform grids
311 use m_data_output !< procedures to write the grid data and the
327 use mpi !< message passing interface (mpi) module
376 dimension(sys_size), &
377 intent(inout) :: q_cons_vf_in
400 character(LEN=name_len) :: file_loc
403 logical :: file_check
410 character(len=1000) :: line
440 file_loc =
'pre_process.inp'
441 inquire (file=trim(file_loc), exist=file_check)
446 open (1, file=trim(file_loc), form=
'formatted', &
447 status=
'old', action=
'read')
448 read (1, nml=user_inputs, iostat=iostatus)
449 if (iostatus /= 0)
then
451 read (1, fmt=
'(A)') line
452 print *,
'Invalid line in namelist: '//trim(line)
453 call s_mpi_abort(
'Invalid line in pre_process.inp. It is '// &
454 'likely due to a datatype mismatch. Exiting.')
475 call s_mpi_abort(
'File pre_process.inp is missing. Exiting.')
486 character(LEN=len_trim(case_dir)) :: file_loc
499 if (dir_check .neqv. .true.)
then
500 print
'(A)',
'WARNING: Ensure that compiler flags/choices in Makefiles match your compiler! '
501 print
'(A)',
'WARNING: Ensure that preprocessor flags are enabled! '
502 call s_mpi_abort(
'Unsupported choice for the value of case_dir.'// &
522 character(LEN=len_trim(case_dir) + 3*name_len) :: file_loc
529 logical :: file_check
543 if (dir_check .neqv. .true.)
then
545 ' is missing. Exiting.')
552 inquire (file=trim(file_loc), exist=file_check)
556 open (1, file=trim(file_loc), form=
'unformatted', &
557 status=
'old', action=
'read')
561 call s_mpi_abort(
'File x_cb.dat is missing in '// &
582 inquire (file=trim(file_loc), exist=file_check)
586 open (1, file=trim(file_loc), form=
'unformatted', &
587 status=
'old', action=
'read')
591 call s_mpi_abort(
'File y_cb.dat is missing in '// &
611 inquire (file=trim(file_loc), exist=file_check)
615 open (1, file=trim(file_loc), form=
'unformatted', &
616 status=
'old', action=
'read')
620 call s_mpi_abort(
'File z_cb.dat is missing in '// &
645 if (
old_ic .neqv. .true.)
then
660 if (any(
x_cb(0:
m) -
x_cb(-1:
m - 1) <= 0._wp))
then
662 ' contains non-positive cell-spacings. Exiting.')
669 if (any(
y_cb(0:
n) -
y_cb(-1:
n - 1) <= 0._wp))
then
671 ' contains non-positive cell-spacings. '// &
679 if (any(
z_cb(0:
p) -
z_cb(-1:
p - 1) <= 0._wp))
then
681 ' contains non-positive cell-spacings'// &
699 dimension(sys_size), &
700 intent(inout) :: q_cons_vf_in
702 character(LEN=len_trim(case_dir) + 3*name_len) :: file_loc
706 int(floor(log10(real(
sys_size, wp)))) + 1) :: file_num
710 logical :: file_check
721 write (file_num,
'(I0)') i
723 trim(file_num)//
'.dat'
724 inquire (file=trim(file_loc), exist=file_check)
728 open (1, file=trim(file_loc), form=
'unformatted', &
729 status=
'old', action=
'read')
730 read (1) q_cons_vf_in(i)%sf
733 call s_mpi_abort(
'File q_cons_vf'//trim(file_num)// &
746 write (file_num,
'(I0)')
sys_size + r + (i - 1)*nnode
748 trim(file_num)//
'.dat'
749 inquire (file=trim(file_loc), exist=file_check)
753 open (1, file=trim(file_loc), form=
'unformatted', &
754 status=
'old', action=
'read')
755 read (1)
pb%sf(:, :, :, r, i)
770 write (file_num,
'(I0)')
sys_size + r + (i - 1)*4
772 trim(file_num)//
'.dat'
773 inquire (file=trim(file_loc), exist=file_check)
777 open (1, file=trim(file_loc), form=
'unformatted', &
778 status=
'old', action=
'read')
779 read (1)
mv%sf(:, :, :, r, i)
809 real(wp),
allocatable,
dimension(:) :: x_cb_glb, y_cb_glb, z_cb_glb
811 integer :: ifile, ierr, data_size
812 integer,
dimension(MPI_STATUS_SIZE) :: status
814 character(LEN=path_len + 2*name_len) :: file_loc
815 logical :: file_exist
817 allocate (x_cb_glb(-1:
m_glb))
818 allocate (y_cb_glb(-1:
n_glb))
819 allocate (z_cb_glb(-1:
p_glb))
823 inquire (file=trim(file_loc), exist=file_exist)
826 data_size =
m_glb + 2
827 call mpi_file_open(mpi_comm_world, file_loc, mpi_mode_rdonly,
mpi_info_int, ifile, ierr)
828 call mpi_file_read_all(ifile, x_cb_glb, data_size, mpi_p, status, ierr)
829 call mpi_file_close(ifile, ierr)
831 call s_mpi_abort(
'File '//trim(file_loc)//
' is missing. Exiting. ')
848 inquire (file=trim(file_loc), exist=file_exist)
851 data_size =
n_glb + 2
852 call mpi_file_open(mpi_comm_world, file_loc, mpi_mode_rdonly,
mpi_info_int, ifile, ierr)
853 call mpi_file_read_all(ifile, y_cb_glb, data_size, mpi_p, status, ierr)
854 call mpi_file_close(ifile, ierr)
856 call s_mpi_abort(
'File '//trim(file_loc)//
' is missing. Exiting. ')
873 inquire (file=trim(file_loc), exist=file_exist)
876 data_size =
p_glb + 2
877 call mpi_file_open(mpi_comm_world, file_loc, mpi_mode_rdonly,
mpi_info_int, ifile, ierr)
878 call mpi_file_read_all(ifile, z_cb_glb, data_size, mpi_p, status, ierr)
879 call mpi_file_close(ifile, ierr)
881 call s_mpi_abort(
'File '//trim(file_loc)//
' is missing. Exiting. ')
898 deallocate (x_cb_glb, y_cb_glb, z_cb_glb)
912 dimension(sys_size), &
913 intent(inout) :: q_cons_vf_in
917 integer :: ifile, ierr, data_size
918 integer,
dimension(MPI_STATUS_SIZE) :: status
919 integer(KIND=MPI_OFFSET_KIND) :: disp
920 integer(KIND=MPI_OFFSET_KIND) :: m_mok, n_mok, p_mok
921 integer(KIND=MPI_OFFSET_KIND) :: wp_mok, var_mok, str_mok
922 integer(KIND=MPI_OFFSET_KIND) :: nvars_mok
923 integer(KIND=MPI_OFFSET_KIND) :: mok
925 character(LEN=path_len + 2*name_len) :: file_loc
926 logical :: file_exist
932 write (file_loc,
'(I0,A)')
n_start,
'.dat'
937 inquire (file=trim(file_loc), exist=file_exist)
940 call mpi_file_open(mpi_comm_world, file_loc, mpi_mode_rdonly,
mpi_info_int, ifile, ierr)
945 data_size = (
m + 1)*(
n + 1)*(
p + 1)
948 m_mok = int(
m_glb + 1, mpi_offset_kind)
949 n_mok = int(
n_glb + 1, mpi_offset_kind)
950 p_mok = int(
p_glb + 1, mpi_offset_kind)
951 wp_mok = int(8._wp, mpi_offset_kind)
952 mok = int(1._wp, mpi_offset_kind)
953 str_mok = int(name_len, mpi_offset_kind)
954 nvars_mok = int(
sys_size, mpi_offset_kind)
958 var_mok = int(i, mpi_offset_kind)
961 disp = m_mok*max(mok, n_mok)*max(mok, p_mok)*wp_mok*(var_mok - 1)
963 call mpi_file_set_view(ifile, disp, mpi_p,
mpi_io_data%view(i), &
965 call mpi_file_read(ifile,
mpi_io_data%var(i)%sf, data_size, &
971 var_mok = int(i, mpi_offset_kind)
974 disp = m_mok*max(mok, n_mok)*max(mok, p_mok)*wp_mok*(var_mok - 1)
976 call mpi_file_set_view(ifile, disp, mpi_p,
mpi_io_data%view(i), &
978 call mpi_file_read(ifile,
mpi_io_data%var(i)%sf, data_size, &
985 call mpi_file_close(ifile, ierr)
988 call s_mpi_abort(
'File '//trim(file_loc)//
' is missing. Exiting. ')
1010 call s_initialize_perturbation_module()
1056 real(wp),
intent(inout) :: start, finish
1071 call cpu_time(start)
1080# 793 "/home/runner/work/MFC/MFC/src/pre_process/m_start_up.fpp"
1082# 793 "/home/runner/work/MFC/MFC/src/pre_process/m_start_up.fpp"
1083 "Assertion failed: psi_idx > 0. " &
1084# 793 "/home/runner/work/MFC/MFC/src/pre_process/m_start_up.fpp"
1085 //
"hyper_cleaning requires psi_idx to be set")
1086# 793 "/home/runner/work/MFC/MFC/src/pre_process/m_start_up.fpp"
1092 if (
n > 0) r2 = r2 +
y_cc(
k)**2
1093 if (
p > 0) r2 = r2 +
z_cc(
l)**2
1103 print *,
'initial condition might have been altered due to enforcement of &
1104& pTg-equilirium (relax = "T" activated)'
1112 call cpu_time(finish)
1116 impure subroutine s_save_data(proc_time, time_avg, time_final, file_exists)
1118 real(wp),
dimension(:),
intent(inout) :: proc_time
1119 real(wp),
intent(inout) :: time_avg, time_final
1120 logical,
intent(inout) :: file_exists
1131 time_final = time_avg
1132 print *,
"Elapsed Time", time_final
1134 time_final = maxval(proc_time)
1135 print *,
"Elapsed Time", time_final
1137 inquire (file=
'pre_time_data.dat', exist=file_exists)
1138 if (file_exists)
then
1139 open (1, file=
'pre_time_data.dat', position=
'append', status=
'old')
1143 open (1, file=
'pre_time_data.dat', status=
'new')
1166 print
'(" Pre-processing a ", I0, "x", I0, "x", I0, " case on ", I0, " rank(s)")',
m,
n,
p,
num_procs
1192 call s_finalize_perturbation_module()
Abstract interface for reading grid data files in serial or parallel.
Abstract interface for reading initial condition data files in serial or parallel.
Assigns initial primitive variables to computational cells based on patch geometry.
impure subroutine, public s_initialize_assign_variables_module
Allocates volume fraction sum and sets the patch primitive variable assignment procedure pointer.
impure subroutine, public s_finalize_assign_variables_module
Nullifies the patch primitive variable assignment procedure pointer.
Noncharacteristic and processor boundary condition application for ghost cells and buffer regions.
impure subroutine, public s_initialize_boundary_common_module()
Allocates and sets up boundary condition buffer arrays for all coordinate directions.
subroutine, public s_finalize_boundary_common_module()
Deallocates boundary condition buffer arrays allocated during module initialization.
Applies spatially varying boundary condition patches along domain edges and faces.
Validates geometry parameters and constraints for immersed boundary patches.
impure subroutine, public s_check_ib_patches
Validates the geometry parameters of all active and inactive immersed boundary patches.
Validates geometry parameters and constraints for initial condition patches.
impure subroutine, public s_check_patches
Validates the geometry parameters of all active and inactive initial condition patches.
Shared input validation checks for grid dimensions and AMD GPU compiler limits.
impure subroutine, public s_check_inputs_common
Checks compatibility of parameters in the input file. Used by all three stages.
Checks pre-process input file parameters for compatibility and correctness.
impure subroutine, public s_check_inputs
Checks compatibility of parameters in the input file. Used by the pre_process stage.
Platform-specific file and directory operations: create, delete, inquire, getcwd, and basename.
impure subroutine s_delete_directory(dir_name)
Recursively deletes a directory using a platform-specific system command.
impure subroutine my_inquire(fileloc, dircheck)
Inquires on the existence of a directory.
impure subroutine s_create_directory(dir_name)
Creates a directory and all its parents if it does not exist.
Writes grid and initial condition data to serial or parallel output files.
procedure(s_write_abstract_data_files), pointer, public s_write_data_files
character(len=path_len+2 *name_len), private t_step_dir
Time-step folder into which grid and initial condition data will be placed.
impure subroutine, public s_initialize_data_output_module
Computation of parameters, allocation procedures, and/or any other tasks needed to properly setup the...
impure subroutine, public s_finalize_data_output_module
Resets s_write_data_files pointer.
impure subroutine, public s_write_parallel_data_files(q_cons_vf, q_prim_vf, bc_type)
Writes grid and initial condition data files in parallel to the "0" time-step directory in the local ...
impure subroutine, public s_write_serial_data_files(q_cons_vf, q_prim_vf, bc_type)
Writes grid and initial condition data files to the "0" time-step directory in the local processor ra...
character(len=path_len+2 *name_len), public restart_dir
Restart data folder.
Shared derived types for field data, patch geometry, bubble dynamics, and MPI I/O structures.
Defines global parameters for the computational domain, simulation algorithm, and initial conditions.
real(wp) perturb_flow_mag
Magnitude of perturbation with perturb_flow flag.
real(wp) mixlayer_perturb_k0
Peak wavenumber of prescribed energy spectra with mixlayer_perturb flag Default value (k0 = 0....
logical cont_damage
continuum damage modeling
integer p_glb
Global number of cells in each direction.
logical igr
Use information geometric regularization.
logical hypoelasticity
activate hypoelasticity
impure subroutine s_assign_default_values_to_user_inputs
Assigns default values to user inputs prior to reading them in. This allows for an easier consistency...
impure subroutine s_finalize_global_parameters_module
Deallocates all global grid, index, and equation-of-state parameter arrays.
integer perturb_flow_fluid
Fluid to be perturbed with perturb_flow flag.
integer recon_type
Reconstruction Type.
integer mpi_info_int
MPI info for parallel IO with Lustre file systems.
logical elliptic_smoothing
type(ib_patch_parameters), dimension(num_patches_max) patch_ib
real(wp) dz
Minimum cell-widths in the x-, y- and z-coordinate directions.
type(int_bounds_info) bc_z
Boundary conditions in the x-, y- and z-coordinate directions.
integer num_fluids
Number of different fluids present in the flow.
integer elliptic_smoothing_iters
logical pre_stress
activate pre_stressed domain
real(wp), dimension(:), allocatable y_cc
integer proc_rank
Rank of the local processor.
logical bc_io
whether or not to save BC data
real(wp), dimension(:), allocatable y_cb
type(bounds_info) z_domain
Locations of the domain bounds in the x-, y- and z-coordinate directions.
character(len=name_len) mpiiofs
integer, dimension(:), allocatable start_idx
Starting cell-center index of local processor in global grid.
integer sys_size
Number of unknowns in the system of equations.
type(simplex_noise_params) simplex_params
integer muscl_order
Order of accuracy for the MUSCL reconstruction.
type(bounds_info) x_domain
real(wp) ptgalpha_eps
trigger parameter for the pTg relaxation procedure, phase change model
integer relax_model
Relax Model.
integer num_patches
Number of patches composing initial condition.
logical ib
Turn immersed boundaries on.
integer num_bc_patches
Number of boundary condition patches.
type(bc_patch_parameters), dimension(num_bc_patches_max) patch_bc
integer model_eqns
Multicomponent flow model.
integer precision
Precision of output files.
logical hyperelasticity
activate hyperelasticity
real(wp), dimension(:), allocatable z_cb
Locations of cell-boundaries (cb) in x-, y- and z-directions, respectively.
type(physical_parameters), dimension(num_fluids_max) fluid_pp
Database of the physical parameters of each of the fluids that is present in the flow....
type(int_bounds_info) bc_y
impure subroutine s_initialize_global_parameters_module
Computation of parameters, allocation procedures, and/or any other tasks needed to properly setup the...
real(wp), dimension(:), allocatable x_cc
integer mixlayer_perturb_nk
Number of Fourier modes for perturbation with mixlayer_perturb flag.
integer perturb_sph_fluid
Fluid to be perturbed with perturb_sph flag.
type(int_bounds_info) bc_x
real(wp), dimension(:), allocatable x_cb
type(bounds_info) y_domain
logical relax
activate phase change
logical qbmm
Quadrature moment method.
logical old_grid
Use existing grid data.
real(wp) pi_fac
Factor for artificial pi_inf.
logical hyper_cleaning
Hyperbolic cleaning for MHD.
real(wp), dimension(num_fluids_max) fluid_rho
real(wp), dimension(:), allocatable z_cc
Locations of cell-centers (cc) in x-, y- and z-directions, respectively.
real(wp) pref
Reference parameters for Tait EOS.
real(wp) bx0
Constant magnetic field in the x-direction (1D).
logical stretch_z
Grid stretching flags for the x-, y- and z-coordinate directions.
logical adv_n
Solve the number density equation and compute alpha from number density.
integer num_procs
Number of processors.
character(len=path_len) case_dir
Case folder location.
type(ic_patch_parameters), dimension(num_patches_max) patch_icpp
Database of the initial condition patch parameters (icpp) for each of the patches employed in the con...
integer weno_order
Order of accuracy for the WENO reconstruction.
logical mhd
Magnetohydrodynamics.
logical parallel_io
Format of the data files.
type(cell_num_bounds) cells_bounds
logical down_sample
Down-sample the output data.
logical file_per_process
type of data output
real(wp) palpha_eps
trigger parameter for the p relaxation procedure, phase change model
integer t_step_start
Existing IC/grid folder.
type(mpi_io_var), public mpi_io_data
real(wp) mixlayer_vel_coef
Coefficient for the hyperbolic tangent streamwise velocity profile.
impure subroutine s_initialize_parallel_io
Configures MPI parallel I/O settings and allocates processor coordinate arrays.
logical mpp_lim
Alpha limiter.
integer igr_order
IGR reconstruction order.
integer psi_idx
Index of hyperbolic cleaning state variable for MHD.
type(subgrid_bubble_physical_parameters) bub_pp
real(wp) rhorv
standard deviations in R/V
logical relativity
Relativity for RMHD.
integer num_ibs
Number of immersed boundaries.
logical mixlayer_vel_profile
Set hyperbolic tangent streamwise velocity profile.
integer(kind=8) nglobal
Global number of cells in the domain.
logical mixlayer_perturb
Superimpose instability waves to surrounding fluid flow.
Generates uniform or stretched rectilinear grids with hyperbolic-tangent spacing.
impure subroutine, public s_generate_serial_grid
The following subroutine generates either a uniform or non-uniform rectilinear grid in serial,...
impure subroutine, public s_initialize_grid_module
Computation of parameters, allocation procedures, and/or any other tasks needed to properly setup the...
procedure(s_generate_abstract_grid), pointer, public s_generate_grid
impure subroutine, public s_generate_parallel_grid
The following subroutine generates either a uniform or non-uniform rectilinear grid in parallel,...
impure subroutine, public s_finalize_grid_module
Deallocation procedures for the module.
Basic floating-point utilities: approximate equality, default detection, and coordinate bounds.
elemental subroutine, public s_update_cell_bounds(bounds, m, n, p)
Updates the min and max number of cells in each set of axes.
Utility routines for bubble model setup, coordinate transforms, array sampling, and special functions...
impure subroutine, public s_initialize_bubbles_model()
bubbles_euler + polytropic bubbles_euler + non-polytropic bubbles_lagrange + non-polytropic
Allocate memory and read initial condition data for IC extrusion.
Assembles initial conditions by layering prioritized patches via constructive solid geometry.
type(scalar_field), dimension(:), allocatable q_cons_vf
conservative variables
type(integer_field), dimension(:, :), allocatable bc_type
bc_type fields
impure subroutine s_initialize_initial_condition_module
Computation of parameters, allocation procedures, and/or any other tasks needed to properly setup the...
impure subroutine s_finalize_initial_condition_module
Deallocation procedures for the module.
type(scalar_field), dimension(:), allocatable q_prim_vf
primitive variables
impure subroutine s_generate_initial_condition
This subroutine peruses the patches and depending on the type of geometry associated with a particula...
MPI communication layer: domain decomposition, halo exchange, reductions, and parallel I/O setup.
impure subroutine s_mpi_abort(prnt, code)
The subroutine terminates the MPI execution environment.
impure subroutine s_initialize_mpi_common_module
The computation of parameters, the allocation of memory, the association of pointers and/or the execu...
impure subroutine s_mpi_barrier
Halts all processes until all have reached barrier.
impure subroutine s_mpi_initialize
The subroutine initializes the MPI execution environment and queries both the number of processors wh...
impure subroutine s_initialize_mpi_data(q_cons_vf, ib_markers, beta)
impure subroutine s_mpi_finalize
The subroutine finalizes the MPI execution environment.
impure subroutine mpi_bcast_time_step_values(proc_time, time_avg)
Gathers per-rank time step wall-clock times onto rank 0 for performance reporting.
impure subroutine s_mpi_reduce_min(var_loc)
The following subroutine takes the inputted variable and determines its minimum value on the entire c...
impure subroutine s_finalize_mpi_common_module
Module deallocation and/or disassociation procedures.
subroutine s_mpi_decompose_computational_domain
The purpose of this procedure is to optimally decompose the computational domain among the available ...
Broadcasts user inputs and decomposes the domain across MPI ranks for pre-processing.
impure subroutine s_mpi_bcast_user_inputs
Since only processor with rank 0 is in charge of reading and checking the consistency of the user pro...
Phase transition relaxation solvers for liquid-vapor flows with cavitation and boiling.
impure subroutine, public s_finalize_relaxation_solver_module
This subroutine finalizes the phase change module.
subroutine, public s_infinite_relaxation_k(q_cons_vf)
This subroutine is created to activate either the pT- (N fluids) or the pTg-equilibrium (2 fluids for...
impure subroutine, public s_initialize_phasechange_module
The purpose of this subroutine is to initialize the phase change module by setting the parameters nee...
Reads and validates user inputs, loads existing grid/IC data, and initializes pre-process modules.
impure subroutine, public s_read_serial_ic_data_files(q_cons_vf_in)
The goal of this subroutine is to read in any preexisting initial condition data files so that they m...
impure subroutine, public s_initialize_modules
Initializes all pre-process modules, allocates data structures, and sets I/O procedure pointers.
impure subroutine, public s_save_data(proc_time, time_avg, time_final, file_exists)
Gathers processor timing data and writes elapsed wall-clock time to a summary file.
impure subroutine, public s_apply_initial_condition(start, finish)
Generates or reads the initial condition, applies relaxation if needed, and writes output data files.
character(len=path_len+name_len) proc_rank_dir
Location of the folder associated with the rank of the local processor.
impure subroutine, public s_read_serial_grid_data_files
The goal of this subroutine is to read in any preexisting grid data as well as based on the imported ...
impure subroutine, public s_read_parallel_ic_data_files(q_cons_vf_in)
The goal of this subroutine is to read in any preexisting initial condition data files so that they m...
procedure(s_read_abstract_ic_data_files), pointer, public s_read_ic_data_files
impure subroutine, public s_read_grid()
Reads an existing grid from data files or generates a new grid from user inputs.
impure subroutine, public s_check_grid_data_files
Cell-boundary data are checked for consistency by looking at the (non-)uniform cell-width distributio...
impure subroutine, public s_initialize_mpi_domain
Initializes MPI, reads and validates user inputs on rank 0, and decomposes the computational domain.
impure subroutine, public s_finalize_modules
Finalizes all pre-process modules, deallocates resources, and shuts down MPI.
impure subroutine, public s_read_input_file
Reads the configuration file pre_process.inp, in order to populate the parameters in module m_global_...
impure subroutine, public s_check_input_file
Checking that the user inputs make sense, i.e. that the individual choices are compatible with the co...
procedure(s_read_abstract_grid_data_files), pointer, public s_read_grid_data_files
impure subroutine, public s_read_parallel_grid_data_files
Cell-boundary data are checked for consistency by looking at the (non-)uniform cell-width distributio...
Conservative-to-primitive variable conversion, mixture property evaluation, and pressure computation.
impure subroutine, public s_initialize_variables_conversion_module
The computation of parameters, the allocation of memory, the association of pointers and/or the execu...
impure subroutine s_finalize_variables_conversion_module()
Deallocates fluid property arrays and post-processing fields allocated during module initialization.
Derived type annexing an integer scalar field (SF).
Derived type for bubble variables pb and mv at quadrature nodes (qbmm).
Derived type annexing a scalar field (SF).