Skip to content

Commit

Permalink
Final touches
Browse files Browse the repository at this point in the history
fixed tests not passing

loop reordering

fix bug in the saving of performance data

removed too much code
  • Loading branch information
wilfonba committed Sep 18, 2023
1 parent 37cfd3e commit a21d9ac
Show file tree
Hide file tree
Showing 13 changed files with 216 additions and 248 deletions.
11 changes: 0 additions & 11 deletions src/common/m_derived_types.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,6 @@ module m_derived_types
integer :: end
end type int_bounds_info

type bc_bounds_info
integer :: beg
integer :: end
real(kind(0d0)) :: vel1b
real(kind(0d0)) :: vel2b
real(kind(0d0)) :: vel3b
real(kind(0d0)) :: vel1e
real(kind(0d0)) :: vel2e
real(kind(0d0)) :: vel3e
end type bc_bounds_info

!> Derived type adding beginning (beg) and end bounds info as attributes
type bounds_info
real(kind(0d0)) :: beg
Expand Down
14 changes: 7 additions & 7 deletions src/post_process/m_checker.f90
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ subroutine s_check_inputs()
'weno_order. Exiting ...')

! Constraints on the boundary conditions in the x-direction
elseif (bc_x%beg < -17 .or. bc_x%beg > -1 .or. bc_x%beg == -14) then
elseif (bc_x%beg < -16 .or. bc_x%beg > -1 .or. bc_x%beg == -14) then
call s_mpi_abort('Unsupported choice for the value of '// &
'bc_x%beg. Exiting ...')
elseif (bc_x%end < -17 .or. bc_x%end > -1 .or. bc_x%beg == -14) then
elseif (bc_x%end < -16 .or. bc_x%end > -1 .or. bc_x%beg == -14) then
call s_mpi_abort('Unsupported choice for the value of '// &
'bc_x%end. Exiting ...')
elseif ((bc_x%beg == -1 .and. bc_x%end /= -1) &
Expand All @@ -126,16 +126,16 @@ subroutine s_check_inputs()
.or. &
(cyl_coord .and. p == 0)) &
.and. &
(bc_y%beg < -17 .or. bc_y%beg > -1 .or. bc_y%beg == -14)) &
(bc_y%beg < -16 .or. bc_y%beg > -1 .or. bc_y%beg == -14)) &
.or. &
(cyl_coord .and. p > 0 &
.and. &
(bc_y%beg < -17 .or. bc_y%beg > -1)))) then
(bc_y%beg < -16 .or. bc_y%beg > -1)))) then
call s_mpi_abort('Unsupported choice for the value of '// &
'bc_y%beg. Exiting ...')
elseif (bc_y%end /= dflt_int &
.and. &
(bc_y%end < -17 .or. bc_y%end > -1 .or. bc_y%end == -14)) then
(bc_y%end < -16 .or. bc_y%end > -1 .or. bc_y%end == -14)) then
call s_mpi_abort('Unsupported choice for the value of '// &
'bc_y%end. Exiting ...')
elseif ((n == 0 .and. bc_y%beg /= dflt_int) &
Expand All @@ -160,12 +160,12 @@ subroutine s_check_inputs()
! Constraints on the boundary conditions in the z-direction
elseif (bc_z%beg /= dflt_int &
.and. &
(bc_z%beg < -17 .or. bc_z%beg > -1 .or. bc_z%beg == -14)) then
(bc_z%beg < -16 .or. bc_z%beg > -1 .or. bc_z%beg == -14)) then
call s_mpi_abort('Unsupported choice for the value of '// &
'bc_z%beg. Exiting ...')
elseif (bc_z%end /= dflt_int &
.and. &
(bc_z%end < -17 .or. bc_z%end > -1 .or. bc_z%end == -14)) then
(bc_z%end < -16 .or. bc_z%end > -1 .or. bc_z%end == -14)) then
call s_mpi_abort('Unsupported choice for the value of '// &
'bc_z%end. Exiting ...')
elseif (any((/bc_x%beg, bc_x%end, bc_y%beg, bc_y%end, bc_z%beg, bc_z%end/) == -13)) then
Expand Down
16 changes: 4 additions & 12 deletions src/post_process/m_global_parameters.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ module m_global_parameters

!> @name Boundary conditions in the x-, y- and z-coordinate directions
!> @{
type(bc_bounds_info) :: bc_x, bc_y, bc_z
type(int_bounds_info) :: bc_x, bc_y, bc_z
!> @}

logical :: parallel_io !< Format of the data files
Expand Down Expand Up @@ -271,17 +271,9 @@ contains
alt_soundspeed = .false.
hypoelasticity = .false.

#:for DIR in ['x', 'y', 'z']
#:for PARAM in ['beg', 'end']
bc_${DIR}$%${PARAM}$ = dflt_int
#:endfor
#:endfor

#:for DIR in ['x', 'y', 'z']
#:for PARAM in ['vel1b', 'vel2b', 'vel3b', 'vel1e', 'vel2e', 'vel3e']
bc_${DIR}$%${PARAM}$ = dflt_real
#:endfor
#:endfor
bc_x%beg = dflt_int; bc_x%end = dflt_int
bc_y%beg = dflt_int; bc_y%end = dflt_int
bc_z%beg = dflt_int; bc_z%end = dflt_int

! Fluids physical parameters
do i = 1, num_fluids_max
Expand Down
14 changes: 7 additions & 7 deletions src/pre_process/m_checker.f90
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,10 @@ subroutine s_check_inputs()
'weno_order. Exiting ...')

! Constraints on the boundary conditions in the x-direction
elseif (bc_x%beg < -17 .or. bc_x%beg > -1 .or. bc_x%beg == -14) then
elseif (bc_x%beg < -16 .or. bc_x%beg > -1 .or. bc_x%beg == -14) then
call s_mpi_abort('Unsupported choice for the value of '// &
'bc_x%beg. Exiting ...')
elseif (bc_x%end < -17 .or. bc_x%end > -1 .or. bc_x%beg == -14) then
elseif (bc_x%end < -16 .or. bc_x%end > -1 .or. bc_x%beg == -14) then
call s_mpi_abort('Unsupported choice for the value of '// &
'bc_x%end. Exiting ...')
elseif ((bc_x%beg == -1 .and. bc_x%end /= -1) &
Expand All @@ -429,7 +429,7 @@ subroutine s_check_inputs()
'bc_y%beg. Exiting ...')
elseif (bc_y%end /= dflt_int &
.and. &
(bc_y%end < -17 .or. bc_y%end > -1 .or. bc_y%end == -14)) then
(bc_y%end < -16 .or. bc_y%end > -1 .or. bc_y%end == -14)) then
call s_mpi_abort('Unsupported choice for the value of '// &
'bc_y%end. Exiting ...')
elseif ((n > 0 .and. bc_y%beg == dflt_int)) then
Expand Down Expand Up @@ -475,12 +475,12 @@ subroutine s_check_inputs()
! Constraints on the boundary conditions in the y-direction
if (bc_y%beg /= dflt_int &
.and. &
(bc_y%beg < -17 .or. bc_y%beg > -1 .or. bc_y%beg == -14)) then
(bc_y%beg < -16 .or. bc_y%beg > -1 .or. bc_y%beg == -14)) then
call s_mpi_abort('Unsupported choice for the value of '// &
'bc_y%beg. Exiting ...')
elseif (bc_y%end /= dflt_int &
.and. &
(bc_y%end < -17 .or. bc_y%end > -1 .or. bc_y%end == -14)) then
(bc_y%end < -16 .or. bc_y%end > -1 .or. bc_y%end == -14)) then
call s_mpi_abort('Unsupported choice for the value of '// &
'bc_y%end. Exiting ...')
elseif ((n == 0 .and. bc_y%beg /= dflt_int) &
Expand All @@ -505,12 +505,12 @@ subroutine s_check_inputs()
! Constraints on the boundary conditions in the z-direction
elseif (bc_z%beg /= dflt_int &
.and. &
(bc_z%beg < -17 .or. bc_z%beg > -1 .or. bc_z%beg == -14)) then
(bc_z%beg < -16 .or. bc_z%beg > -1 .or. bc_z%beg == -14)) then
call s_mpi_abort('Unsupported choice for the value of '// &
'bc_z%beg. Exiting ...')
elseif (bc_z%end /= dflt_int &
.and. &
(bc_z%end < -17 .or. bc_z%end > -1 .or. bc_z%end == -14)) then
(bc_z%end < -16 .or. bc_z%end > -1 .or. bc_z%end == -14)) then
call s_mpi_abort('Unsupported choice for the value of '// &
'bc_z%end. Exiting ...')
elseif (any((/bc_x%beg, bc_x%end, bc_y%beg, bc_y%end, bc_z%beg, bc_z%end/) == -13)) then
Expand Down
16 changes: 4 additions & 12 deletions src/pre_process/m_global_parameters.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ module m_global_parameters
integer :: pi_inf_idx !< Index of liquid stiffness func. eqn.
type(int_bounds_info) :: stress_idx !< Indexes of elastic shear stress eqns.

type(bc_bounds_info) :: bc_x, bc_y, bc_z !<
type(int_bounds_info) :: bc_x, bc_y, bc_z !<
!! Boundary conditions in the x-, y- and z-coordinate directions

logical :: parallel_io !< Format of the data files
Expand Down Expand Up @@ -244,17 +244,9 @@ contains

hypoelasticity = .false.

#:for DIR in ['x', 'y', 'z']
#:for PARAM in ['beg', 'end']
bc_${DIR}$%${PARAM}$ = dflt_int
#:endfor
#:endfor

#:for DIR in ['x', 'y', 'z']
#:for PARAM in ['vel1b', 'vel2b', 'vel3b', 'vel1e', 'vel2e', 'vel3e']
bc_${DIR}$%${PARAM}$ = dflt_real
#:endfor
#:endfor
bc_x%beg = dflt_int; bc_x%end = dflt_int
bc_y%beg = dflt_int; bc_y%end = dflt_int
bc_z%beg = dflt_int; bc_z%end = dflt_int

parallel_io = .false.
precision = 2
Expand Down
Loading

0 comments on commit a21d9ac

Please sign in to comment.