Skip to content

Commit ecd0c1c

Browse files
committed
fypp
1 parent 7dcd1cb commit ecd0c1c

File tree

1 file changed

+13
-46
lines changed

1 file changed

+13
-46
lines changed

src/simulation/m_data_output.fpp

Lines changed: 13 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2039,60 +2039,27 @@ contains
20392039
end if
20402040

20412041
if (num_procs > 1) then
2042-
tmp = rho
2043-
call s_mpi_allreduce_sum(tmp, rho)
2042+
#:for VAR in ['rho','pres','gamma','pi_inf','c','accel']
2043+
tmp = ${VAR}$
2044+
call s_mpi_allreduce_sum(tmp, ${VAR}$)
2045+
#:endfor
2046+
20442047
do s = 1, num_dims
20452048
tmp = vel(s)
20462049
call s_mpi_allreduce_sum(tmp, vel(s))
20472050
end do
2048-
tmp = pres
2049-
call s_mpi_allreduce_sum(tmp, pres)
2050-
tmp = gamma
2051-
call s_mpi_allreduce_sum(tmp, gamma)
2052-
tmp = pi_inf
2053-
call s_mpi_allreduce_sum(tmp, pi_inf)
2054-
tmp = c
2055-
call s_mpi_allreduce_sum(tmp, c)
2056-
tmp = accel
2057-
call s_mpi_allreduce_sum(tmp, accel)
20582051

20592052
if (bubbles) then
2060-
tmp = alf
2061-
call s_mpi_allreduce_sum(tmp, alf)
2062-
tmp = alfgr
2063-
call s_mpi_allreduce_sum(tmp, alfgr)
2064-
tmp = nbub
2065-
call s_mpi_allreduce_sum(tmp, nbub)
2066-
tmp = nR(1)
2067-
call s_mpi_allreduce_sum(tmp, nR(1))
2068-
tmp = nRdot(1)
2069-
call s_mpi_allreduce_sum(tmp, nRdot(1))
2070-
tmp = M00
2071-
call s_mpi_allreduce_sum(tmp, M00)
2072-
tmp = R(1)
2073-
call s_mpi_allreduce_sum(tmp, R(1))
2074-
tmp = Rdot(1)
2075-
call s_mpi_allreduce_sum(tmp, Rdot(1))
2076-
tmp = ptilde
2077-
call s_mpi_allreduce_sum(tmp, ptilde)
2078-
tmp = ptot
2079-
call s_mpi_allreduce_sum(tmp, ptot)
2053+
#:for VAR in ['alf','alfgr','nbub','nR(1)','nRdot(1)','M00','R(1)','Rdot(1)','ptilde','ptot']
2054+
tmp = ${VAR}$
2055+
call s_mpi_allreduce_sum(tmp, ${VAR}$)
2056+
#:endfor
20802057

20812058
if (qbmm) then
2082-
tmp = varR
2083-
call s_mpi_allreduce_sum(tmp, varR)
2084-
tmp = varV
2085-
call s_mpi_allreduce_sum(tmp, varV)
2086-
2087-
tmp = M10
2088-
call s_mpi_allreduce_sum(tmp, M10)
2089-
tmp = M01
2090-
call s_mpi_allreduce_sum(tmp, M01)
2091-
tmp = M20
2092-
call s_mpi_allreduce_sum(tmp, M20)
2093-
tmp = M02
2094-
call s_mpi_allreduce_sum(tmp, M02)
2095-
2059+
#:for VAR in ['varR','varV','M10','M01','M20','M02']
2060+
tmp = ${VAR}$
2061+
call s_mpi_allreduce_sum(tmp, ${VAR}$)
2062+
#:endfor
20962063
end if
20972064
end if
20982065

0 commit comments

Comments
 (0)