Skip to content

Commit 7975c3f

Browse files
committed
[cleanup] ran mfc.sh format pass
1 parent 6b4ce43 commit 7975c3f

16 files changed

+130
-157
lines changed

src/common/include/macros.fpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535

3636
#:enddef DEALLOCATE_GLOBAL
3737

38-
3938
#:def ACC_SETUP_VFs(*args)
4039
#ifdef _CRAYFTN
4140
block

src/common/m_phase_change.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ module m_phase_change
5353

5454
contains
5555

56-
!> This subroutine should dispatch to the correct relaxation solver based
56+
!> This subroutine should dispatch to the correct relaxation solver based
5757
!! some parameter. It replaces the procedure pointer, which CCE
5858
!! is breaking on.
5959
subroutine s_relaxation_solver(q_cons_vf)
@@ -587,7 +587,7 @@ contains
587587
!! @param q_cons_vf Cell-average conservative variables
588588
!! @param TJac Transpose of the Jacobian Matrix
589589
subroutine s_compute_jacobian_matrix(InvJac, j, Jac, k, l, mCPD, mCVGP, mCVGP2, pS, q_cons_vf, TJac)
590-
590+
591591
#ifdef _CRAYFTN
592592
!DIR$ INLINEALWAYS s_compute_jacobian_matrix
593593
#else

src/common/m_variables_conversion.fpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ module m_variables_conversion
5555
!$acc declare create(gammas, gs_min, pi_infs, ps_inf, cvs, qvs, qvps)
5656
#endif
5757

58-
5958
real(kind(0d0)), allocatable, dimension(:) :: Gs
6059
integer, allocatable, dimension(:) :: bubrs
6160
real(kind(0d0)), allocatable, dimension(:, :) :: Res
@@ -83,28 +82,28 @@ contains
8382
!! @param pi_inf Liquid stiffness function
8483
!! @param qv Fluid reference energy
8584
subroutine s_convert_to_mixture_variables(q_vf, i, j, k, &
86-
rho, gamma, pi_inf, qv, Re_K, G_K, G)
85+
rho, gamma, pi_inf, qv, Re_K, G_K, G)
8786

8887
type(scalar_field), dimension(sys_size), intent(in) :: q_vf
8988
integer, intent(in) :: i, j, k
9089
real(kind(0d0)), intent(out), target :: rho, gamma, pi_inf, qv
9190
real(kind(0d0)), optional, dimension(2), intent(out) :: Re_K
9291
real(kind(0d0)), optional, intent(out) :: G_K
9392
real(kind(0d0)), optional, dimension(num_fluids), intent(in) :: G
94-
93+
9594
if (model_eqns == 1) then ! Gamma/pi_inf model
9695
call s_convert_mixture_to_mixture_variables(q_vf, i, j, k, &
97-
rho, gamma, pi_inf, qv, Re_K, G_K, G)
96+
rho, gamma, pi_inf, qv, Re_K, G_K, G)
9897

9998
else if (bubbles) then
10099
call s_convert_species_to_mixture_variables_bubbles(q_vf, i, j, k, &
101-
rho, gamma, pi_inf, qv, Re_K, G_K, G)
100+
rho, gamma, pi_inf, qv, Re_K, G_K, G)
102101
else
103102
! Volume fraction model
104103
call s_convert_species_to_mixture_variables(q_vf, i, j, k, &
105-
rho, gamma, pi_inf, qv, Re_K, G_K, G)
104+
rho, gamma, pi_inf, qv, Re_K, G_K, G)
106105
end if
107-
106+
108107
end subroutine s_convert_to_mixture_variables
109108

110109
!> This procedure conditionally calculates the appropriate pressure
@@ -1373,7 +1372,6 @@ contains
13731372
end if
13741373
#endif
13751374

1376-
13771375
end subroutine s_finalize_variables_conversion_module
13781376

13791377
#ifndef MFC_PRE_PROCESS

src/simulation/m_acoustic_src.fpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ module m_acoustic_src
5757
type(source_spatial_type), dimension(:), allocatable :: source_spatials !< Data of non-zero source grid points for each source
5858
!$acc declare create(source_spatials)
5959

60-
6160
contains
6261

6362
!> This subroutine initializes the acoustic source module

src/simulation/m_bubbles.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module m_bubbles
2424
real(kind(0.d0)) :: chi_vw !< Bubble wall properties (Ando 2010)
2525
real(kind(0.d0)) :: k_mw !< Bubble wall properties (Ando 2010)
2626
real(kind(0.d0)) :: rho_mw !< Bubble wall properties (Ando 2010)
27-
!$acc declare create(chi_vw, k_mw, rho_mw)
27+
!$acc declare create(chi_vw, k_mw, rho_mw)
2828

2929
real(kind(0d0)), allocatable, dimension(:, :, :) :: bub_adv_src
3030
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: bub_r_src, bub_v_src, bub_p_src, bub_m_src

src/simulation/m_cbc.fpp

Lines changed: 40 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,11 @@ module m_cbc
4444
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: q_prim_rsy_vf
4545
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: q_prim_rsz_vf
4646

47-
4847
type(scalar_field), allocatable, dimension(:) :: F_rs_vf, F_src_rs_vf !<
4948

5049
!! Cell-average fluxes (src - source). These are directly determined from the
5150
!! cell-average primitive variables, q_prims_rs_vf, and not a Riemann solver.
5251

53-
5452
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: F_rsx_vf, F_src_rsx_vf !<
5553
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: F_rsy_vf, F_src_rsy_vf !<
5654
real(kind(0d0)), allocatable, dimension(:, :, :, :) :: F_rsz_vf, F_src_rsz_vf !<
@@ -64,11 +62,10 @@ module m_cbc
6462
!$acc declare create(c, Re)
6563

6664
real(kind(0d0)) :: dpres_ds !< Spatial derivatives in s-dir of pressure
67-
!$acc declare create(dpres_ds)
65+
!$acc declare create(dpres_ds)
6866

6967
real(kind(0d0)), allocatable, dimension(:) :: ds !< Cell-width distribution in the s-direction
7068

71-
7269
! CBC Coefficients =========================================================
7370

7471
real(kind(0d0)), allocatable, dimension(:, :) :: fd_coef_x !< Finite diff. coefficients x-dir
@@ -97,13 +94,12 @@ module m_cbc
9794
integer :: dj
9895
integer :: bcxb, bcxe, bcyb, bcye, bczb, bcze
9996
integer :: cbc_dir, cbc_loc
100-
!$acc declare create(dj, bcxb, bcxe, bcyb, bcye, bczb, bcze, cbc_dir, cbc_loc)
101-
102-
!$acc declare create(q_prim_rsx_vf, q_prim_rsy_vf, q_prim_rsz_vf, F_rsx_vf, F_src_rsx_vf,flux_rsx_vf_l, flux_src_rsx_vf_l, &
103-
!$acc F_rsy_vf, F_src_rsy_vf,flux_rsy_vf_l, flux_src_rsy_vf_l, F_rsz_vf, F_src_rsz_vf,flux_rsz_vf_l, flux_src_rsz_vf_l, &
104-
!$acc ds,fd_coef_x,fd_coef_y,fd_coef_z, &
105-
!$acc pi_coef_x,pi_coef_y,pi_coef_z)
97+
!$acc declare create(dj, bcxb, bcxe, bcyb, bcye, bczb, bcze, cbc_dir, cbc_loc)
10698

99+
!$acc declare create(q_prim_rsx_vf, q_prim_rsy_vf, q_prim_rsz_vf, F_rsx_vf, F_src_rsx_vf,flux_rsx_vf_l, flux_src_rsx_vf_l, &
100+
!$acc F_rsy_vf, F_src_rsy_vf,flux_rsy_vf_l, flux_src_rsy_vf_l, F_rsz_vf, F_src_rsz_vf,flux_rsz_vf_l, flux_src_rsz_vf_l, &
101+
!$acc ds,fd_coef_x,fd_coef_y,fd_coef_z, &
102+
!$acc pi_coef_x,pi_coef_y,pi_coef_z)
107103

108104
contains
109105

@@ -657,9 +653,9 @@ contains
657653
do r = is3%beg, is3%end
658654
do k = is2%beg, is2%end
659655
flux_rs${XYZ}$_vf_l(0, k, r, i) = F_rs${XYZ}$_vf(0, k, r, i) &
660-
+ pi_coef_${XYZ}$ (0, 0, cbc_loc)* &
661-
(F_rs${XYZ}$_vf(1, k, r, i) - &
662-
F_rs${XYZ}$_vf(0, k, r, i))
656+
+ pi_coef_${XYZ}$ (0, 0, cbc_loc)* &
657+
(F_rs${XYZ}$_vf(1, k, r, i) - &
658+
F_rs${XYZ}$_vf(0, k, r, i))
663659
end do
664660
end do
665661
end do
@@ -669,9 +665,9 @@ contains
669665
do r = is3%beg, is3%end
670666
do k = is2%beg, is2%end
671667
flux_src_rs${XYZ}$_vf_l(0, k, r, i) = F_src_rs${XYZ}$_vf(0, k, r, i) + &
672-
(F_src_rs${XYZ}$_vf(1, k, r, i) - &
673-
F_src_rs${XYZ}$_vf(0, k, r, i)) &
674-
*pi_coef_${XYZ}$ (0, 0, cbc_loc)
668+
(F_src_rs${XYZ}$_vf(1, k, r, i) - &
669+
F_src_rs${XYZ}$_vf(0, k, r, i)) &
670+
*pi_coef_${XYZ}$ (0, 0, cbc_loc)
675671
end do
676672
end do
677673
end do
@@ -690,15 +686,15 @@ contains
690686
do r = is3%beg, is3%end
691687
do k = is2%beg, is2%end
692688
flux_rs${XYZ}$_vf_l(j, k, r, i) = F_rs${XYZ}$_vf(j, k, r, i) &
693-
+ pi_coef_${XYZ}$ (j, 0, cbc_loc)* &
694-
(F_rs${XYZ}$_vf(3, k, r, i) - &
695-
F_rs${XYZ}$_vf(2, k, r, i)) &
696-
+ pi_coef_${XYZ}$ (j, 1, cbc_loc)* &
697-
(F_rs${XYZ}$_vf(2, k, r, i) - &
698-
F_rs${XYZ}$_vf(1, k, r, i)) &
699-
+ pi_coef_${XYZ}$ (j, 2, cbc_loc)* &
700-
(F_rs${XYZ}$_vf(1, k, r, i) - &
701-
F_rs${XYZ}$_vf(0, k, r, i))
689+
+ pi_coef_${XYZ}$ (j, 0, cbc_loc)* &
690+
(F_rs${XYZ}$_vf(3, k, r, i) - &
691+
F_rs${XYZ}$_vf(2, k, r, i)) &
692+
+ pi_coef_${XYZ}$ (j, 1, cbc_loc)* &
693+
(F_rs${XYZ}$_vf(2, k, r, i) - &
694+
F_rs${XYZ}$_vf(1, k, r, i)) &
695+
+ pi_coef_${XYZ}$ (j, 2, cbc_loc)* &
696+
(F_rs${XYZ}$_vf(1, k, r, i) - &
697+
F_rs${XYZ}$_vf(0, k, r, i))
702698
end do
703699
end do
704700
end do
@@ -710,15 +706,15 @@ contains
710706
do r = is3%beg, is3%end
711707
do k = is2%beg, is2%end
712708
flux_src_rs${XYZ}$_vf_l(j, k, r, i) = F_src_rs${XYZ}$_vf(j, k, r, i) + &
713-
(F_src_rs${XYZ}$_vf(3, k, r, i) - &
714-
F_src_rs${XYZ}$_vf(2, k, r, i)) &
715-
*pi_coef_${XYZ}$ (j, 0, cbc_loc) + &
716-
(F_src_rs${XYZ}$_vf(2, k, r, i) - &
717-
F_src_rs${XYZ}$_vf(1, k, r, i)) &
718-
*pi_coef_${XYZ}$ (j, 1, cbc_loc) + &
719-
(F_src_rs${XYZ}$_vf(1, k, r, i) - &
720-
F_src_rs${XYZ}$_vf(0, k, r, i)) &
721-
*pi_coef_${XYZ}$ (j, 2, cbc_loc)
709+
(F_src_rs${XYZ}$_vf(3, k, r, i) - &
710+
F_src_rs${XYZ}$_vf(2, k, r, i)) &
711+
*pi_coef_${XYZ}$ (j, 0, cbc_loc) + &
712+
(F_src_rs${XYZ}$_vf(2, k, r, i) - &
713+
F_src_rs${XYZ}$_vf(1, k, r, i)) &
714+
*pi_coef_${XYZ}$ (j, 1, cbc_loc) + &
715+
(F_src_rs${XYZ}$_vf(1, k, r, i) - &
716+
F_src_rs${XYZ}$_vf(0, k, r, i)) &
717+
*pi_coef_${XYZ}$ (j, 2, cbc_loc)
722718
end do
723719
end do
724720
end do
@@ -905,23 +901,23 @@ contains
905901
!$acc loop seq
906902
do i = 1, contxe
907903
flux_rs${XYZ}$_vf_l(-1, k, r, i) = flux_rs${XYZ}$_vf_l(0, k, r, i) &
908-
+ ds(0)*dalpha_rho_dt(i)
904+
+ ds(0)*dalpha_rho_dt(i)
909905
end do
910906

911907
!$acc loop seq
912908
do i = momxb, momxe
913909
flux_rs${XYZ}$_vf_l(-1, k, r, i) = flux_rs${XYZ}$_vf_l(0, k, r, i) &
914-
+ ds(0)*(vel(i - contxe)*drho_dt &
915-
+ rho*dvel_dt(i - contxe))
910+
+ ds(0)*(vel(i - contxe)*drho_dt &
911+
+ rho*dvel_dt(i - contxe))
916912
end do
917913

918914
flux_rs${XYZ}$_vf_l(-1, k, r, E_idx) = flux_rs${XYZ}$_vf_l(0, k, r, E_idx) &
919-
+ ds(0)*(pres*dgamma_dt &
920-
+ gamma*dpres_dt &
921-
+ dpi_inf_dt &
922-
+ dqv_dt &
923-
+ rho*vel_dv_dt_sum &
924-
+ 5d-1*drho_dt*vel_K_sum)
915+
+ ds(0)*(pres*dgamma_dt &
916+
+ gamma*dpres_dt &
917+
+ dpi_inf_dt &
918+
+ dqv_dt &
919+
+ rho*vel_dv_dt_sum &
920+
+ 5d-1*drho_dt*vel_K_sum)
925921

926922
if (riemann_solver == 1) then
927923
!$acc loop seq
@@ -945,7 +941,7 @@ contains
945941
!$acc loop seq
946942
do i = advxb, advxe
947943
flux_rs${XYZ}$_vf_l(-1, k, r, i) = flux_rs${XYZ}$_vf_l(0, k, r, i) + &
948-
ds(0)*dadv_dt(i - E_idx)
944+
ds(0)*dadv_dt(i - E_idx)
949945
end do
950946

951947
!$acc loop seq

src/simulation/m_fftw.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ module m_fftw
4949
!! Filtered complex data in Fourier space
5050

5151
#if defined(MFC_OpenACC)
52-
!$acc declare create(real_size, cmplx_size, x_size, batch_size, Nfq)
52+
!$acc declare create(real_size, cmplx_size, x_size, batch_size, Nfq)
5353

5454
real(kind(0d0)), allocatable, target :: data_real_gpu(:)
5555
complex(kind(0d0)), allocatable, target :: data_cmplx_gpu(:)
5656
complex(kind(0d0)), allocatable, target :: data_fltr_cmplx_gpu(:)
57-
!$acc declare create(data_real_gpu, data_cmplx_gpu, data_fltr_cmplx_gpu)
57+
!$acc declare create(data_real_gpu, data_cmplx_gpu, data_fltr_cmplx_gpu)
5858

5959
#if defined(__PGI)
6060
integer :: fwd_plan_gpu, bwd_plan_gpu

src/simulation/m_global_parameters.fpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,7 @@ module m_global_parameters
380380
!$acc declare create(nb)
381381
#:endif
382382

383-
!$acc declare create(R0ref, Ca, Web, Re_inv, bubbles, polytropic, polydisperse, qbmm, nmomsp, nmomtot, R0_type, bubble_model, thermal, poly_sigma, adv_n, adap_dt, pi_fac)
384-
383+
!$acc declare create(R0ref, Ca, Web, Re_inv, bubbles, polytropic, polydisperse, qbmm, nmomsp, nmomtot, R0_type, bubble_model, thermal, poly_sigma, adv_n, adap_dt, pi_fac)
385384

386385
type(scalar_field), allocatable, dimension(:) :: mom_sp
387386
type(scalar_field), allocatable, dimension(:, :, :) :: mom_3d
@@ -432,9 +431,8 @@ module m_global_parameters
432431

433432
!$acc declare create(momxb, momxe, advxb, advxe, contxb, contxe, intxb, intxe, bubxb, bubxe, strxb, strxe, chemxb, chemxe)
434433

435-
436434
real(kind(0d0)), allocatable, dimension(:) :: gammas, gs_min, pi_infs, ps_inf, cvs, qvs, qvps
437-
!$acc declare create(gammas, gs_min, pi_infs, ps_inf, cvs, qvs, qvps)
435+
!$acc declare create(gammas, gs_min, pi_infs, ps_inf, cvs, qvs, qvps)
438436
#
439437

440438
real(kind(0d0)) :: mytime !< Current simulation time
@@ -447,7 +445,7 @@ module m_global_parameters
447445
type(pres_field), allocatable, dimension(:) :: mv_ts
448446

449447
!$acc declare create(pb_ts, mv_ts)
450-
448+
451449
! ======================================================================
452450

453451
contains

src/simulation/m_hypoelastic.fpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ module m_hypoelastic
2222
private; public :: s_initialize_hypoelastic_module, &
2323
s_compute_hypoelastic_rhs
2424

25-
2625
real(kind(0d0)), allocatable, dimension(:) :: Gs
2726
!$acc declare create(Gs)
2827

@@ -34,7 +33,6 @@ module m_hypoelastic
3433
real(kind(0d0)), allocatable, dimension(:, :, :) :: rho_K_field, G_K_field
3534
!$acc declare create(rho_K_field, G_K_field)
3635

37-
3836
contains
3937

4038
subroutine s_initialize_hypoelastic_module

src/simulation/m_ibm.fpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ module m_ibm
3737
s_finalize_ibm_module
3838

3939
type(integer_field), public :: ib_markers
40-
!$acc declare create(ib_markers)
41-
40+
!$acc declare create(ib_markers)
4241

4342
!! Marker for solid cells. 0 if liquid, the patch id of its IB if solid
4443
real(kind(0d0)), dimension(:, :, :, :), allocatable :: levelset
@@ -51,7 +50,6 @@ module m_ibm
5150

5251
!$acc declare create(levelset, levelset_norm, ghost_points, inner_points)
5352

54-
5553
integer :: gp_layers !< Number of ghost point layers
5654
integer :: num_gps !< Number of ghost points
5755
integer :: num_inner_gps !< Number of ghost points

0 commit comments

Comments
 (0)