Skip to content

Commit 554d68b

Browse files
committed
prettify
1 parent 642dcb8 commit 554d68b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4774
-4939
lines changed

src/common/include/inline_conversions.fpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,37 +12,37 @@
1212

1313
integer :: q
1414

15-
if (alt_soundspeed) then
16-
blkmod1 = ((gammas(1) + 1d0)*pres + &
17-
pi_infs(1))/gammas(1)
18-
blkmod2 = ((gammas(2) + 1d0)*pres + &
19-
pi_infs(2))/gammas(2)
20-
c = (1d0/(rho*(adv(1)/blkmod1 + adv(2)/blkmod2)))
21-
elseif (model_eqns == 3) then
22-
c = 0d0
23-
!$acc loop seq
24-
do q = 1, num_fluids
25-
c = c + adv(q)*(1d0/gammas(q) + 1d0)* &
26-
(pres + pi_infs(q)/(gammas(q) + 1d0))
27-
end do
15+
if (alt_soundspeed) then
16+
blkmod1 = ((gammas(1) + 1d0)*pres + &
17+
pi_infs(1))/gammas(1)
18+
blkmod2 = ((gammas(2) + 1d0)*pres + &
19+
pi_infs(2))/gammas(2)
20+
c = (1d0/(rho*(adv(1)/blkmod1 + adv(2)/blkmod2)))
21+
elseif (model_eqns == 3) then
22+
c = 0d0
23+
!$acc loop seq
24+
do q = 1, num_fluids
25+
c = c + adv(q)*(1d0/gammas(q) + 1d0)* &
26+
(pres + pi_infs(q)/(gammas(q) + 1d0))
27+
end do
2828
c = c/rho
2929

3030
elseif (((model_eqns == 4) .or. (model_eqns == 2 .and. bubbles))) then
3131
! Sound speed for bubble mmixture to order O(\alpha)
3232

3333
if (mpp_lim .and. (num_fluids > 1)) then
3434
c = (1d0/gamma + 1d0)* &
35-
(pres + pi_inf/(gamma+1d0))/rho
35+
(pres + pi_inf/(gamma + 1d0))/rho
3636
else
3737
c = &
38-
(1d0/gamma + 1d0)* &
39-
(pres + pi_inf/(gamma + 1d0)) / &
40-
(rho * (1d0 - adv(num_fluids)))
38+
(1d0/gamma + 1d0)* &
39+
(pres + pi_inf/(gamma + 1d0))/ &
40+
(rho*(1d0 - adv(num_fluids)))
4141
end if
4242

43-
else
44-
c = ((H - 5d-1*vel_sum)/gamma)
45-
end if
43+
else
44+
c = ((H - 5d-1*vel_sum)/gamma)
45+
end if
4646

4747
if (mixture_err .and. c < 0d0) then
4848
c = 100.d0*sgm_eps

src/common/include/macros.fpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@
44
use iso_fortran_env, only: output_unit
55

66
print *, '${_FILE_.split('/')[-1]}$:${_LINE_}$: ', ${expr}$
7-
call flush(output_unit)
7+
call flush (output_unit)
88
end block
99
#endif
1010
#:enddef
1111

1212
#:def ALLOCATE(*args)
1313
@:LOG({'@:ALLOCATE(${re.sub(' +', ' ', ', '.join(args))}$)'})
14-
allocate(${', '.join(args)}$)
14+
allocate (${', '.join(args)}$)
1515
#:if MFC_COMPILER == 'Cray'
16-
!$acc enter data create(${', '.join([ arg.split('(')[0] for arg in args ])}$)
16+
!$acc enter data create(${', '.join([ arg.split('(')[0] for arg in args ])}$)
1717
#:else
18-
!$acc enter data create(${', '.join(args)}$)
18+
!$acc enter data create(${', '.join(args)}$)
1919
#:endif
2020
#:enddef ALLOCATE
2121

2222
#:def DEALLOCATE(*args)
2323
@:LOG({'@:DEALLOCATE(${re.sub(' +', ' ', ', '.join(args))}$)'})
24-
deallocate(${', '.join(args)}$)
24+
deallocate (${', '.join(args)}$)
2525
!$acc exit data delete(${', '.join(args)}$)
2626
#:enddef DEALLOCATE
2727

src/common/m_compile_specific.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ subroutine s_get_cwd(cwd)
7070
end subroutine s_get_cwd
7171

7272
subroutine s_get_basename(dirpath, basename)
73-
character(LEN=*), intent(IN) :: dirpath
73+
character(LEN=*), intent(IN) :: dirpath
7474
character(LEN=*), intent(OUT) :: basename
7575

76-
integer :: iUnit
76+
integer :: iUnit
7777
character(len=30) :: tmpfilepath
7878

7979
write (tmpfilepath, '(A,I0)') 'basename_', proc_rank
@@ -84,8 +84,8 @@ subroutine s_get_basename(dirpath, basename)
8484
call system('basename "'//trim(dirpath)//'" > '//trim(tmpfilepath))
8585
#endif
8686

87-
open (newunit=iUnit, FILE=trim(tmpfilepath), FORM='formatted', STATUS='old')
88-
read (iUnit, '(A)') basename
87+
open (newunit=iUnit, FILE=trim(tmpfilepath), FORM='formatted', STATUS='old')
88+
read (iUnit, '(A)') basename
8989
close (iUnit)
9090

9191
call s_delete_file(trim(tmpfilepath))

src/common/m_constants.fpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
module m_constants
66

77
character, parameter :: dflt_char = ' ' !< Default string value
8-
8+
99
real(kind(0d0)), parameter :: dflt_real = -1d6 !< Default real value
10-
real(kind(0d0)), parameter :: sgm_eps = 1d-16 !< Segmentation tolerance
10+
real(kind(0d0)), parameter :: sgm_eps = 1d-16 !< Segmentation tolerance
1111
real(kind(0d0)), parameter :: small_alf = 1d-7 !< Small alf tolerance
12-
real(kind(0d0)), parameter :: pi = 3.141592653589793d0 !< Pi
12+
real(kind(0d0)), parameter :: pi = 3.141592653589793d0 !< Pi
1313
real(kind(0d0)), parameter :: verysmall = 1.d-12 !< Very small number
14-
15-
integer, parameter :: num_stcls_min = 5 !< Minimum # of stencils
16-
integer, parameter :: path_len = 400 !< Maximum path length
17-
integer, parameter :: name_len = 50 !< Maximum name length
18-
integer, parameter :: dflt_int = -100 !< Default integer value
19-
integer, parameter :: fourier_rings = 5 !< Fourier filter ring limit
20-
integer, parameter :: num_fluids_max = 10 !< Maximum number of fluids in the simulation
21-
integer, parameter :: num_probes_max = 10 !< Maximum number of flow probes in the simulation
14+
15+
integer, parameter :: num_stcls_min = 5 !< Minimum # of stencils
16+
integer, parameter :: path_len = 400 !< Maximum path length
17+
integer, parameter :: name_len = 50 !< Maximum name length
18+
integer, parameter :: dflt_int = -100 !< Default integer value
19+
integer, parameter :: fourier_rings = 5 !< Fourier filter ring limit
20+
integer, parameter :: num_fluids_max = 10 !< Maximum number of fluids in the simulation
21+
integer, parameter :: num_probes_max = 10 !< Maximum number of flow probes in the simulation
2222
integer, parameter :: num_patches_max = 10
23-
integer, parameter :: pathlen_max = 400
24-
integer, parameter :: nnode = 4 !< Number of QBMM nodes
23+
integer, parameter :: pathlen_max = 400
24+
integer, parameter :: nnode = 4 !< Number of QBMM nodes
2525

2626
end module m_constants

src/common/m_delay_file_access.f90

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
module m_delay_file_access
22
implicit none
33
private
4-
4+
55
public :: &
6-
DelayFileAccess
7-
8-
integer, private, parameter :: &
6+
DelayFileAccess
7+
8+
integer, private, parameter :: &
99
N_PROCESSES_FILE_ACCESS = 128, &
10-
FILE_ACCESS_DELAY_UNIT = 10000
11-
12-
contains
13-
14-
subroutine DelayFileAccess ( ProcessRank )
15-
16-
integer, intent ( in ) :: &
17-
ProcessRank
18-
19-
integer :: &
20-
iDelay, &
21-
nFileAccessDelayIterations
22-
real(kind(0d0)) :: &
23-
Number, &
24-
Dummy
25-
26-
nFileAccessDelayIterations &
27-
= ( ProcessRank / N_PROCESSES_FILE_ACCESS ) * FILE_ACCESS_DELAY_UNIT
28-
29-
do iDelay = 1, nFileAccessDelayIterations
30-
!-- wait my turn
31-
call random_number ( Number )
32-
Dummy = Number * Number
33-
end do
34-
10+
FILE_ACCESS_DELAY_UNIT = 10000
11+
12+
contains
13+
14+
subroutine DelayFileAccess(ProcessRank)
15+
16+
integer, intent(in) :: &
17+
ProcessRank
18+
19+
integer :: &
20+
iDelay, &
21+
nFileAccessDelayIterations
22+
real(kind(0d0)) :: &
23+
Number, &
24+
Dummy
25+
26+
nFileAccessDelayIterations &
27+
= (ProcessRank/N_PROCESSES_FILE_ACCESS)*FILE_ACCESS_DELAY_UNIT
28+
29+
do iDelay = 1, nFileAccessDelayIterations
30+
!-- wait my turn
31+
call random_number(Number)
32+
Dummy = Number*Number
33+
end do
34+
3535
end subroutine DelayFileAccess
3636

37-
end module m_delay_file_access
37+
end module m_delay_file_access

src/common/m_derived_types.fpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
module m_derived_types
1010

1111
use m_constants !< Constants
12-
12+
1313
implicit none
1414

1515
!> Derived type adding the field position (fp) as an attribute
@@ -96,7 +96,7 @@ module m_derived_types
9696
end type t_bbox
9797

9898
type :: t_model
99-
integer :: ntrs ! Number of triangles
99+
integer :: ntrs ! Number of triangles
100100
type(t_triangle), allocatable :: trs(:) ! Triangles
101101
end type t_model
102102

@@ -156,7 +156,6 @@ module m_derived_types
156156
real(kind(0d0)) :: qv !<
157157
real(kind(0d0)) :: qvp !<
158158

159-
160159
!! Primitive variables associated with the patch. In order, these include
161160
!! the partial densities, density, velocity, pressure, volume fractions,
162161
!! specific heat ratio function and the liquid stiffness function.
@@ -181,9 +180,9 @@ module m_derived_types
181180
real(kind(0d0)) :: gamma !< Sp. heat ratio
182181
real(kind(0d0)) :: pi_inf !< Liquid stiffness
183182
real(kind(0d0)), dimension(2) :: Re !< Reynolds number
184-
REAL(KIND(0d0)) :: cv !< heat capacity
185-
REAL(KIND(0d0)) :: qv !< reference energy per unit mass for SGEOS, q (see Le Metayer (2004))
186-
REAL(KIND(0d0)) :: qvp !< reference entropy per unit mass for SGEOS, q' (see Le Metayer (2004))
183+
real(kind(0d0)) :: cv !< heat capacity
184+
real(kind(0d0)) :: qv !< reference energy per unit mass for SGEOS, q (see Le Metayer (2004))
185+
real(kind(0d0)) :: qvp !< reference entropy per unit mass for SGEOS, q' (see Le Metayer (2004))
187186
real(kind(0d0)) :: mul0 !< Bubble viscosity
188187
real(kind(0d0)) :: ss !< Bubble surface tension
189188
real(kind(0d0)) :: pv !< Bubble vapour pressure

0 commit comments

Comments
 (0)