Skip to content

Commit 71a29e0

Browse files
committed
Fixed single precision output without any consultation with Henry Le Berre
1 parent fdfe245 commit 71a29e0

File tree

7 files changed

+118
-277
lines changed

7 files changed

+118
-277
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/toolchain/cmake")
7171
# === Compiler Flags
7272
if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
7373
add_compile_options(
74-
$<$<COMPILE_LANGUAGE:Fortran>:-fdefault-real-8>
7574
$<$<COMPILE_LANGUAGE:Fortran>:-ffree-line-length-none>
76-
$<$<COMPILE_LANGUAGE:Fortran>:-fdefault-double-8>
7775
)
7876

7977
if (CMAKE_BUILD_TYPE STREQUAL "Debug")

src/post_process/m_checker.f90

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,6 @@ subroutine s_check_inputs()
246246
elseif (precision /= 1 .and. precision /= 2) then
247247
call s_mpi_abort('Unsupported choice for the value of '// &
248248
'precision. Exiting ...')
249-
250-
! Constraints on the option to coarsen the formatted database files
251-
elseif (coarsen_silo .and. format /= 1) then
252-
call s_mpi_abort('Unsupported combination of values of format '// &
253-
'and coarsen_silo. Exiting ...')
254-
elseif (coarsen_silo .and. n == 0) then
255-
call s_mpi_abort('Unsupported combination of values of n '// &
256-
'and coarsen_silo. Exiting ...')
257249
end if
258250

259251
! Constraints on the post-processing of the partial densities

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

Lines changed: 101 additions & 239 deletions
Large diffs are not rendered by default.

src/post_process/m_global_parameters.f90

Lines changed: 12 additions & 21 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.
@@ -285,8 +283,6 @@ subroutine s_assign_default_values_to_user_inputs() ! ------------------
285283

286284
precision = dflt_int
287285

288-
coarsen_silo = .false.
289-
290286
alpha_rho_wrt = .false.
291287
rho_wrt = .false.
292288
mom_wrt = .false.
@@ -572,6 +568,17 @@ subroutine s_initialize_global_parameters_module() ! ----------------------
572568
buff_size = buff_size + fd_number
573569
end if
574570

571+
! Allocating single precision grid variables if needed
572+
if (precision == 1) then
573+
allocate (x_cb_s(-1 - offset_x%beg:m + offset_x%end))
574+
if (n > 0) then
575+
allocate (y_cb_s(-1 - offset_x%beg:n + offset_x%end))
576+
if (p > 0) then
577+
allocate (z_cb_s(-1 - offset_x%beg:m + offset_x%end))
578+
end if
579+
end if
580+
end if
581+
575582
! Allocating the grid variables in the x-coordinate direction
576583
allocate (x_cb(-1 - offset_x%beg:m + offset_x%end))
577584
allocate (x_cc(-buff_size:m + buff_size))
@@ -599,14 +606,6 @@ subroutine s_initialize_global_parameters_module() ! ----------------------
599606

600607
end if
601608

602-
if (coarsen_silo) then
603-
allocate (coarse_x_cb(-1 - offset_x%beg:(m/2) + offset_x%end))
604-
if (n > 0) then
605-
allocate (coarse_y_cb(-1 - offset_y%beg:(n/2) + offset_y%end))
606-
if (p > 0) allocate (coarse_z_cb(-1 - offset_z%beg:(p/2) + offset_z%end))
607-
end if
608-
end if
609-
610609
allocate (adv(num_fluids))
611610

612611
if (cyl_coord .neqv. .true.) then ! Cartesian grid
@@ -812,14 +811,6 @@ subroutine s_finalize_global_parameters_module() ! -------------------
812811

813812
end if
814813

815-
if (coarsen_silo) then
816-
deallocate (coarse_x_cb)
817-
if (n > 0) then
818-
deallocate (coarse_y_cb)
819-
if (p > 0) deallocate (coarse_z_cb)
820-
end if
821-
end if
822-
823814
deallocate (proc_coords)
824815

825816
deallocate (adv)

src/post_process/m_mpi_proxy.fpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,9 @@ contains
163163
164164
#:for VAR in [ 'cyl_coord', 'adv_alphan', 'mpp_lim', 'mixture_err', &
165165
& 'alt_soundspeed', 'hypoelasticity', 'parallel_io', 'rho_wrt', &
166-
& 'coarsen_silo', 'E_wrt', 'pres_wrt', 'gamma_wrt', &
166+
& 'E_wrt', 'pres_wrt', 'gamma_wrt', 'polytropic', 'polydisperse', &
167167
& 'heat_ratio_wrt', 'pi_inf_wrt', 'pres_inf_wrt', 'cons_vars_wrt', &
168-
& 'prim_vars_wrt', 'c_wrt', 'qm_wrt','schlieren_wrt', 'bubbles', &
169-
& 'polytropic', 'polydisperse' ]
168+
& 'prim_vars_wrt', 'c_wrt', 'qm_wrt','schlieren_wrt', 'bubbles']
170169
call MPI_BCAST(${VAR}$, 1, MPI_LOGICAL, 0, MPI_COMM_WORLD, ierr)
171170
#:endfor
172171

src/post_process/m_start_up.f90

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ 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, &
57-
rhoref, pref, bubbles, R0ref, nb, &
56+
parallel_io, rhoref, pref, bubbles, R0ref, nb, &
5857
polytropic, thermal, Ca, Web, Re_inv, &
5958
polydisperse, poly_sigma
6059

toolchain/mfc/run/case_dicts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@
110110

111111
POST_PROCESS = COMMON + [
112112
't_step_start', 't_step_stop', 't_step_save', 'alt_soundspeed',
113-
'mixture_err', 'format', 'coarsen_silo',
113+
'mixture_err', 'format', 'schlieren_wrt', 'schlieren_alpha', 'fd_order',
114114
'fourier_modes%beg', 'fourier_modes%end', 'alpha_rho_wrt', 'rho_wrt',
115115
'mom_wrt', 'vel_wrt', 'flux_lim', 'flux_wrt', 'E_wrt', 'pres_wrt',
116116
'alpha_wrt', 'kappa_wrt', 'gamma_wrt', 'heat_ratio_wrt', 'pi_inf_wrt',
117117
'pres_inf_wrt', 'cons_vars_wrt', 'prim_vars_wrt', 'c_wrt', 'omega_wrt',
118-
'qm_wrt', 'schlieren_wrt', 'schlieren_alpha', 'fd_order'
118+
'qm_wrt'
119119
]
120120

121121
for cmp_id in range(1,3+1):

0 commit comments

Comments
 (0)