Skip to content

Commit c0b37f3

Browse files
AnandAnand
authored andcommitted
Removing merge issues in post process and additional comments
1 parent a3f63b2 commit c0b37f3

File tree

8 files changed

+129
-284
lines changed

8 files changed

+129
-284
lines changed

src/post_process/m_data_output.f90 renamed to src/post_process/m_data_output.fpp

Lines changed: 102 additions & 240 deletions
Large diffs are not rendered by default.

src/post_process/m_global_parameters.f90

Lines changed: 14 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module m_global_parameters
5050
!> @name Cell-boundary locations in the x-, y- and z-coordinate directions
5151
!> @{
5252
real(kind(0d0)), allocatable, dimension(:) :: x_cb, x_root_cb, y_cb, z_cb
53-
real(kind(0d0)), allocatable, dimension(:) :: coarse_x_cb, coarse_y_cb, coarse_z_cb
53+
real(kind(0.0)), allocatable, dimension(:) :: x_cb_s, y_cb_s, z_cb_s
5454
!> @}
5555

5656
!> @name Cell-center locations in the x-, y- and z-coordinate directions
@@ -146,8 +146,6 @@ module m_global_parameters
146146

147147
integer :: format !< Format of the database file(s)
148148

149-
logical :: coarsen_silo
150-
151149
integer :: precision !< Floating point precision of the database file(s)
152150

153151
!> @name Size of the ghost zone layer in the x-, y- and z-coordinate directions.
@@ -187,12 +185,6 @@ module m_global_parameters
187185
logical :: schlieren_wrt
188186
!> @}
189187

190-
!> @name Options for Fourier decomposition in the azimuthal direction if 3D
191-
!! cylindrical coordinates are used
192-
!> @{
193-
logical :: fourier_decomp
194-
!> @}
195-
196188
real(kind(0d0)), dimension(num_fluids_max) :: schlieren_alpha !<
197189
!! Amplitude coefficients of the numerical Schlieren function that are used
198190
!! to adjust the intensity of numerical Schlieren renderings for individual
@@ -298,8 +290,6 @@ subroutine s_assign_default_values_to_user_inputs() ! ------------------
298290

299291
precision = dflt_int
300292

301-
coarsen_silo = .false.
302-
303293
alpha_rho_wrt = .false.
304294
rho_wrt = .false.
305295
mom_wrt = .false.
@@ -323,8 +313,6 @@ subroutine s_assign_default_values_to_user_inputs() ! ------------------
323313

324314
schlieren_alpha = dflt_real
325315

326-
fourier_decomp = .false.
327-
328316
fd_order = dflt_int
329317

330318
! Tait EOS
@@ -494,7 +482,7 @@ subroutine s_initialize_global_parameters_module() ! ----------------------
494482
internalEnergies_idx%beg = adv_idx%end + 1
495483
internalEnergies_idx%end = adv_idx%end + num_fluids
496484
sys_size = internalEnergies_idx%end
497-
alf_idx = 1
485+
alf_idx = 1 ! dummy, cannot actually have a void fraction
498486

499487
else if (model_eqns == 4) then
500488
cont_idx%beg = 1 ! one continuity equation
@@ -540,15 +528,12 @@ subroutine s_initialize_global_parameters_module() ! ----------------------
540528
R0(:) = 1d0
541529
V0(:) = 0d0
542530
else if (nb > 1) then
543-
!call s_simpson
544531
V0(:) = 0d0
545532
else
546533
stop 'Invalid value of nb'
547534
end if
548535

549-
if (polytropic .neqv. .true.) then
550-
!call s_initialize_nonpoly
551-
else
536+
if (polytropic ) then
552537
rhoref = 1.d0
553538
pref = 1.d0
554539
end if
@@ -614,6 +599,17 @@ subroutine s_initialize_global_parameters_module() ! ----------------------
614599
buff_size = buff_size + fd_number
615600
end if
616601

602+
! Allocating single precision grid variables if needed
603+
if (precision == 1) then
604+
allocate (x_cb_s(-1 - offset_x%beg:m + offset_x%end))
605+
if (n > 0) then
606+
allocate (y_cb_s(-1 - offset_x%beg:n + offset_x%end))
607+
if (p > 0) then
608+
allocate (z_cb_s(-1 - offset_x%beg:m + offset_x%end))
609+
end if
610+
end if
611+
end if
612+
617613
! Allocating the grid variables in the x-coordinate direction
618614
allocate (x_cb(-1 - offset_x%beg:m + offset_x%end))
619615
allocate (x_cc(-buff_size:m + buff_size))
@@ -641,14 +637,6 @@ subroutine s_initialize_global_parameters_module() ! ----------------------
641637

642638
end if
643639

644-
if (coarsen_silo) then
645-
allocate (coarse_x_cb(-1 - offset_x%beg:(m/2) + offset_x%end))
646-
if (n > 0) then
647-
allocate (coarse_y_cb(-1 - offset_y%beg:(n/2) + offset_y%end))
648-
if (p > 0) allocate (coarse_z_cb(-1 - offset_z%beg:(p/2) + offset_z%end))
649-
end if
650-
end if
651-
652640
allocate (adv(num_fluids))
653641

654642
if (cyl_coord .neqv. .true.) then ! Cartesian grid
@@ -712,14 +700,6 @@ subroutine s_finalize_global_parameters_module() ! -------------------
712700

713701
end if
714702

715-
if (coarsen_silo) then
716-
deallocate (coarse_x_cb)
717-
if (n > 0) then
718-
deallocate (coarse_y_cb)
719-
if (p > 0) deallocate (coarse_z_cb)
720-
end if
721-
end if
722-
723703
deallocate (proc_coords)
724704

725705
deallocate (adv)

src/post_process/m_mpi_proxy.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ contains
166166
& 'E_wrt', 'pres_wrt', 'gamma_wrt', &
167167
& 'heat_ratio_wrt', 'pi_inf_wrt', 'pres_inf_wrt', 'cons_vars_wrt', &
168168
& 'prim_vars_wrt', 'c_wrt', 'qm_wrt','schlieren_wrt', 'bubbles', &
169-
& 'polytropic', 'fourier_decomp', 'polydisperse' ]
169+
& 'polytropic', 'polydisperse' ]
170170
call MPI_BCAST(${VAR}$, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)
171171
#:endfor
172172

src/post_process/m_start_up.f90

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,8 @@ subroutine s_read_input_file() ! ---------------------------------------
5353
omega_wrt, qm_wrt, schlieren_wrt, schlieren_alpha, &
5454
fd_order, mixture_err, alt_soundspeed, &
5555
flux_lim, flux_wrt, cyl_coord, &
56-
parallel_io, coarsen_silo, fourier_decomp, &
57-
rhoref, pref, bubbles, qbmm, sigR, R0ref, nb, &
58-
polytropic, thermal, Ca, Web, Re_inv, &
56+
parallel_io, rhoref, pref, bubbles, qbmm, sigR, &
57+
R0ref, nb, polytropic, thermal, Ca, Web, Re_inv, &
5958
polydisperse, poly_sigma
6059

6160
! Inquiring the status of the post_process.inp file

src/pre_process/m_global_parameters.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,20 +461,20 @@ contains
461461
V0(:) = 1d0
462462
else if (nb > 1) then
463463
V0(:) = 1d0
464+
!R0 and weight initialized in s_simpson
464465
else
465466
stop 'Invalid value of nb'
466467
end if
467468

468-
print *, 'R0 weights: ', weight(:)
469-
print *, 'R0 abscissas: ', R0(:)
470-
469+
!Initialize pref,rhoref for polytropic qbmm (done in s_initialize_nonpoly for non-polytropic)
471470
if(.not. qbmm) then
472471
if ( polytropic ) then
473472
rhoref = 1.d0
474473
pref = 1.d0
475474
end if
476475
end if
477476

477+
!Initialize pb0,pv,pref,rhoref for polytropic qbmm (done in s_initialize_nonpoly for non-polytropic)
478478
if(qbmm) then
479479
if(polytropic) then
480480
allocate(pb0(nb))

src/pre_process/m_mpi_proxy.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ contains
5454
5555
#:for VAR in [ 'old_grid','old_ic','stretch_x','stretch_y','stretch_z',&
5656
& 'cyl_coord','adv_alphan','mpp_lim','hypoelasticity', &
57-
& 'parallel_io', 'perturb_flow','perturb_sph', 'bubbles', &
58-
& 'polytropic', 'polydisperse', 'qbmm' ]
57+
& 'parallel_io', 'perturb_flow', 'vel_profile', 'instability_wave', 'perturb_sph', &
58+
'bubbles', 'polytropic', 'polydisperse', 'qbmm' ]
5959
call MPI_BCAST(${VAR}$, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)
6060
#:endfor
6161
call MPI_BCAST(fluid_rho(1), num_fluids_max, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)

src/simulation/m_data_output.fpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ contains
411411
if (icfl_max_glb /= icfl_max_glb) then
412412
call s_mpi_abort('ICFL is NaN. Exiting ...')
413413
elseif (icfl_max_glb > 1d0) then
414-
!call s_mpi_abort('ICFL is greater than 1.0. Exiting ...')
415414
print *, 'icfl', icfl_max_glb
415+
call s_mpi_abort('ICFL is greater than 1.0. Exiting ...')
416416
end if
417417
end if
418418

@@ -557,6 +557,7 @@ contains
557557
do i = 1, sys_size
558558
!$acc update host(q_prim_vf(i)%sf(:,:,:))
559559
end do
560+
! q_prim_vf(bubxb) stores the value of nb needed in riemann solvers, so replace with true primitive value (=1d0)
560561
if(qbmm) then
561562
q_prim_vf(bubxb)%sf = 1d0
562563
end if

src/simulation/m_global_parameters.fpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,17 +587,20 @@ contains
587587
V0(:) = 1d0
588588
else if (nb > 1) then
589589
V0(:) = 1d0
590+
!R0 and weight initialized in s_simpson
590591
else
591592
stop 'Invalid value of nb'
592593
end if
593594

595+
!Initialize pref,rhoref for polytropic qbmm (done in s_initialize_nonpoly for non-polytropic)
594596
if(.not. qbmm) then
595597
if (polytropic) then
596598
rhoref = 1.d0
597599
pref = 1.d0
598600
end if
599601
end if
600602

603+
!Initialize pb0, pv, pref, rhoref for polytropic qbmm (done in s_initialize_nonpoly for non-polytropic)
601604
if(qbmm) then
602605
if(polytropic) then
603606
pv = fluid_pp(1)%pv

0 commit comments

Comments
 (0)