diff --git a/src/common/m_compile_specific.f90 b/src/common/m_compile_specific.f90 index 11b8785426..fabc347a29 100644 --- a/src/common/m_compile_specific.f90 +++ b/src/common/m_compile_specific.f90 @@ -5,11 +5,10 @@ !> @brief This module contains subroutines that are compiler specific module m_compile_specific - ! Dependencies ============================================================= + ! Dependencies use m_mpi_proxy implicit none - ! ========================================================================== contains diff --git a/src/common/m_finite_differences.fpp b/src/common/m_finite_differences.fpp index c7fbcb0e9f..3deee10b67 100644 --- a/src/common/m_finite_differences.fpp +++ b/src/common/m_finite_differences.fpp @@ -123,7 +123,7 @@ contains end if - end subroutine s_compute_finite_difference_coefficients ! -------------- + end subroutine s_compute_finite_difference_coefficients end module m_finite_differences diff --git a/src/common/m_helper.fpp b/src/common/m_helper.fpp index a8ee649451..f10f405032 100644 --- a/src/common/m_helper.fpp +++ b/src/common/m_helper.fpp @@ -5,8 +5,6 @@ module m_helper - ! Dependencies ============================================================= - use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -15,8 +13,6 @@ module m_helper use ieee_arithmetic !< For checking NaN - ! ========================================================================== - implicit none private; diff --git a/src/common/m_helper_basic.f90 b/src/common/m_helper_basic.f90 index cd19156571..9a971ae50b 100644 --- a/src/common/m_helper_basic.f90 +++ b/src/common/m_helper_basic.f90 @@ -4,10 +4,7 @@ module m_helper_basic - ! Dependencies ============================================================= - use m_derived_types !< Definitions of the derived types - ! ========================================================================== implicit none diff --git a/src/common/m_mpi_common.fpp b/src/common/m_mpi_common.fpp index ab29b4167f..d504fa17ae 100644 --- a/src/common/m_mpi_common.fpp +++ b/src/common/m_mpi_common.fpp @@ -8,7 +8,6 @@ !! goals for the simulation. module m_mpi_common - ! Dependencies ============================================================= #ifdef MFC_MPI use mpi !< Message passing interface (MPI) module #endif @@ -16,7 +15,6 @@ module m_mpi_common use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters - ! ========================================================================== implicit none diff --git a/src/common/m_phase_change.fpp b/src/common/m_phase_change.fpp index daf0006553..faa554bfec 100644 --- a/src/common/m_phase_change.fpp +++ b/src/common/m_phase_change.fpp @@ -7,8 +7,6 @@ module m_phase_change #ifndef MFC_POST_PROCESS - ! Dependencies ============================================================= - use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -19,8 +17,6 @@ module m_phase_change use ieee_arithmetic - ! ========================================================================== - implicit none private; diff --git a/src/common/m_variables_conversion.fpp b/src/common/m_variables_conversion.fpp index 13cb65025e..a4c8b17dee 100644 --- a/src/common/m_variables_conversion.fpp +++ b/src/common/m_variables_conversion.fpp @@ -11,7 +11,6 @@ !! the mixture variables and the subroutines used to compute pressure. module m_variables_conversion - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -26,8 +25,6 @@ module m_variables_conversion num_species, get_temperature, get_pressure, gas_constant, & get_mixture_molecular_weight, get_mixture_energy_mass - ! ========================================================================== - implicit none private; @@ -1058,7 +1055,7 @@ contains !print *, 'I got here AA' - end subroutine s_convert_conservative_to_primitive_variables ! --------- + end subroutine s_convert_conservative_to_primitive_variables !> The following procedure handles the conversion between !! the primitive variables and the conservative variables. @@ -1380,7 +1377,7 @@ contains #endif end subroutine s_convert_primitive_to_flux_variables - subroutine s_finalize_variables_conversion_module() ! ------------------ + subroutine s_finalize_variables_conversion_module() integer :: i !< Generic loop iterators diff --git a/src/post_process/m_data_input.f90 b/src/post_process/m_data_input.f90 index 667947a40c..9b94a0cbc4 100644 --- a/src/post_process/m_data_input.f90 +++ b/src/post_process/m_data_input.f90 @@ -7,7 +7,6 @@ !! variables and fill out their buffer regions. module m_data_input - ! Dependencies ============================================================= #ifdef MFC_MPI use mpi !< Message passing interface (MPI) module #endif @@ -21,7 +20,6 @@ module m_data_input use m_compile_specific use m_helper - ! ========================================================================== implicit none @@ -33,7 +31,7 @@ module m_data_input s_populate_conservative_variables_buffer_regions, & s_finalize_data_input_module - abstract interface ! =================================================== + abstract interface !> Subroutine for reading data files !! @param t_step Current time-step to input @@ -43,7 +41,7 @@ subroutine s_read_abstract_data_files(t_step) end subroutine s_read_abstract_data_files - end interface ! ======================================================== + end interface type(scalar_field), allocatable, dimension(:), public :: q_cons_vf !< !! Conservative variables @@ -125,7 +123,7 @@ subroutine s_read_serial_data_files(t_step) ' is missing. Exiting ...') end if - ! Reading the Grid Data File for the x-direction =================== + ! Reading the Grid Data File for the x-direction ! Checking whether x_cb.dat exists file_loc = trim(t_step_dir)//'/x_cb.dat' @@ -148,10 +146,7 @@ subroutine s_read_serial_data_files(t_step) ! Computing the cell-center locations x_cc(0:m) = x_cb(-1:m - 1) + dx(0:m)/2._wp - ! ================================================================== - - ! Reading the Grid Data File for the y-direction =================== - + ! Reading the Grid Data File for the y-direction if (n > 0) then ! Checking whether y_cb.dat exists @@ -175,10 +170,7 @@ subroutine s_read_serial_data_files(t_step) ! Computing the cell-center locations y_cc(0:n) = y_cb(-1:n - 1) + dy(0:n)/2._wp - ! ================================================================== - - ! Reading the Grid Data File for the z-direction =================== - + ! Reading the Grid Data File for the z-direction if (p > 0) then ! Checking whether z_cb.dat exists @@ -206,9 +198,7 @@ subroutine s_read_serial_data_files(t_step) end if - ! ================================================================== - - ! Reading the Conservative Variables Data Files ==================== + ! Reading the Conservative Variables Data Files do i = 1, sys_size ! Checking whether the data file associated with the variable @@ -269,8 +259,6 @@ subroutine s_read_serial_data_files(t_step) end if end if - ! ================================================================== - end subroutine s_read_serial_data_files !> This subroutine is called at each time-step that has to @@ -570,7 +558,7 @@ subroutine s_populate_grid_variables_buffer_regions integer :: i !< Generic loop iterator - ! Populating Buffer Regions in the x-direction ===================== + ! Populating Buffer Regions in the x-direction ! Ghost-cell extrapolation BC at the beginning if (bc_x%beg <= -3) then @@ -644,9 +632,9 @@ subroutine s_populate_grid_variables_buffer_regions x_cc(m + i) = x_cc(m + (i - 1)) + (dx(m + (i - 1)) + dx(m + i))/2._wp end do - ! END: Populating Buffer Regions in the x-direction ================ + ! END: Populating Buffer Regions in the x-direction - ! Populating Buffer Regions in the y-direction ===================== + ! Populating Buffer Regions in the y-direction if (n > 0) then @@ -722,9 +710,9 @@ subroutine s_populate_grid_variables_buffer_regions y_cc(n + i) = y_cc(n + (i - 1)) + (dy(n + (i - 1)) + dy(n + i))/2._wp end do - ! END: Populating Buffer Regions in the y-direction ================ + ! END: Populating Buffer Regions in the y-direction - ! Populating Buffer Regions in the z-direction ===================== + ! Populating Buffer Regions in the z-direction if (p > 0) then @@ -804,7 +792,7 @@ subroutine s_populate_grid_variables_buffer_regions end if - ! END: Populating Buffer Regions in the z-direction ================ + ! END: Populating Buffer Regions in the z-direction end subroutine s_populate_grid_variables_buffer_regions @@ -817,7 +805,7 @@ subroutine s_populate_conservative_variables_buffer_regions(q_particle) integer :: i, j, k !< Generic loop iterators - ! Populating Buffer Regions in the x-direction ===================== + ! Populating Buffer Regions in the x-direction ! Ghost-cell extrapolation BC at the beginning if (bc_x%beg <= -3) then @@ -962,9 +950,9 @@ subroutine s_populate_conservative_variables_buffer_regions(q_particle) end if - ! END: Populating Buffer Regions in the x-direction ================ + ! END: Populating Buffer Regions in the x-direction - ! Populating Buffer Regions in the y-direction ===================== + ! Populating Buffer Regions in the y-direction if (n > 0) then @@ -1158,9 +1146,9 @@ subroutine s_populate_conservative_variables_buffer_regions(q_particle) end if - ! END: Populating Buffer Regions in the y-direction ================ + ! END: Populating Buffer Regions in the y-direction - ! Populating Buffer Regions in the z-direction ===================== + ! Populating Buffer Regions in the z-direction if (p > 0) then @@ -1308,7 +1296,7 @@ subroutine s_populate_conservative_variables_buffer_regions(q_particle) end if - ! END: Populating Buffer Regions in the z-direction ================ + ! END: Populating Buffer Regions in the z-direction end subroutine s_populate_conservative_variables_buffer_regions diff --git a/src/post_process/m_data_output.fpp b/src/post_process/m_data_output.fpp index a2813c7d6b..f92d44ad5c 100644 --- a/src/post_process/m_data_output.fpp +++ b/src/post_process/m_data_output.fpp @@ -9,9 +9,6 @@ !! the flow variable(s) that were chosen by the user to be included. module m_data_output - ! Dependencies ============================================================= - ! USE f90_unix_proc ! NAG Compiler Library of UNIX system commands - use m_derived_types ! Definitions of the derived types use m_global_parameters ! Global parameters for the code @@ -23,7 +20,6 @@ module m_data_output use m_compile_specific use m_helper - ! ========================================================================== implicit none @@ -112,7 +108,7 @@ module m_data_output contains - subroutine s_initialize_data_output_module() ! ---------------------------- + subroutine s_initialize_data_output_module() ! Description: Computation of parameters, allocation procedures, and/or ! any other tasks needed to properly setup the module @@ -211,8 +207,7 @@ contains end if end if - ! Generating Silo-HDF5 Directory Tree ============================== - + ! Generating Silo-HDF5 Directory Tree if (format == 1) then ! Creating the directory associated with the local process @@ -251,9 +246,7 @@ contains end if - ! ================================================================== - - ! Generating Binary Directory Tree ================================= + ! Generating Binary Directory Tree else @@ -307,8 +300,6 @@ contains end if end if - ! ================================================================== - ! Contrary to the Silo-HDF5 database format, handles of the Binary ! database master/root and slave/local process files are perfectly ! static throughout post-process. Hence, they are set here so that @@ -318,7 +309,7 @@ contains dbfile = 1 end if - ! Querying Number of Flow Variable(s) in Binary Output ============= + ! Querying Number of Flow Variable(s) in Binary Output if (format == 2) then @@ -430,9 +421,9 @@ contains end if - ! END: Querying Number of Flow Variable(s) in Binary Output ======== + ! END: Querying Number of Flow Variable(s) in Binary Output - end subroutine s_initialize_data_output_module ! -------------------------- + end subroutine s_initialize_data_output_module subroutine s_define_output_region @@ -470,7 +461,7 @@ contains end subroutine s_define_output_region - subroutine s_open_formatted_database_file(t_step) ! -------------------- + subroutine s_open_formatted_database_file(t_step) ! Description: This subroutine opens a new formatted database file, or ! replaces an old one, and readies it for the data storage ! of the grid and the flow variable(s) associated with the @@ -488,7 +479,7 @@ contains ! Generic string used to store the location of a particular file character(LEN=len_trim(case_dir) + 3*name_len) :: file_loc - ! Silo-HDF5 Database Format ======================================== + ! Silo-HDF5 Database Format if (format == 1) then @@ -532,9 +523,7 @@ contains end if - ! ================================================================== - - ! Binary Database Format =========================================== + ! Binary Database Format else @@ -596,11 +585,9 @@ contains end if - ! END: Binary Database Format ====================================== - - end subroutine s_open_formatted_database_file ! ------------------------ + end subroutine s_open_formatted_database_file - subroutine s_open_intf_data_file() ! ------------------------ + subroutine s_open_intf_data_file() character(LEN=path_len + 3*name_len) :: file_path !< !! Relative path to a file in the case directory @@ -614,9 +601,9 @@ contains POSITION='append', & STATUS='unknown') - end subroutine s_open_intf_data_file ! --------------------------------------- + end subroutine s_open_intf_data_file - subroutine s_open_energy_data_file() ! ------------------------ + subroutine s_open_energy_data_file() character(LEN=path_len + 3*name_len) :: file_path !< !! Relative path to a file in the case directory @@ -630,9 +617,9 @@ contains POSITION='append', & STATUS='unknown') - end subroutine s_open_energy_data_file ! ---------------------------------------- + end subroutine s_open_energy_data_file - subroutine s_write_grid_to_formatted_database_file(t_step) ! ----------- + subroutine s_write_grid_to_formatted_database_file(t_step) ! Description: The general objective of this subroutine is to write the ! necessary grid data to the formatted database file, for ! the current time-step, t_step. The local processor will @@ -665,7 +652,7 @@ contains ! Generic loop iterator integer :: i - ! Silo-HDF5 Database Format ======================================== + ! Silo-HDF5 Database Format if (format == 1 .and. n > 0) then @@ -765,9 +752,9 @@ contains end if #:endfor - ! END: Silo-HDF5 Database Format =================================== + ! END: Silo-HDF5 Database Format - ! Binary Database Format =========================================== + ! Binary Database Format elseif (format == 2) then @@ -839,9 +826,7 @@ contains end if - ! ================================================================== - - end subroutine s_write_grid_to_formatted_database_file ! --------------- + end subroutine s_write_grid_to_formatted_database_file subroutine s_write_variable_to_formatted_database_file(varname, t_step) ! Description: The goal of this subroutine is to write to the formatted @@ -878,7 +863,7 @@ contains integer :: i, j, k real(wp) :: start, finish - ! Silo-HDF5 Database Format ======================================== + ! Silo-HDF5 Database Format if (format == 1) then @@ -1065,9 +1050,9 @@ contains end if - ! END: Silo-HDF5 Database Format =================================== + ! END: Silo-HDF5 Database Format - ! Binary Database Format =========================================== + ! Binary Database Format else @@ -1102,9 +1087,7 @@ contains end if - ! ================================================================== - - end subroutine s_write_variable_to_formatted_database_file ! ----------- + end subroutine s_write_variable_to_formatted_database_file !> Subroutine that writes the post processed results in the folder 'lag_bubbles_data' !! @param t_step Current time step @@ -1302,7 +1285,7 @@ contains end do end if - end subroutine s_write_intf_data_file ! ----------------------------------- + end subroutine s_write_intf_data_file subroutine s_write_energy_data_file(q_prim_vf, q_cons_vf) type(scalar_field), dimension(sys_size), intent(IN) :: q_prim_vf, q_cons_vf @@ -1403,7 +1386,7 @@ contains end subroutine s_write_energy_data_file - subroutine s_close_formatted_database_file() ! ------------------------- + subroutine s_close_formatted_database_file() ! Description: The purpose of this subroutine is to close any formatted ! database file(s) that may be opened at the time-step that ! is currently being post-processed. The root process must @@ -1428,21 +1411,21 @@ contains end if - end subroutine s_close_formatted_database_file ! ----------------------- + end subroutine s_close_formatted_database_file - subroutine s_close_intf_data_file() ! ----------------------- + subroutine s_close_intf_data_file() close (211) - end subroutine s_close_intf_data_file !--------------------- + end subroutine s_close_intf_data_file - subroutine s_close_energy_data_file() ! ----------------------- + subroutine s_close_energy_data_file() close (251) - end subroutine s_close_energy_data_file !--------------------- + end subroutine s_close_energy_data_file - subroutine s_finalize_data_output_module() ! ------------------------- + subroutine s_finalize_data_output_module() ! Description: Deallocation procedures for the module ! Deallocating the generic storage employed for the flow variable(s) @@ -1466,6 +1449,6 @@ contains deallocate (dims) end if - end subroutine s_finalize_data_output_module ! ----------------------- + end subroutine s_finalize_data_output_module end module m_data_output diff --git a/src/post_process/m_derived_variables.fpp b/src/post_process/m_derived_variables.fpp index 0f03ccb11f..7fdb620763 100644 --- a/src/post_process/m_derived_variables.fpp +++ b/src/post_process/m_derived_variables.fpp @@ -10,7 +10,6 @@ module m_derived_variables - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters !< Global parameters for the code @@ -18,7 +17,6 @@ module m_derived_variables use m_mpi_proxy !< Message passing interface (MPI) module proxy use m_variables_conversion - ! ========================================================================== implicit none @@ -591,7 +589,7 @@ contains integer :: i, j, k, l !< Generic loop iterators - ! Computing Gradient Magnitude of Density ========================== + ! Computing Gradient Magnitude of Density ! Contributions from the x- and y-coordinate directions do l = -offset_z%beg, p + offset_z%end @@ -644,8 +642,6 @@ contains ! complete the desired calculation. gm_rho_sf = sqrt(gm_rho_sf) - ! ================================================================== - ! Determining the local maximum of the gradient magnitude of density ! and bookkeeping the result, along with rank of the local processor gm_rho_max = (/maxval(gm_rho_sf), real(proc_rank, wp)/) @@ -656,7 +652,7 @@ contains ! the processor on which it has occurred to be recorded. if (num_procs > 1) call s_mpi_reduce_maxloc(gm_rho_max) - ! Computing Numerical Schlieren Function =========================== + ! Computing Numerical Schlieren Function ! The form of the numerical Schlieren function depends on the choice ! of the multicomponent flow model. For the gamma/pi_inf model, the @@ -692,8 +688,6 @@ contains ! the computation, the exponential of the inside quantity is taken. q_sf = exp(q_sf) - ! ================================================================== - end subroutine s_derive_numerical_schlieren_function !> Deallocation procedures for the module diff --git a/src/post_process/m_global_parameters.fpp b/src/post_process/m_global_parameters.fpp index c9f59b8e6c..974c6e3620 100644 --- a/src/post_process/m_global_parameters.fpp +++ b/src/post_process/m_global_parameters.fpp @@ -9,7 +9,6 @@ !! state and finally, the formatted database file(s) structure. module m_global_parameters - ! Dependencies ============================================================= #ifdef MFC_MPI use mpi !< Message passing interface (MPI) module #endif @@ -20,8 +19,6 @@ module m_global_parameters use m_thermochem, only: num_species, species_names - ! ========================================================================== - implicit none !> @name Logistics @@ -30,7 +27,7 @@ module m_global_parameters character(LEN=path_len) :: case_dir !< Case folder location !> @} - ! Computational Domain Parameters ========================================== + ! Computational Domain Parameters integer :: proc_rank !< Rank of the local processor @@ -96,8 +93,6 @@ module m_global_parameters ! of the defragmented computational domain. They are only used in 1D. For ! serial simulations, they are equal to m, x_cb and x_cc, respectively. - ! ========================================================================== - !> @name Simulation Algorithm Parameters !> @{ integer :: model_eqns !< Multicomponent flow model @@ -180,18 +175,15 @@ module m_global_parameters !> @} integer, private :: ierr - ! ========================================================================== type(physical_parameters), dimension(num_fluids_max) :: fluid_pp !< !! Database of the physical parameters of each of the fluids that is present !! in the flow. These include the stiffened gas equation of state parameters, !! the Reynolds numbers and the Weber numbers. - ! ========================================================================== - real(wp), allocatable, dimension(:) :: adv !< Advection variables - ! Formatted Database File(s) Structure Parameters ========================== + ! Formatted Database File(s) Structure Parameters integer :: format !< Format of the database file(s) @@ -259,8 +251,6 @@ module m_global_parameters !! it is a measure of the half-size of the finite-difference stencil for the !! selected order of accuracy. - ! ========================================================================== - !> @name Reference parameters for Tait EOS !> @{ real(wp) :: rhoref, pref @@ -457,7 +447,7 @@ contains ! Setting m_root equal to m in the case of a 1D serial simulation if (num_procs == 1 .and. n == 0) m_root = m - ! Gamma/Pi_inf Model =============================================== + ! Gamma/Pi_inf Model if (model_eqns == 1) then ! Setting number of fluids @@ -477,9 +467,7 @@ contains pi_inf_idx = adv_idx%end sys_size = adv_idx%end - ! ================================================================== - - ! Volume Fraction Model (5-equation model) ========================= + ! Volume Fraction Model (5-equation model) else if (model_eqns == 2) then ! Annotating structure of the state and flux vectors belonging @@ -598,9 +586,7 @@ contains sys_size = c_idx end if - ! ================================================================== - - ! Volume Fraction Model (6-equation model) ========================= + ! Volume Fraction Model (6-equation model) else if (model_eqns == 3) then ! Annotating structure of the state and flux vectors belonging @@ -788,7 +774,7 @@ contains buff_size = buff_size + fd_number end if - ! Configuring Coordinate Direction Indexes ========================= + ! Configuring Coordinate Direction Indexes idwint(1)%beg = 0; idwint(2)%beg = 0; idwint(3)%beg = 0 idwint(1)%end = m; idwint(2)%end = n; idwint(3)%end = p @@ -799,7 +785,6 @@ contains idwbuff(1)%end = idwint(1)%end - idwbuff(1)%beg idwbuff(2)%end = idwint(2)%end - idwbuff(2)%beg idwbuff(3)%end = idwint(3)%end - idwbuff(3)%beg - ! ================================================================== ! Allocating single precision grid variables if needed if (precision == 1) then diff --git a/src/post_process/m_mpi_proxy.fpp b/src/post_process/m_mpi_proxy.fpp index acbba5ca6a..7ac265ef9a 100644 --- a/src/post_process/m_mpi_proxy.fpp +++ b/src/post_process/m_mpi_proxy.fpp @@ -9,7 +9,6 @@ !! for the post-process. module m_mpi_proxy - ! Dependencies ============================================================= #ifdef MFC_MPI use mpi !< Message passing interface (MPI) module #endif @@ -21,7 +20,6 @@ module m_mpi_proxy use m_mpi_common use ieee_arithmetic - ! ========================================================================== implicit none @@ -243,7 +241,7 @@ contains ! equivalent piece of the computational domain. Note that explicit ! type-casting is omitted here for code legibility purposes. - ! Generating 3D Cartesian Processor Topology ======================= + ! Generating 3D Cartesian Processor Topology if (n > 0) then @@ -381,9 +379,9 @@ contains call MPI_CART_COORDS(MPI_COMM_CART, proc_rank, 3, & proc_coords, ierr) - ! END: Generating 3D Cartesian Processor Topology ================== + ! END: Generating 3D Cartesian Processor Topology - ! Sub-domain Global Parameters in z-direction ====================== + ! Sub-domain Global Parameters in z-direction ! Number of remaining cells after majority is distributed rem_cells = mod(p + 1, num_procs_z) @@ -436,9 +434,8 @@ contains start_idx(3) = (p + 1)*proc_coords(3) + rem_cells end if end if - ! ================================================================== - ! Generating 2D Cartesian Processor Topology ======================= + ! Generating 2D Cartesian Processor Topology else @@ -504,9 +501,9 @@ contains end if - ! END: Generating 2D Cartesian Processor Topology ================== + ! END: Generating 2D Cartesian Processor Topology - ! Sub-domain Global Parameters in y-direction ====================== + ! Sub-domain Global Parameters in y-direction ! Number of remaining cells after majority has been distributed rem_cells = mod(n + 1, num_procs_y) @@ -559,9 +556,8 @@ contains start_idx(2) = (n + 1)*proc_coords(2) + rem_cells end if end if - ! ================================================================== - ! Generating 1D Cartesian Processor Topology ======================= + ! Generating 1D Cartesian Processor Topology else @@ -585,9 +581,7 @@ contains end if - ! ================================================================== - - ! Sub-domain Global Parameters in x-direction ====================== + ! Sub-domain Global Parameters in x-direction ! Number of remaining cells after majority has been distributed rem_cells = mod(m + 1, num_procs_x) @@ -638,7 +632,6 @@ contains start_idx(1) = (m + 1)*proc_coords(1) + rem_cells end if end if - ! ================================================================== #endif @@ -658,7 +651,7 @@ contains #ifdef MFC_MPI - ! Communications in the x-direction ================================ + ! Communications in the x-direction if (sweep_coord == 'x') then @@ -716,9 +709,9 @@ contains end if - ! END: Communications in the x-direction =========================== + ! END: Communications in the x-direction - ! Communications in the y-direction ================================ + ! Communications in the y-direction elseif (sweep_coord == 'y') then @@ -776,9 +769,9 @@ contains end if - ! END: Communications in the y-direction =========================== + ! END: Communications in the y-direction - ! Communications in the z-direction ================================ + ! Communications in the z-direction else @@ -838,7 +831,7 @@ contains end if - ! END: Communications in the z-direction =========================== + ! END: Communications in the z-direction #endif @@ -869,7 +862,7 @@ contains integer :: i, j, k, l, r !< Generic loop iterators - ! Communications in the x-direction ================================ + ! Communications in the x-direction if (sweep_coord == 'x') then @@ -1061,9 +1054,9 @@ contains end if - ! END: Communications in the x-direction =========================== + ! END: Communications in the x-direction - ! Communications in the y-direction ================================ + ! Communications in the y-direction elseif (sweep_coord == 'y') then @@ -1269,9 +1262,9 @@ contains end if - ! END: Communications in the y-direction =========================== + ! END: Communications in the y-direction - ! Communications in the z-direction ================================ + ! Communications in the z-direction else @@ -1489,7 +1482,7 @@ contains end if - ! END: Communications in the z-direction =========================== + ! END: Communications in the z-direction #endif diff --git a/src/post_process/m_start_up.f90 b/src/post_process/m_start_up.f90 index 8978211207..86f4419648 100644 --- a/src/post_process/m_start_up.f90 +++ b/src/post_process/m_start_up.f90 @@ -8,7 +8,7 @@ !! MPI decomposition and I/O procedures module m_start_up - ! Dependencies ============================================================= + ! Dependencies use m_derived_types !< Definitions of the derived types @@ -41,8 +41,6 @@ module m_start_up use m_chemistry - ! ========================================================================== - implicit none contains @@ -255,7 +253,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) fd_number, fd_order, offset_z) end if - ! Adding the partial densities to the formatted database file ---------- + ! Adding the partial densities to the formatted database file if ((model_eqns == 2) .or. (model_eqns == 3) .or. (model_eqns == 4)) then do i = 1, num_fluids if (alpha_rho_wrt(i) .or. (cons_vars_wrt .or. prim_vars_wrt)) then @@ -272,9 +270,8 @@ subroutine s_save_data(t_step, varname, pres, c, H) end if end do end if - ! ---------------------------------------------------------------------- - ! Adding the density to the formatted database file -------------------- + ! Adding the density to the formatted database file if (rho_wrt & .or. & (model_eqns == 1 .and. (cons_vars_wrt .or. prim_vars_wrt))) then @@ -285,9 +282,8 @@ subroutine s_save_data(t_step, varname, pres, c, H) varname(:) = ' ' end if - ! ---------------------------------------------------------------------- - ! Adding the momentum to the formatted database file ------------------- + ! Adding the momentum to the formatted database file do i = 1, E_idx - mom_idx%beg if (mom_wrt(i) .or. cons_vars_wrt) then q_sf = q_cons_vf(i + cont_idx%end)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) @@ -298,9 +294,8 @@ subroutine s_save_data(t_step, varname, pres, c, H) end if end do - ! ---------------------------------------------------------------------- - ! Adding the velocity to the formatted database file ------------------- + ! Adding the velocity to the formatted database file do i = 1, E_idx - mom_idx%beg if (vel_wrt(i) .or. prim_vars_wrt) then q_sf = q_prim_vf(i + cont_idx%end)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) @@ -311,7 +306,6 @@ subroutine s_save_data(t_step, varname, pres, c, H) end if end do - ! ---------------------------------------------------------------------- ! Adding the species' concentrations to the formatted database file ---- if (chemistry) then @@ -347,9 +341,8 @@ subroutine s_save_data(t_step, varname, pres, c, H) varname(:) = ' ' end if end do - ! ---------------------------------------------------------------------- - ! Adding the energy to the formatted database file --------------------- + ! Adding the energy to the formatted database file if (E_wrt .or. cons_vars_wrt) then q_sf = q_cons_vf(E_idx)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A)') 'E' @@ -358,8 +351,8 @@ subroutine s_save_data(t_step, varname, pres, c, H) varname(:) = ' ' end if - ! ---------------------------------------------------------------------- - ! Adding the elastic shear stresses to the formatted database file ----- + + ! Adding the elastic shear stresses to the formatted database file if (elasticity) then do i = 1, stress_idx%end - stress_idx%beg + 1 if (prim_vars_wrt) then @@ -370,6 +363,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) varname(:) = ' ' end do end if + if (hyperelasticity) then do i = 1, xiend - xibeg + 1 if (prim_vars_wrt) then @@ -381,9 +375,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) end do end if - ! ---------------------------------------------------------------------- - - ! Adding the pressure to the formatted database file ------------------- + ! Adding the pressure to the formatted database file if (pres_wrt .or. prim_vars_wrt) then q_sf = q_prim_vf(E_idx)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) write (varname, '(A)') 'pres' @@ -392,9 +384,8 @@ subroutine s_save_data(t_step, varname, pres, c, H) varname(:) = ' ' end if - ! ---------------------------------------------------------------------- - ! Adding the volume fraction(s) to the formatted database file --------- + ! Adding the volume fraction(s) to the formatted database file if (((model_eqns == 2) .and. (bubbles_euler .neqv. .true.)) & .or. (model_eqns == 3) & ) then @@ -422,9 +413,8 @@ subroutine s_save_data(t_step, varname, pres, c, H) end if end if - ! ---------------------------------------------------------------------- - ! Adding specific heat ratio function to formatted database file ------- + ! Adding specific heat ratio function to formatted database file if (gamma_wrt & .or. & (model_eqns == 1 .and. (cons_vars_wrt .or. prim_vars_wrt))) then @@ -435,9 +425,8 @@ subroutine s_save_data(t_step, varname, pres, c, H) varname(:) = ' ' end if - ! ---------------------------------------------------------------------- - ! Adding the specific heat ratio to the formatted database file -------- + ! Adding the specific heat ratio to the formatted database file if (heat_ratio_wrt) then call s_derive_specific_heat_ratio(q_sf) @@ -448,9 +437,8 @@ subroutine s_save_data(t_step, varname, pres, c, H) varname(:) = ' ' end if - ! ---------------------------------------------------------------------- - ! Adding liquid stiffness function to formatted database file ---------- + ! Adding liquid stiffness function to formatted database file if (pi_inf_wrt & .or. & (model_eqns == 1 .and. (cons_vars_wrt .or. prim_vars_wrt))) then @@ -461,9 +449,8 @@ subroutine s_save_data(t_step, varname, pres, c, H) varname(:) = ' ' end if - ! ---------------------------------------------------------------------- - ! Adding the liquid stiffness to the formatted database file ----------- + ! Adding the liquid stiffness to the formatted database file if (pres_inf_wrt) then call s_derive_liquid_stiffness(q_sf) @@ -474,9 +461,8 @@ subroutine s_save_data(t_step, varname, pres, c, H) varname(:) = ' ' end if - ! ---------------------------------------------------------------------- - ! Adding the sound speed to the formatted database file ---------------- + ! Adding the sound speed to the formatted database file if (c_wrt) then do k = -offset_z%beg, p + offset_z%end do j = -offset_y%beg, n + offset_y%end @@ -505,9 +491,8 @@ subroutine s_save_data(t_step, varname, pres, c, H) varname(:) = ' ' end if - ! ---------------------------------------------------------------------- - ! Adding the vorticity to the formatted database file ------------------ + ! Adding the vorticity to the formatted database file if (p > 0) then do i = 1, E_idx - mom_idx%beg if (omega_wrt(i)) then @@ -533,7 +518,6 @@ subroutine s_save_data(t_step, varname, pres, c, H) end if end do end if - ! ---------------------------------------------------------------------- if (ib) then q_sf = real(ib_markers%sf(-offset_x%beg:m + offset_x%end, -offset_y%beg:n + offset_y%end, -offset_z%beg:p + offset_z%end)) @@ -541,7 +525,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) call s_write_variable_to_formatted_database_file(varname, t_step) end if - ! Adding Q_M to the formatted database file ------------------ + ! Adding Q_M to the formatted database file if (p > 0 .and. qm_wrt) then call s_derive_qm(q_prim_vf, q_sf) @@ -550,9 +534,8 @@ subroutine s_save_data(t_step, varname, pres, c, H) varname(:) = ' ' end if - ! ---------------------------------------------------------------------- - ! Adding numerical Schlieren function to formatted database file ------- + ! Adding numerical Schlieren function to formatted database file if (schlieren_wrt) then call s_derive_numerical_schlieren_function(q_cons_vf, q_sf) @@ -563,7 +546,6 @@ subroutine s_save_data(t_step, varname, pres, c, H) varname(:) = ' ' end if - ! ---------------------------------------------------------------------- ! Adding the color function to formatted database file if (cf_wrt) then @@ -573,9 +555,8 @@ subroutine s_save_data(t_step, varname, pres, c, H) varname(:) = ' ' end if - ! ---------------------------------------------------------------------- - ! Adding the volume fraction(s) to the formatted database file --------- + ! Adding the volume fraction(s) to the formatted database file if (bubbles_euler) then do i = adv_idx%beg, adv_idx%end q_sf = q_cons_vf(i)%sf(x_beg:x_end, y_beg:y_end, z_beg:z_end) @@ -585,7 +566,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) end do end if - ! Adding the bubble variables to the formatted database file --------- + ! Adding the bubble variables to the formatted database file if (bubbles_euler) then !nR do i = 1, nb @@ -629,7 +610,7 @@ subroutine s_save_data(t_step, varname, pres, c, H) end if end if - ! Adding the lagrangian subgrid variables to the formatted database file --------- + ! Adding the lagrangian subgrid variables to the formatted database file if (bubbles_lagrange) then !! Void fraction field q_sf = 1._wp - q_particle(1)%sf( & diff --git a/src/post_process/p_main.fpp b/src/post_process/p_main.fpp index ec611ca529..59b69e3b07 100644 --- a/src/post_process/p_main.fpp +++ b/src/post_process/p_main.fpp @@ -12,11 +12,8 @@ !! and the numerical Schlieren function. program p_main - ! Dependencies ============================================================= use m_global_parameters !< Global parameters for the code - use m_start_up - ! ========================================================================== implicit none @@ -42,7 +39,7 @@ program p_main t_step = t_step_start end if - ! Time-Marching Loop ======================================================= + ! Time-Marching Loop do ! If all time-steps are not ready to be post-processed and one rank is @@ -81,7 +78,7 @@ program p_main end if end do - ! END: Time-Marching Loop ================================================== + ! END: Time-Marching Loop close (11) diff --git a/src/pre_process/m_assign_variables.fpp b/src/pre_process/m_assign_variables.fpp index 9a2fce58fd..b6304949d0 100644 --- a/src/pre_process/m_assign_variables.fpp +++ b/src/pre_process/m_assign_variables.fpp @@ -6,7 +6,6 @@ module m_assign_variables - ! Dependencies ============================================================= use m_derived_types ! Definitions of the derived types use m_global_parameters ! Global parameters for the code @@ -17,9 +16,6 @@ module m_assign_variables use m_thermochem, only: num_species, gas_constant, get_mixture_molecular_weight - ! one form to another - ! ========================================================================== - implicit none public :: s_perturb_primitive @@ -355,7 +351,7 @@ contains orig_gamma, & orig_pi_inf, orig_qv) - ! Computing Mixture Variables of Current Patch ===================== + ! Computing Mixture Variables of Current Patch ! Volume fraction(s) do i = adv_idx%beg, adv_idx%end @@ -391,9 +387,7 @@ contains patch_icpp(patch_id)%pi_inf, & patch_icpp(patch_id)%qv) - ! ================================================================== - - ! Computing Mixture Variables of Smoothing Patch =================== + ! Computing Mixture Variables of Smoothing Patch if (model_eqns /= 4) then ! Partial densities @@ -471,8 +465,6 @@ contains patch_icpp(smooth_patch_id)%pi_inf, & patch_icpp(smooth_patch_id)%qv) - ! ================================================================== - ! Pressure q_prim_vf(E_idx)%sf(j, k, l) = & (eta*patch_icpp(patch_id)%pres & diff --git a/src/pre_process/m_check_ib_patches.fpp b/src/pre_process/m_check_ib_patches.fpp index d5ab5c5a72..40debc4d62 100644 --- a/src/pre_process/m_check_ib_patches.fpp +++ b/src/pre_process/m_check_ib_patches.fpp @@ -5,7 +5,6 @@ module m_check_ib_patches - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters !< Global parameters @@ -24,7 +23,6 @@ module m_check_ib_patches use m_helper_basic !< Functions to compare floating point numbers use m_helper - ! ========================================================================== implicit none diff --git a/src/pre_process/m_check_patches.fpp b/src/pre_process/m_check_patches.fpp index 7bbb2ea57d..a92cac471c 100644 --- a/src/pre_process/m_check_patches.fpp +++ b/src/pre_process/m_check_patches.fpp @@ -7,7 +7,7 @@ module m_check_patches - ! Dependencies ============================================================= + ! Dependencies use m_derived_types !< Definitions of the derived types use m_global_parameters !< Global parameters for the code @@ -26,7 +26,6 @@ module m_check_patches use m_helper_basic !< Functions to compare floating point numbers use m_helper - ! ========================================================================== implicit none @@ -546,7 +545,7 @@ contains !@:ASSERT(any(patch_icpp(patch_id)%Y(1:num_species) > verysmall), "Patch " // trim(iStr) // ".") end if - end subroutine s_check_active_patch_primitive_variables ! -------------- + end subroutine s_check_active_patch_primitive_variables !> This subroutine verifies that the primitive variables !! associated with the given inactive patch remain unaltered diff --git a/src/pre_process/m_compute_levelset.fpp b/src/pre_process/m_compute_levelset.fpp index a79b26c0fd..3caad2cddd 100644 --- a/src/pre_process/m_compute_levelset.fpp +++ b/src/pre_process/m_compute_levelset.fpp @@ -8,16 +8,12 @@ !! boundary methods (IBMs) module m_compute_levelset - ! Dependencies ============================================================= - use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters use m_mpi_proxy !< Message passing interface (MPI) module proxy - ! ========================================================================== - implicit none private; public :: s_cylinder_levelset, s_circle_levelset, & diff --git a/src/pre_process/m_data_output.fpp b/src/pre_process/m_data_output.fpp index 2c1403f5f6..dca7f5a607 100644 --- a/src/pre_process/m_data_output.fpp +++ b/src/pre_process/m_data_output.fpp @@ -9,7 +9,6 @@ !! file pre_process.inp. module m_data_output - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters !< Global parameters for the code @@ -32,8 +31,6 @@ module m_data_output use m_thermochem, only: species_names - ! ========================================================================== - implicit none private; @@ -43,7 +40,7 @@ module m_data_output s_initialize_data_output_module, & s_finalize_data_output_module - abstract interface ! =================================================== + abstract interface !> Interface for the conservative data !! @param q_cons_vf Conservative variables @@ -73,7 +70,7 @@ module m_data_output intent(IN) :: levelset_norm end subroutine s_write_abstract_data_files - end interface ! ======================================================== + end interface character(LEN=path_len + 2*name_len), private :: t_step_dir !< !! Time-step folder into which grid and initial condition data will be placed @@ -139,7 +136,7 @@ contains t_step = 0 - ! Outputting the Locations of the Cell-boundaries ================== + ! Outputting the Locations of the Cell-boundaries if (old_grid) then status = 'old' @@ -172,9 +169,7 @@ contains end if end if - ! ================================================================== - - ! Outputting IB Markers ================================ + ! Outputting IB Markers file_loc = trim(t_step_dir)//'/ib.dat' open (1, FILE=trim(file_loc), FORM='unformatted', STATUS=status) @@ -199,9 +194,8 @@ contains end if end do end if - ! ================================================================== - ! Outtputting Levelset Info ============================ + ! Outtputting Levelset Info file_loc = trim(t_step_dir)//'/levelset.dat' open (1, FILE=trim(file_loc), FORM='unformatted', STATUS=status) @@ -214,7 +208,7 @@ contains write (1) levelset_norm%sf close (1) - ! Outputting Conservative Variables ================================ + ! Outputting Conservative Variables do i = 1, sys_size write (file_num, '(I0)') i file_loc = trim(t_step_dir)//'/q_cons_vf'//trim(file_num) & @@ -251,7 +245,6 @@ contains end do end do end if - ! ================================================================== gamma = fluid_pp(1)%gamma lit_gamma = 1._wp/fluid_pp(1)%gamma + 1._wp diff --git a/src/pre_process/m_global_parameters.fpp b/src/pre_process/m_global_parameters.fpp index d7563cd301..17e1d450ea 100644 --- a/src/pre_process/m_global_parameters.fpp +++ b/src/pre_process/m_global_parameters.fpp @@ -9,7 +9,6 @@ !! and the stiffened equation of state. module m_global_parameters - ! Dependencies ============================================================= #ifdef MFC_MPI use mpi ! Message passing interface (MPI) module #endif @@ -20,22 +19,19 @@ module m_global_parameters use m_thermochem, only: num_species - ! ========================================================================== - implicit none - ! Logistics ================================================================ + ! Logistics integer :: num_procs !< Number of processors character(LEN=path_len) :: case_dir !< Case folder location logical :: old_grid !< Use existing grid data logical :: old_ic, non_axis_sym !< Use existing IC data integer :: t_step_old, t_step_start !< Existing IC/grid folder - ! ========================================================================== logical :: cfl_adap_dt, cfl_const_dt, cfl_dt integer :: n_start, n_start_old - ! Computational Domain Parameters ========================================== + ! Computational Domain Parameters integer :: proc_rank !< Rank of the local processor @@ -77,9 +73,7 @@ module m_global_parameters real(wp) :: x_a, y_a, z_a real(wp) :: x_b, y_b, z_b - ! ========================================================================== - - ! Simulation Algorithm Parameters ========================================== + ! Simulation Algorithm Parameters integer :: model_eqns !< Multicomponent flow model logical :: relax !< activate phase change integer :: relax_model !< Relax Model @@ -165,9 +159,8 @@ module m_global_parameters #endif integer, private :: ierr - ! ========================================================================== - ! Initial Condition Parameters ============================================= + ! Initial Condition Parameters integer :: num_patches !< Number of patches composing initial condition type(ic_patch_parameters), dimension(num_patches_max) :: patch_icpp !< @@ -175,16 +168,13 @@ module m_global_parameters !! patches employed in the configuration of the initial condition. Note that !! the maximum allowable number of patches, num_patches_max, may be changed !! in the module m_derived_types.f90. - ! ========================================================================== - ! Fluids Physical Parameters =============================================== + ! Fluids Physical Parameters type(physical_parameters), dimension(num_fluids_max) :: fluid_pp !< !! Database of the physical parameters of each of the fluids that is present !! in the flow. These include the stiffened gas equation of state parameters, !! the Reynolds numbers and the Weber numbers. - ! ========================================================================== - real(wp) :: rhoref, pref !< Reference parameters for Tait EOS !> @name Bubble modeling @@ -213,7 +203,6 @@ module m_global_parameters !! patches employed in the configuration of the initial condition. Note that !! the maximum allowable number of patches, num_patches_max, may be changed !! in the module m_derived_types.f90. - ! ========================================================================== !> @} @@ -512,7 +501,7 @@ contains ! the system of equations, given the dimensionality and choice of ! the equations of motion - ! Gamma/Pi_inf Model =============================================== + ! Gamma/Pi_inf Model if (model_eqns == 1) then ! Setting number of fluids @@ -532,9 +521,7 @@ contains pi_inf_idx = adv_idx%end sys_size = adv_idx%end - ! ================================================================== - - ! Volume Fraction Model (5-equation model) ========================= + ! Volume Fraction Model (5-equation model) else if (model_eqns == 2) then ! Annotating structure of the state and flux vectors belonging @@ -671,9 +658,7 @@ contains sys_size = c_idx end if - ! ================================================================== - - ! Volume Fraction Model (6-equation model) ========================= + ! Volume Fraction Model (6-equation model) else if (model_eqns == 3) then ! Annotating structure of the state and flux vectors belonging @@ -713,7 +698,6 @@ contains sys_size = c_idx end if - !======================== else if (model_eqns == 4) then ! 4 equation model with subgrid bubbles_euler cont_idx%beg = 1 ! one continuity equation @@ -795,13 +779,12 @@ contains chemxb = species_idx%beg chemxe = species_idx%end - ! Configuring Coordinate Direction Indexes ========================= + ! Configuring Coordinate Direction Indexes idwint(1)%beg = 0; idwint(2)%beg = 0; idwint(3)%beg = 0 idwint(1)%end = m; idwint(2)%end = n; idwint(3)%end = p ! There is no buffer region in pre_process. idwbuff(1) = idwint(1); idwbuff(2) = idwint(2); idwbuff(3) = idwint(3) - ! ================================================================== #ifdef MFC_MPI diff --git a/src/pre_process/m_grid.f90 b/src/pre_process/m_grid.f90 index 48491eaff1..0f92e8f22d 100644 --- a/src/pre_process/m_grid.f90 +++ b/src/pre_process/m_grid.f90 @@ -14,7 +14,6 @@ !! for the cell-centers and cell-boundaries locations. module m_grid - ! Dependencies ============================================================= use m_derived_types ! Definitions of the derived types use m_global_parameters ! Global parameters for the code @@ -24,7 +23,6 @@ module m_grid #ifdef MFC_MPI use mpi ! Message passing interface (MPI) module #endif - ! ========================================================================== implicit none @@ -35,7 +33,7 @@ module m_grid s_generate_parallel_grid, & s_finalize_grid_module - abstract interface ! =================================================== + abstract interface subroutine s_generate_abstract_grid @@ -43,7 +41,7 @@ subroutine s_generate_abstract_grid end subroutine s_generate_abstract_grid - end interface ! ======================================================== + end interface procedure(s_generate_abstract_grid), pointer :: s_generate_grid => null() @@ -60,7 +58,7 @@ subroutine s_generate_serial_grid integer :: i, j !< generic loop operators real(wp) :: length !< domain lengths - ! Grid Generation in the x-direction =============================== + ! Grid Generation in the x-direction dx = (x_domain%end - x_domain%beg)/real(m + 1, wp) do i = 0, m @@ -94,9 +92,8 @@ subroutine s_generate_serial_grid if (num_procs > 1) call s_mpi_reduce_min(dx) end if - ! ================================================================== - ! Grid Generation in the y-direction =============================== + ! Grid Generation in the y-direction if (n == 0) return if (grid_geometry == 2 .and. y_domain%beg == 0.0_wp) then @@ -149,9 +146,8 @@ subroutine s_generate_serial_grid if (num_procs > 1) call s_mpi_reduce_min(dy) end if - ! ================================================================== - ! Grid Generation in the z-direction =============================== + ! Grid Generation in the z-direction if (p == 0) return dz = (z_domain%end - z_domain%beg)/real(p + 1, wp) @@ -187,7 +183,6 @@ subroutine s_generate_serial_grid if (num_procs > 1) call s_mpi_reduce_min(dz) end if - ! ================================================================== end subroutine s_generate_serial_grid diff --git a/src/pre_process/m_initial_condition.fpp b/src/pre_process/m_initial_condition.fpp index 4a3fcb8c7b..c69a35f5f3 100644 --- a/src/pre_process/m_initial_condition.fpp +++ b/src/pre_process/m_initial_condition.fpp @@ -16,7 +16,6 @@ !! reading in the relevant data files. module m_initial_condition - ! Dependencies ============================================================= use m_derived_types ! Definitions of the derived types use m_global_parameters ! Global parameters for the code @@ -38,9 +37,6 @@ module m_initial_condition use m_chemistry - ! ========================================================================== - ! ========================================================================== - implicit none ! NOTE: The abstract interface allows for the declaration of a pointer to @@ -148,7 +144,7 @@ contains idwbuff) end if - ! 3D Patch Geometries ============================================= + ! 3D Patch Geometries if (p > 0) then do i = 1, num_patches @@ -226,9 +222,7 @@ contains end do !> @} - ! ================================================================== - - ! 2D Patch Geometries ============================================== + ! 2D Patch Geometries elseif (n > 0) then do i = 1, num_patches @@ -311,9 +305,7 @@ contains end do !> @} - ! ================================================================== - - ! 1D Patch Geometries ============================================== + ! 1D Patch Geometries else do i = 1, num_patches @@ -338,7 +330,6 @@ contains end do end if - ! ================================================================== if (perturb_flow) call s_perturb_surrounding_flow(q_prim_vf) if (perturb_sph) call s_perturb_sphere(q_prim_vf) diff --git a/src/pre_process/m_mpi_proxy.fpp b/src/pre_process/m_mpi_proxy.fpp index 633a55ff93..0686ca1516 100644 --- a/src/pre_process/m_mpi_proxy.fpp +++ b/src/pre_process/m_mpi_proxy.fpp @@ -9,7 +9,6 @@ !! communication goals. module m_mpi_proxy - ! Dependencies ============================================================= #ifdef MFC_MPI use mpi !< Message passing interface (MPI) module #endif @@ -19,7 +18,6 @@ module m_mpi_proxy use m_global_parameters !< Global parameters for the code use m_mpi_common - ! ========================================================================== implicit none @@ -172,7 +170,7 @@ contains ! equivalent piece of the computational domain. Note that explicit ! type-casting is omitted here for code legibility purposes. - ! Generating 3D Cartesian Processor Topology ======================= + ! Generating 3D Cartesian Processor Topology if (n > 0) then @@ -310,9 +308,9 @@ contains call MPI_CART_COORDS(MPI_COMM_CART, proc_rank, 3, & proc_coords, ierr) - ! END: Generating 3D Cartesian Processor Topology ================== + ! END: Generating 3D Cartesian Processor Topology - ! Sub-domain Global Parameters in z-direction ====================== + ! Sub-domain Global Parameters in z-direction ! Number of remaining cells after majority is distributed rem_cells = mod(p + 1, num_procs_z) @@ -357,9 +355,7 @@ contains end if end if - ! ================================================================== - - ! Generating 2D Cartesian Processor Topology ======================= + ! Generating 2D Cartesian Processor Topology else @@ -425,9 +421,9 @@ contains end if - ! END: Generating 2D Cartesian Processor Topology ================== + ! END: Generating 2D Cartesian Processor Topology - ! Sub-domain Global Parameters in y-direction ====================== + ! Sub-domain Global Parameters in y-direction ! Number of remaining cells after majority has been distributed rem_cells = mod(n + 1, num_procs_y) @@ -472,9 +468,7 @@ contains end if end if - ! ================================================================== - - ! Generating 1D Cartesian Processor Topology ======================= + ! Generating 1D Cartesian Processor Topology else @@ -494,9 +488,7 @@ contains end if - ! ================================================================== - - ! Sub-domain Global Parameters in x-direction ====================== + ! Sub-domain Global Parameters in x-direction ! Number of remaining cells after majority has been distributed rem_cells = mod(m + 1, num_procs_x) @@ -541,8 +533,6 @@ contains end if end if - ! ================================================================== - #endif end subroutine s_mpi_decompose_computational_domain diff --git a/src/pre_process/m_patches.fpp b/src/pre_process/m_patches.fpp index 1fa349c611..4adf4b0004 100644 --- a/src/pre_process/m_patches.fpp +++ b/src/pre_process/m_patches.fpp @@ -10,7 +10,6 @@ module m_patches - ! Dependencies ============================================================= use m_model ! Subroutine(s) related to STL files use m_derived_types ! Definitions of the derived types @@ -26,7 +25,6 @@ module m_patches use m_assign_variables use m_mpi_common - ! ========================================================================== implicit none @@ -1119,14 +1117,12 @@ contains ! Updating the patch identities bookkeeping variable if (1._wp - eta < 1e-16_wp) patch_id_fp(i, j, 0) = patch_id - ! Assign Parameters ========================================================= + ! Assign Parameters q_prim_vf(mom_idx%beg)%sf(i, j, 0) = U0*sin(x_cc(i)/L0)*cos(y_cc(j)/L0) q_prim_vf(mom_idx%end)%sf(i, j, 0) = -U0*cos(x_cc(i)/L0)*sin(y_cc(j)/L0) q_prim_vf(E_idx)%sf(i, j, 0) = patch_icpp(patch_id)%pres + (cos(2*x_cc(i))/L0 + & cos(2*y_cc(j))/L0)* & (q_prim_vf(1)%sf(i, j, 0)*U0*U0)/16 - ! ================================================================================ - end if end do end do diff --git a/src/pre_process/m_perturbation.fpp b/src/pre_process/m_perturbation.fpp index 604a406a47..5f92628914 100644 --- a/src/pre_process/m_perturbation.fpp +++ b/src/pre_process/m_perturbation.fpp @@ -6,7 +6,6 @@ !! initial mean flow fields. module m_perturbation - ! Dependencies ============================================================= use m_derived_types ! Definitions of the derived types use m_global_parameters ! Global parameters for the code @@ -18,8 +17,6 @@ module m_perturbation use ieee_arithmetic - ! ========================================================================== - implicit none integer :: mixlayer_nvar ! Number of variables in linear stability analysis solver for mixing layer @@ -174,7 +171,7 @@ contains end do end do - end subroutine s_superposition_instability_wave ! ---------------------- + end subroutine s_superposition_instability_wave !> This subroutine computes equilibrium bubble radius of the perturbed pressure field subroutine s_compute_equilibrium_state(fP, fR0, fR) diff --git a/src/pre_process/m_start_up.fpp b/src/pre_process/m_start_up.fpp index 419c7f9e0c..3586dfde90 100644 --- a/src/pre_process/m_start_up.fpp +++ b/src/pre_process/m_start_up.fpp @@ -8,7 +8,6 @@ !! initial condition procedures. module m_start_up - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters !< Global parameters for the code @@ -50,7 +49,6 @@ module m_start_up use m_checker_common use m_checker - ! ========================================================================== implicit none @@ -70,7 +68,7 @@ module m_start_up s_apply_initial_condition, & s_save_data, s_read_grid - abstract interface ! =================================================== + abstract interface subroutine s_read_abstract_grid_data_files @@ -91,7 +89,7 @@ module m_start_up end subroutine s_read_abstract_ic_data_files - end interface ! ======================================================== + end interface character(LEN=path_len + name_len) :: proc_rank_dir !< !! Location of the folder associated with the rank of the local processor @@ -245,7 +243,7 @@ contains ' is missing. Exiting ...') end if - ! Reading the Grid Data File for the x-direction =================== + ! Reading the Grid Data File for the x-direction ! Checking whether x_cb.dat exists file_loc = trim(t_step_dir)//'/x_cb.dat' @@ -273,9 +271,7 @@ contains x_domain%beg = x_cb(-1) x_domain%end = x_cb(m) - ! ================================================================== - - ! Reading the Grid Data File for the y-direction =================== + ! Reading the Grid Data File for the y-direction if (n > 0) then @@ -305,10 +301,7 @@ contains y_domain%beg = y_cb(-1) y_domain%end = y_cb(n) - ! ================================================================== - - ! Reading the Grid Data File for the z-direction =================== - + ! Reading the Grid Data File for the z-direction if (p > 0) then ! Checking whether z_cb.dat exists @@ -341,8 +334,6 @@ contains end if - ! ================================================================== - ! If only the preexisting grid data files are read in and there will ! not be any preexisting initial condition data files imported, then ! the directory associated with the rank of the local processor may @@ -362,16 +353,14 @@ contains !! the cell-widths are positively valued subroutine s_check_grid_data_files - ! Cell-boundary Data Consistency Check in x-direction ============== + ! Cell-boundary Data Consistency Check in x-direction if (any(x_cb(0:m) - x_cb(-1:m - 1) <= 0._wp)) then call s_mpi_abort('x_cb.dat in '//trim(t_step_dir)// & ' contains non-positive cell-spacings. Exiting ...') end if - ! ================================================================== - - ! Cell-boundary Data Consistency Check in y-direction ============== + ! Cell-boundary Data Consistency Check in y-direction if (n > 0) then @@ -381,9 +370,7 @@ contains 'Exiting ...') end if - ! ================================================================== - - ! Cell-boundary Data Consistency Check in z-direction ============== + ! Cell-boundary Data Consistency Check in z-direction if (p > 0) then @@ -397,8 +384,6 @@ contains end if - ! ================================================================== - end subroutine s_check_grid_data_files !> The goal of this subroutine is to read in any preexisting @@ -430,7 +415,7 @@ contains integer :: i, r !< Generic loop iterator - ! Reading the Conservative Variables Data Files ==================== + ! Reading the Conservative Variables Data Files do i = 1, sys_size ! Checking whether data file associated with variable position @@ -524,8 +509,6 @@ contains end if end if - ! ================================================================== - ! Since the preexisting grid and initial condition data files have ! been read in, the directory associated with the rank of the local ! process may be cleaned out to make room for new pre-process data. diff --git a/src/pre_process/p_main.f90 b/src/pre_process/p_main.f90 index 0bda585c0c..b45a100c5a 100644 --- a/src/pre_process/p_main.f90 +++ b/src/pre_process/p_main.f90 @@ -6,14 +6,10 @@ !! grid data for the multicomponent flow code. program p_main - ! Dependencies ============================================================= - use m_global_parameters !< Global parameters for the code use m_start_up - ! ========================================================================== - implicit none integer :: i diff --git a/src/simulation/m_acoustic_src.fpp b/src/simulation/m_acoustic_src.fpp index 83614e1cf1..27901561d9 100644 --- a/src/simulation/m_acoustic_src.fpp +++ b/src/simulation/m_acoustic_src.fpp @@ -7,7 +7,6 @@ !> @brief The module contains the subroutines used to create a acoustic source pressure source term module m_acoustic_src - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -19,7 +18,7 @@ module m_acoustic_src use m_helper_basic !< Functions to compare floating point numbers use m_constants !< Definitions of the constants - ! ========================================================================== + implicit none private; public :: s_initialize_acoustic_src, s_precalculate_acoustic_spatial_sources, s_acoustic_src_calculations diff --git a/src/simulation/m_body_forces.fpp b/src/simulation/m_body_forces.fpp index 9892e48f41..c27ca8e017 100644 --- a/src/simulation/m_body_forces.fpp +++ b/src/simulation/m_body_forces.fpp @@ -2,8 +2,6 @@ module m_body_forces - ! Dependencies ============================================================= - use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -15,7 +13,6 @@ module m_body_forces #ifdef MFC_OpenACC use openacc #endif - ! ========================================================================== implicit none diff --git a/src/simulation/m_boundary_conditions.fpp b/src/simulation/m_boundary_conditions.fpp index 480cfc4107..b541a34d12 100644 --- a/src/simulation/m_boundary_conditions.fpp +++ b/src/simulation/m_boundary_conditions.fpp @@ -6,7 +6,6 @@ !! boundary condiitons module m_boundary_conditions - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -14,7 +13,6 @@ module m_boundary_conditions use m_mpi_proxy use m_constants - ! ========================================================================== implicit none @@ -34,7 +32,7 @@ contains integer :: bc_loc, bc_dir - ! Population of Buffers in x-direction ============================= + ! Population of Buffers in x-direction select case (bc_x%beg) case (-13:-3) ! Ghost-cell extrap. BC at beginning @@ -88,9 +86,9 @@ contains end select end if - ! END: Population of Buffers in x-direction ======================== + ! END: Population of Buffers in x-direction - ! Population of Buffers in y-direction ============================= + ! Population of Buffers in y-direction if (n == 0) return @@ -150,9 +148,9 @@ contains end if - ! END: Population of Buffers in y-direction ======================== + ! END: Population of Buffers in y-direction - ! Population of Buffers in z-direction ============================= + ! Population of Buffers in z-direction if (p == 0) return @@ -210,7 +208,7 @@ contains end if - ! END: Population of Buffers in z-direction ======================== + ! END: Population of Buffers in z-direction end subroutine s_populate_variables_buffers @@ -221,7 +219,7 @@ contains integer, intent(in) :: bc_dir, bc_loc integer :: j, k, l, q, i - !< x-direction ========================================================= + !< x-direction if (bc_dir == 1) then !< x-direction if (bc_loc == -1) then !bc_x%beg @@ -254,7 +252,7 @@ contains end if - !< y-direction ========================================================= + !< y-direction elseif (bc_dir == 2) then !< y-direction if (bc_loc == -1) then !< bc_y%beg @@ -287,7 +285,7 @@ contains end if - !< z-direction ========================================================= + !< z-direction elseif (bc_dir == 3) then !< z-direction if (bc_loc == -1) then !< bc_z%beg @@ -321,7 +319,6 @@ contains end if end if - !< ===================================================================== end subroutine s_ghost_cell_extrapolation @@ -333,7 +330,7 @@ contains integer :: j, k, l, q, i - !< x-direction ========================================================= + !< x-direction if (bc_dir == 1) then if (bc_loc == -1) then !< bc_x%beg @@ -435,7 +432,7 @@ contains end if - !< y-direction ========================================================= + !< y-direction elseif (bc_dir == 2) then if (bc_loc == -1) then !< bc_y%beg @@ -534,7 +531,7 @@ contains end if - !< z-direction ========================================================= + !< z-direction elseif (bc_dir == 3) then if (bc_loc == -1) then !< bc_z%beg @@ -634,7 +631,6 @@ contains end if end if - !< ===================================================================== end subroutine s_symmetry @@ -646,7 +642,7 @@ contains integer :: j, k, l, q, i - !< x-direction ========================================================= + !< x-direction if (bc_dir == 1) then if (bc_loc == -1) then !< bc_x%beg @@ -715,7 +711,7 @@ contains end if - !< y-direction ========================================================= + !< y-direction elseif (bc_dir == 2) then if (bc_loc == -1) then !< bc_y%beg @@ -784,7 +780,7 @@ contains end if - !< z-direction ========================================================= + !< z-direction elseif (bc_dir == 3) then if (bc_loc == -1) then !< bc_z%beg @@ -854,7 +850,6 @@ contains end if end if - !< ===================================================================== end subroutine s_periodic @@ -939,7 +934,7 @@ contains integer :: j, k, l, q, i - !< x-direction ========================================================= + !< x-direction if (bc_dir == 1) then if (bc_loc == -1) then !< bc_x%beg @@ -982,7 +977,7 @@ contains end if - !< y-direction ========================================================= + !< y-direction elseif (bc_dir == 2) then if (bc_loc == -1) then !< bc_y%beg @@ -1025,7 +1020,7 @@ contains end if - !< z-direction ========================================================= + !< z-direction elseif (bc_dir == 3) then if (bc_loc == -1) then !< bc_z%beg @@ -1069,7 +1064,6 @@ contains end if end if - !< ===================================================================== end subroutine s_slip_wall @@ -1081,7 +1075,7 @@ contains integer :: j, k, l, q, i - !< x-direction ========================================================= + !< x-direction if (bc_dir == 1) then if (bc_loc == -1) then !< bc_x%beg @@ -1136,7 +1130,7 @@ contains end if - !< y-direction ========================================================= + !< y-direction elseif (bc_dir == 2) then if (bc_loc == -1) then !< bc_y%beg @@ -1191,7 +1185,7 @@ contains end if - !< z-direction ========================================================= + !< z-direction elseif (bc_dir == 3) then if (bc_loc == -1) then !< bc_z%beg @@ -1247,7 +1241,6 @@ contains end if end if - !< ===================================================================== end subroutine s_no_slip_wall @@ -1258,7 +1251,7 @@ contains integer :: j, k, l, q, i - !< x-direction ========================================================= + !< x-direction if (bc_dir == 1) then if (bc_loc == -1) then !< bc_x%beg @@ -1299,7 +1292,7 @@ contains end if - !< y-direction ========================================================= + !< y-direction elseif (bc_dir == 2) then if (bc_loc == -1) then !< bc_y%beg @@ -1340,7 +1333,7 @@ contains end if - !< z-direction ========================================================= + !< z-direction elseif (bc_dir == 3) then if (bc_loc == -1) then !< bc_z%beg diff --git a/src/simulation/m_bubbles.fpp b/src/simulation/m_bubbles.fpp index 6d634423c0..b7b249139d 100644 --- a/src/simulation/m_bubbles.fpp +++ b/src/simulation/m_bubbles.fpp @@ -7,8 +7,6 @@ !> @brief This module contains the procedures shared by the ensemble-averaged and volume-averaged bubble models. module m_bubbles - ! Dependencies ============================================================= - use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -17,8 +15,6 @@ module m_bubbles use m_variables_conversion !< State variables type conversion procedures - ! ========================================================================== - implicit none real(wp) :: chi_vw !< Bubble wall properties (Ando 2010) diff --git a/src/simulation/m_bubbles_EE.fpp b/src/simulation/m_bubbles_EE.fpp index c36cdbd610..91e8c5f30e 100644 --- a/src/simulation/m_bubbles_EE.fpp +++ b/src/simulation/m_bubbles_EE.fpp @@ -7,8 +7,6 @@ !> @brief This module is used to compute the ensemble-averaged bubble dynamic variables module m_bubbles_EE - ! Dependencies ============================================================= - use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -19,8 +17,6 @@ module m_bubbles_EE use m_bubbles !< General bubble dynamics procedures - ! ========================================================================== - implicit none real(wp), allocatable, dimension(:, :, :) :: bub_adv_src diff --git a/src/simulation/m_bubbles_EL.fpp b/src/simulation/m_bubbles_EL.fpp index 49361def75..f569083922 100644 --- a/src/simulation/m_bubbles_EL.fpp +++ b/src/simulation/m_bubbles_EL.fpp @@ -7,8 +7,6 @@ !> @brief This module is used to to compute the volume-averaged bubble model module m_bubbles_EL - ! Dependencies ============================================================= - use m_global_parameters !< Definitions of the global parameters use m_mpi_proxy !< Message passing interface (MPI) module proxy @@ -27,8 +25,6 @@ module m_bubbles_EL use m_helper - ! ========================================================================== - implicit none !(nBub) diff --git a/src/simulation/m_bubbles_EL_kernels.fpp b/src/simulation/m_bubbles_EL_kernels.fpp index d9f92ed367..43246aad55 100644 --- a/src/simulation/m_bubbles_EL_kernels.fpp +++ b/src/simulation/m_bubbles_EL_kernels.fpp @@ -8,12 +8,8 @@ !! in the Eulerian framework. module m_bubbles_EL_kernels - ! Dependencies ============================================================= - use m_mpi_proxy !< Message passing interface (MPI) module proxy - ! ========================================================================== - implicit none contains diff --git a/src/simulation/m_cbc.fpp b/src/simulation/m_cbc.fpp index f6cd78178b..278e4c055e 100644 --- a/src/simulation/m_cbc.fpp +++ b/src/simulation/m_cbc.fpp @@ -22,7 +22,6 @@ module m_cbc - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -30,7 +29,6 @@ module m_cbc use m_variables_conversion !< State variables type conversion procedures use m_compute_cbc - ! ========================================================================== implicit none @@ -72,7 +70,7 @@ module m_cbc real(wp), allocatable, dimension(:) :: ds !< Cell-width distribution in the s-direction - ! CBC Coefficients ========================================================= + ! CBC Coefficients real(wp), allocatable, dimension(:, :) :: fd_coef_x !< Finite diff. coefficients x-dir real(wp), allocatable, dimension(:, :) :: fd_coef_y !< Finite diff. coefficients y-dir @@ -92,8 +90,6 @@ module m_cbc !! second dimension identifies the position of its coefficients and the last !! dimension denotes the location of the CBC. - ! ========================================================================== - type(int_bounds_info) :: is1, is2, is3 !< Indical bounds in the s1-, s2- and s3-directions !$acc declare create(is1, is2, is3) @@ -266,7 +262,7 @@ contains ! Allocating the cell-width distribution in the s-direction @:ALLOCATE(ds(0:buff_size)) - ! Allocating/Computing CBC Coefficients in x-direction ============= + ! Allocating/Computing CBC Coefficients in x-direction if (all((/bc_x%beg, bc_x%end/) <= -5) .and. all((/bc_x%beg, bc_x%end/) >= -13)) then @:ALLOCATE(fd_coef_x(0:buff_size, -1:1)) @@ -299,9 +295,8 @@ contains call s_compute_cbc_coefficients(1, 1) end if - ! ================================================================== - ! Allocating/Computing CBC Coefficients in y-direction ============= + ! Allocating/Computing CBC Coefficients in y-direction if (n > 0) then if (all((/bc_y%beg, bc_y%end/) <= -5) .and. all((/bc_y%beg, bc_y%end/) >= -13)) then @@ -338,9 +333,8 @@ contains end if end if - ! ================================================================== - ! Allocating/Computing CBC Coefficients in z-direction ============= + ! Allocating/Computing CBC Coefficients in z-direction if (p > 0) then if (all((/bc_z%beg, bc_z%end/) <= -5) .and. all((/bc_z%beg, bc_z%end/) >= -13)) then @@ -377,7 +371,6 @@ contains end if end if - ! ================================================================== !$acc update device(fd_coef_x, fd_coef_y, fd_coef_z, pi_coef_x, pi_coef_y, pi_coef_z) @@ -463,7 +456,7 @@ contains s_cb(i + 1) = s_cb(i) + ds(i) end do - ! Computing CBC1 Coefficients ====================================== + ! Computing CBC1 Coefficients #:for CBC_DIR, XYZ in [(1, 'x'), (2, 'y'), (3, 'z')] if (cbc_dir_in == ${CBC_DIR}$) then if (weno_order == 1) then @@ -472,9 +465,7 @@ contains fd_coef_${XYZ}$ (0, cbc_loc_in) = -2._wp/(ds(0) + ds(1)) fd_coef_${XYZ}$ (1, cbc_loc_in) = -fd_coef_${XYZ}$ (0, cbc_loc_in) - ! ================================================================== - - ! Computing CBC2 Coefficients ====================================== + ! Computing CBC2 Coefficients elseif (weno_order == 3) then fd_coef_${XYZ}$ (:, cbc_loc_in) = 0._wp @@ -484,9 +475,7 @@ contains pi_coef_${XYZ}$ (0, 0, cbc_loc_in) = (s_cb(0) - s_cb(1))/(s_cb(0) - s_cb(2)) - ! ================================================================== - - ! Computing CBC4 Coefficients ====================================== + ! Computing CBC4 Coefficients else fd_coef_${XYZ}$ (:, cbc_loc_in) = 0._wp @@ -535,7 +524,7 @@ contains end if #:endfor - ! END: Computing CBC4 Coefficients ================================= + ! END: Computing CBC4 Coefficients ! Nullifying CBC coefficients @@ -553,7 +542,7 @@ contains integer :: i !< Generic loop iterator - ! Associating CBC Coefficients in x-direction ====================== + ! Associating CBC Coefficients in x-direction if (cbc_dir_in == 1) then !fd_coef => fd_coef_x; if (weno_order > 1) pi_coef => pi_coef_x @@ -567,9 +556,8 @@ contains ds(i) = dx(m - i) end do end if - ! ================================================================== - ! Associating CBC Coefficients in y-direction ====================== + ! Associating CBC Coefficients in y-direction elseif (cbc_dir_in == 2) then !fd_coef => fd_coef_y; if (weno_order > 1) pi_coef => pi_coef_y @@ -583,9 +571,8 @@ contains ds(i) = dy(n - i) end do end if - ! ================================================================== - ! Associating CBC Coefficients in z-direction ====================== + ! Associating CBC Coefficients in z-direction else !fd_coef => fd_coef_z; if (weno_order > 1) pi_coef => pi_coef_z @@ -604,8 +591,6 @@ contains !$acc update device(ds) - ! ================================================================== - end subroutine s_associate_cbc_coefficients_pointers !> The following is the implementation of the CBC based on @@ -690,7 +675,7 @@ contains #:for CBC_DIR, XYZ in [(1, 'x'), (2, 'y'), (3, 'z')] if (cbc_dir == ${CBC_DIR}$) then - ! PI2 of flux_rs_vf and flux_src_rs_vf at j = 1/2 ================== + ! PI2 of flux_rs_vf and flux_src_rs_vf at j = 1/2 if (weno_order == 3) then call s_convert_primitive_to_flux_variables(q_prim_rs${XYZ}$_vf, & @@ -721,9 +706,8 @@ contains end do end do end do - ! ================================================================== - ! PI4 of flux_rs_vf and flux_src_rs_vf at j = 1/2, 3/2 ============= + ! PI4 of flux_rs_vf and flux_src_rs_vf at j = 1/2, 3/2 else call s_convert_primitive_to_flux_variables(q_prim_rs${XYZ}$_vf, & F_rs${XYZ}$_vf, & @@ -771,14 +755,13 @@ contains end do end if - ! ================================================================== - ! FD2 or FD4 of RHS at j = 0 ======================================= + ! FD2 or FD4 of RHS at j = 0 !$acc parallel loop collapse(2) gang vector default(present) private(alpha_rho, vel, adv, mf, dvel_ds, dadv_ds, Re_cbc, dalpha_rho_ds,dvel_dt, dadv_dt, dalpha_rho_dt,L, lambda) do r = is3%beg, is3%end do k = is2%beg, is2%end - ! Transferring the Primitive Variables ======================= + ! Transferring the Primitive Variables !$acc loop seq do i = 1, contxe alpha_rho(i) = q_prim_rs${XYZ}$_vf(0, k, r, i) @@ -818,9 +801,8 @@ contains ! Compute mixture sound speed call s_compute_speed_of_sound(pres, rho, gamma, pi_inf, H, adv, vel_K_sum, 0._wp, c) - ! ============================================================ - ! First-Order Spatial Derivatives of Primitive Variables ===== + ! First-Order Spatial Derivatives of Primitive Variables !$acc loop seq do i = 1, contxe @@ -864,9 +846,8 @@ contains dadv_ds(i) end do end do - ! ============================================================ - ! First-Order Temporal Derivatives of Primitive Variables ==== + ! First-Order Temporal Derivatives of Primitive Variables lambda(1) = vel(dir_idx(1)) - c lambda(2) = vel(dir_idx(1)) lambda(3) = vel(dir_idx(1)) + c @@ -974,9 +955,8 @@ contains dqv_dt = dqv_dt + dalpha_rho_dt(i)*qvs(i) end do end if - ! ============================================================ - ! flux_rs_vf_l and flux_src_rs_vf_l at j = -1/2 ================== + ! flux_rs_vf_l and flux_src_rs_vf_l at j = -1/2 !$acc loop seq do i = 1, contxe flux_rs${XYZ}$_vf_l(-1, k, r, i) = flux_rs${XYZ}$_vf_l(0, k, r, i) & @@ -1029,14 +1009,14 @@ contains end do end if - ! END: flux_rs_vf_l and flux_src_rs_vf_l at j = -1/2 ============= + ! END: flux_rs_vf_l and flux_src_rs_vf_l at j = -1/2 end do end do end if #:endfor - ! END: FD2 or FD4 of RHS at j = 0 ================================== + ! END: FD2 or FD4 of RHS at j = 0 ! The reshaping of outputted data and disssociation of the FD and PI ! coefficients, or CBC coefficients, respectively, based on selected @@ -1074,7 +1054,7 @@ contains ! Determining the indicial shift based on CBC location - ! END: Allocation/Association of Primitive and Flux Variables ====== + ! END: Allocation/Association of Primitive and Flux Variables if (cbc_dir == 1) then is1%beg = 0; is1%end = buff_size; is2 = iy; is3 = iz @@ -1091,7 +1071,7 @@ contains !$acc update device(is1, is2, is3, dj) !$acc update device( dir_idx, dir_flg) - ! Reshaping Inputted Data in x-direction =========================== + ! Reshaping Inputted Data in x-direction if (cbc_dir == 1) then !$acc parallel loop collapse(4) gang vector default(present) @@ -1165,9 +1145,9 @@ contains end do end if - ! END: Reshaping Inputted Data in x-direction ====================== + ! END: Reshaping Inputted Data in x-direction - ! Reshaping Inputted Data in y-direction =========================== + ! Reshaping Inputted Data in y-direction elseif (cbc_dir == 2) then !$acc parallel loop collapse(4) gang vector default(present) @@ -1241,9 +1221,9 @@ contains end do end if - ! END: Reshaping Inputted Data in y-direction ====================== + ! END: Reshaping Inputted Data in y-direction - ! Reshaping Inputted Data in z-direction =========================== + ! Reshaping Inputted Data in z-direction else !$acc parallel loop collapse(4) gang vector default(present) @@ -1318,15 +1298,11 @@ contains end if end if - ! END: Reshaping Inputted Data in z-direction ====================== + ! END: Reshaping Inputted Data in z-direction ! Association of the procedural pointer to the appropriate procedure ! that will be utilized in the evaluation of L variables for the CBC - ! ================================================================== - - ! ================================================================== - end subroutine s_initialize_cbc !> Deallocation and/or the disassociation procedures that @@ -1351,7 +1327,7 @@ contains dj = max(0, cbc_loc) !$acc update device(dj) - ! Reshaping Outputted Data in x-direction ========================== + ! Reshaping Outputted Data in x-direction if (cbc_dir == 1) then !$acc parallel loop collapse(4) gang vector default(present) @@ -1400,9 +1376,9 @@ contains end do end do end if - ! END: Reshaping Outputted Data in x-direction ===================== + ! END: Reshaping Outputted Data in x-direction - ! Reshaping Outputted Data in y-direction ========================== + ! Reshaping Outputted Data in y-direction elseif (cbc_dir == 2) then !$acc parallel loop collapse(4) gang vector default(present) @@ -1453,9 +1429,9 @@ contains end do end if - ! END: Reshaping Outputted Data in y-direction ===================== + ! END: Reshaping Outputted Data in y-direction - ! Reshaping Outputted Data in z-direction ========================== + ! Reshaping Outputted Data in z-direction else !$acc parallel loop collapse(4) gang vector default(present) @@ -1507,13 +1483,7 @@ contains end if end if - ! END: Reshaping Outputted Data in z-direction ===================== - - ! Deallocation/Disassociation of Primitive and Flux Variables ====== - - ! ================================================================== - - ! Nullifying procedural pointer used in evaluation of L for the CBC + ! END: Reshaping Outputted Data in z-direction end subroutine s_finalize_cbc @@ -1569,16 +1539,15 @@ contains ! Deallocating GRCBC inputs @:DEALLOCATE(vel_in, vel_out, pres_in, pres_out, Del_in, Del_out, alpha_rho_in, alpha_in) - ! Deallocating CBC Coefficients in x-direction ===================== + ! Deallocating CBC Coefficients in x-direction if (any((/bc_x%beg, bc_x%end/) <= -5) .and. any((/bc_x%beg, bc_x%end/) >= -13)) then @:DEALLOCATE(fd_coef_x) if (weno_order > 1) then @:DEALLOCATE(pi_coef_x) end if end if - ! ================================================================== - ! Deallocating CBC Coefficients in y-direction ===================== + ! Deallocating CBC Coefficients in y-direction if (n > 0 .and. any((/bc_y%beg, bc_y%end/) <= -5) .and. & any((/bc_y%beg, bc_y%end/) >= -13 .and. bc_y%beg /= -14)) then @:DEALLOCATE(fd_coef_y) @@ -1586,19 +1555,14 @@ contains @:DEALLOCATE(pi_coef_y) end if end if - ! ================================================================== - ! Deallocating CBC Coefficients in z-direction ===================== + ! Deallocating CBC Coefficients in z-direction if (p > 0 .and. any((/bc_z%beg, bc_z%end/) <= -5) .and. any((/bc_z%beg, bc_z%end/) >= -13)) then @:DEALLOCATE(fd_coef_z) if (weno_order > 1) then @:DEALLOCATE(pi_coef_z) end if end if - ! ================================================================== - - ! Disassociating the pointer to the procedure that was utilized to - ! to convert mixture or species variables to the mixture variables end subroutine s_finalize_cbc_module diff --git a/src/simulation/m_compute_cbc.fpp b/src/simulation/m_compute_cbc.fpp index f7ef81c816..8f4e90d852 100644 --- a/src/simulation/m_compute_cbc.fpp +++ b/src/simulation/m_compute_cbc.fpp @@ -4,12 +4,8 @@ module m_compute_cbc - ! Dependencies ============================================================= - use m_global_parameters !< Definitions of the global parameters - ! ========================================================================== - implicit none private; public :: s_compute_slip_wall_L, & diff --git a/src/simulation/m_data_output.fpp b/src/simulation/m_data_output.fpp index b68a4ee862..9b617ef5e3 100644 --- a/src/simulation/m_data_output.fpp +++ b/src/simulation/m_data_output.fpp @@ -13,7 +13,6 @@ !! and cell Reynolds (Rc) numbers. module m_data_output - ! Dependencies ============================================================ use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -31,7 +30,6 @@ module m_data_output use m_delay_file_access use m_ibm - ! ========================================================================== implicit none @@ -171,7 +169,8 @@ contains !> This opens a formatted data file where the root processor !! can write out the CoM information - subroutine s_open_com_files() ! ---------------------------------------- + subroutine s_open_com_files() + character(len=path_len + 3*name_len) :: file_path !< !! Relative path to the CoM file in the case directory integer :: i !< Generic loop iterator @@ -205,7 +204,7 @@ contains '=== Total Volume ===' end if end do - end subroutine s_open_com_files ! -------------------------------------- + end subroutine s_open_com_files !> This opens a formatted data file where the root processor !! can write out flow probe information @@ -276,7 +275,7 @@ contains real(wp), dimension(2) :: Re !< Cell-avg. Reynolds numbers integer :: j, k, l - ! Computing Stability Criteria at Current Time-step ================ + ! Computing Stability Criteria at Current Time-step !$acc parallel loop collapse(3) gang vector default(present) private(vel, alpha, Re) do l = 0, p do k = 0, n @@ -296,7 +295,7 @@ contains end do !$acc end parallel loop - ! end: Computing Stability Criteria at Current Time-step =========== + ! end: Computing Stability Criteria at Current Time-step ! Determining local stability criteria extrema at current time-step @@ -990,7 +989,7 @@ contains !! @param t_step Current time-step !! @param q_com Center of mass information !! @param moments Higher moment information - subroutine s_write_com_files(t_step, c_mass) ! ------------------- + subroutine s_write_com_files(t_step, c_mass) integer, intent(in) :: t_step real(wp), dimension(num_fluids, 5), intent(in) :: c_mass @@ -1035,7 +1034,7 @@ contains end if end if - end subroutine s_write_com_files ! ------------------------------------- + end subroutine s_write_com_files !> This writes a formatted data file for the flow probe information !! @param t_step Current time-step @@ -1689,9 +1688,10 @@ contains subroutine s_close_run_time_information_file real(wp) :: run_time !< Run-time of the simulation + ! Writing the footer of and closing the run-time information file - write (3, '(A)') '----------------------------------------'// & - '----------------------------------------' + write (3, '(A)') '---'// & + '---' write (3, '(A)') '' write (3, '(A,F9.6)') 'ICFL Max: ', icfl_max @@ -1702,21 +1702,21 @@ contains write (3, '(A)') '' write (3, '(A,I0,A)') 'Run-time: ', int(anint(run_time)), 's' - write (3, '(A)') '========================================'// & - '========================================' + write (3, '(A)') '===='// & + '===' close (3) end subroutine s_close_run_time_information_file !> Closes communication files - subroutine s_close_com_files() ! --------------------------------------- + subroutine s_close_com_files() integer :: i !< Generic loop iterator do i = 1, num_fluids close (i + 120) end do - end subroutine s_close_com_files ! ------------------------------------- + end subroutine s_close_com_files !> Closes probe files subroutine s_close_probe_files diff --git a/src/simulation/m_derived_variables.f90 b/src/simulation/m_derived_variables.f90 index aae1bda761..26c4c67f4b 100644 --- a/src/simulation/m_derived_variables.f90 +++ b/src/simulation/m_derived_variables.f90 @@ -9,7 +9,6 @@ !! sound, vorticity and the numerical Schlieren function. module m_derived_variables - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters !< Global parameters for the code @@ -26,8 +25,6 @@ module m_derived_variables use m_finite_differences - ! ========================================================================== - implicit none private; public :: s_initialize_derived_variables_module, & @@ -457,7 +454,7 @@ subroutine s_derive_center_of_mass(q_vf, c_m) end do end if - end subroutine s_derive_center_of_mass ! ---------------------------------- + end subroutine s_derive_center_of_mass !> Deallocation procedures for the module subroutine s_finalize_derived_variables_module diff --git a/src/simulation/m_fftw.fpp b/src/simulation/m_fftw.fpp index 9ab5c0c5f3..fbc529d180 100644 --- a/src/simulation/m_fftw.fpp +++ b/src/simulation/m_fftw.fpp @@ -7,7 +7,6 @@ !> @brief The module contains the subroutines for the FFT routines module m_fftw - ! Dependencies ============================================================= use, intrinsic :: iso_c_binding use m_derived_types !< Definitions of the derived types @@ -24,8 +23,6 @@ module m_fftw use hipfort_hipfft #endif - ! ========================================================================== - implicit none private; public :: s_initialize_fftw_module, & @@ -297,7 +294,7 @@ contains end do #endif !$acc end data - end subroutine s_apply_fourier_filter ! -------------------------------- + end subroutine s_apply_fourier_filter !> The purpose of this subroutine is to destroy the fftw plan !! that will be used in the forward and backward DFTs when diff --git a/src/simulation/m_global_parameters.fpp b/src/simulation/m_global_parameters.fpp index e06b04438d..6963d6dfe2 100644 --- a/src/simulation/m_global_parameters.fpp +++ b/src/simulation/m_global_parameters.fpp @@ -13,7 +13,6 @@ !! numbers and the Weber numbers. module m_global_parameters - ! Dependencies ============================================================= #ifdef MFC_MPI use mpi !< Message passing interface (MPI) module #endif @@ -26,20 +25,17 @@ module m_global_parameters use openacc #endif - ! ========================================================================== - implicit none real(wp) :: time = 0 - ! Logistics ================================================================ + ! Logistics integer :: num_procs !< Number of processors character(LEN=path_len) :: case_dir !< Case folder location logical :: run_time_info !< Run-time output flag integer :: t_step_old !< Existing IC/grid folder - ! ========================================================================== - ! Computational Domain Parameters ========================================== + ! Computational Domain Parameters integer :: proc_rank !< Rank of the local processor !> @name Number of cells in the x-, y- and z-directions, respectively @@ -100,9 +96,7 @@ module m_global_parameters integer :: t_step_print !< Number of time-steps between printouts - ! ========================================================================== - - ! Simulation Algorithm Parameters ========================================== + ! Simulation Algorithm Parameters integer :: model_eqns !< Multicomponent flow model #:if MFC_CASE_OPTIMIZATION integer, parameter :: num_dims = ${num_dims}$ !< Number of spatial dimensions @@ -297,9 +291,9 @@ module m_global_parameters !$acc declare create(sys_size, buff_size, startx, starty, startz, E_idx, gamma_idx, pi_inf_idx, alf_idx, n_idx, stress_idx, b_size, tensor_size, xi_idx, species_idx) - ! END: Simulation Algorithm Parameters ===================================== + ! END: Simulation Algorithm Parameters - ! Fluids Physical Parameters =============================================== + ! Fluids Physical Parameters type(physical_parameters), dimension(num_fluids_max) :: fluid_pp !< !! Database of the physical parameters of each of the fluids that is present @@ -310,8 +304,6 @@ module m_global_parameters !$acc declare create(bc_y%vb1, bc_y%vb2, bc_y%vb3, bc_y%ve1, bc_y%ve2, bc_y%ve3) !$acc declare create(bc_z%vb1, bc_z%vb2, bc_z%vb3, bc_z%ve1, bc_z%ve2, bc_z%ve3) - ! ========================================================================== - integer :: fd_order !< !! The order of the finite-difference (fd) approximations of the first-order !! derivatives that need to be evaluated when the CoM or flow probe data @@ -348,7 +340,6 @@ module m_global_parameters !! patches employed in the configuration of the initial condition. Note that !! the maximum allowable number of patches, num_patches_max, may be changed !! in the module m_derived_types.f90. - ! ========================================================================== !$acc declare create(ib, num_ibs, patch_ib) !> @} @@ -475,7 +466,6 @@ module m_global_parameters real(wp) :: dt_max !< Maximum time step size !$acc declare create(bubbles_lagrange, lag_params, rkck_adap_dt, dt_max, rkck_time_tmp, rkck_tolerance) !> @} - ! ====================================================================== contains @@ -763,7 +753,7 @@ contains ! interfaces will be computed Re_size = 0 - ! Gamma/Pi_inf Model =============================================== + ! Gamma/Pi_inf Model if (model_eqns == 1) then ! Annotating structure of the state and flux vectors belonging @@ -780,9 +770,7 @@ contains pi_inf_idx = adv_idx%end sys_size = adv_idx%end - ! ================================================================== - - ! Volume Fraction Model ============================================ + ! Volume Fraction Model else ! Annotating structure of the state and flux vectors belonging @@ -1055,7 +1043,7 @@ contains end if end if - ! END: Volume Fraction Model ======================================= + ! END: Volume Fraction Model if (chemistry) then species_idx%beg = sys_size + 1 @@ -1131,7 +1119,7 @@ contains buff_size = max(buff_size, 6) end if - ! Configuring Coordinate Direction Indexes ========================= + ! Configuring Coordinate Direction Indexes idwint(1)%beg = 0; idwint(2)%beg = 0; idwint(3)%beg = 0 idwint(1)%end = m; idwint(2)%end = n; idwint(3)%end = p @@ -1143,9 +1131,8 @@ contains idwbuff(2)%end = idwint(2)%end - idwbuff(2)%beg idwbuff(3)%end = idwint(3)%end - idwbuff(3)%beg !$acc update device(idwint, idwbuff) - ! ================================================================== - ! Configuring Coordinate Direction Indexes ========================= + ! Configuring Coordinate Direction Indexes if (bubbles_euler) then @:ALLOCATE(ptil(& & idwbuff(1)%beg:idwbuff(1)%end, & diff --git a/src/simulation/m_hyperelastic.fpp b/src/simulation/m_hyperelastic.fpp index ed0e6fda64..5af5508c9a 100644 --- a/src/simulation/m_hyperelastic.fpp +++ b/src/simulation/m_hyperelastic.fpp @@ -9,8 +9,6 @@ module m_hyperelastic - ! Dependencies ============================================================= - use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -19,8 +17,6 @@ module m_hyperelastic use m_finite_differences - ! ========================================================================== - implicit none private; public :: s_hyperelastic_rmt_stress_update, & diff --git a/src/simulation/m_hypoelastic.fpp b/src/simulation/m_hypoelastic.fpp index 33ebb8fe6b..a495e16150 100644 --- a/src/simulation/m_hypoelastic.fpp +++ b/src/simulation/m_hypoelastic.fpp @@ -7,16 +7,12 @@ !> @brief This module is used to compute source terms for hypoelastic model module m_hypoelastic - ! Dependencies ============================================================= - use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters use m_mpi_proxy !< Message passing interface (MPI) module proxy - ! ========================================================================== - implicit none private; public :: s_initialize_hypoelastic_module, & diff --git a/src/simulation/m_ibm.fpp b/src/simulation/m_ibm.fpp index 904c65147b..3ed21dab9b 100644 --- a/src/simulation/m_ibm.fpp +++ b/src/simulation/m_ibm.fpp @@ -7,7 +7,6 @@ !> @brief This module is used to handle all operations related to immersed !! boundary methods (IBMs) module m_ibm - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types @@ -19,8 +18,6 @@ module m_ibm use m_helper - ! ========================================================================== - implicit none private :: s_compute_image_points, & diff --git a/src/simulation/m_mpi_proxy.fpp b/src/simulation/m_mpi_proxy.fpp index f97194d6ad..85a9deba7d 100644 --- a/src/simulation/m_mpi_proxy.fpp +++ b/src/simulation/m_mpi_proxy.fpp @@ -12,7 +12,6 @@ !! goals for the simulation. module m_mpi_proxy - ! Dependencies ============================================================= #ifdef MFC_MPI use mpi !< Message passing interface (MPI) module #endif @@ -30,7 +29,6 @@ module m_mpi_proxy use m_nvtx use ieee_arithmetic - ! ========================================================================== implicit none @@ -162,7 +160,7 @@ contains !! available to the other processors. Then, the purpose of !! this subroutine is to distribute the user inputs to the !! remaining processors in the communicator. - subroutine s_mpi_bcast_user_inputs() ! --------------------------------- + subroutine s_mpi_bcast_user_inputs() #ifdef MFC_MPI @@ -345,7 +343,7 @@ contains return end if - ! 3D Cartesian Processor Topology ================================== + ! 3D Cartesian Processor Topology if (n > 0) then if (p > 0) then @@ -479,9 +477,9 @@ contains ! Finding the Cartesian coordinates of the local process call MPI_CART_COORDS(MPI_COMM_CART, proc_rank, 3, & proc_coords, ierr) - ! END: 3D Cartesian Processor Topology ============================= + ! END: 3D Cartesian Processor Topology - ! Global Parameters for z-direction ================================ + ! Global Parameters for z-direction ! Number of remaining cells rem_cells = mod(p + 1, num_procs_z) @@ -519,9 +517,8 @@ contains start_idx(3) = (p + 1)*proc_coords(3) + rem_cells end if end if - ! ================================================================== - ! 2D Cartesian Processor Topology ================================== + ! 2D Cartesian Processor Topology else ! Initial estimate of optimal processor topology @@ -583,9 +580,9 @@ contains proc_coords, ierr) end if - ! END: 2D Cartesian Processor Topology ============================= + ! END: 2D Cartesian Processor Topology - ! Global Parameters for y-direction ================================ + ! Global Parameters for y-direction ! Number of remaining cells rem_cells = mod(n + 1, num_procs_y) @@ -624,9 +621,7 @@ contains end if end if - ! ================================================================== - - ! 1D Cartesian Processor Topology ================================== + ! 1D Cartesian Processor Topology else ! Optimal processor topology @@ -642,9 +637,8 @@ contains proc_coords, ierr) end if - ! ================================================================== - ! Global Parameters for x-direction ================================ + ! Global Parameters for x-direction ! Number of remaining cells rem_cells = mod(m + 1, num_procs_x) @@ -680,7 +674,6 @@ contains start_idx(1) = (m + 1)*proc_coords(1) + rem_cells end if end if - ! ================================================================== #endif @@ -703,7 +696,7 @@ contains #ifdef MFC_MPI - ! MPI Communication in x-direction ================================= + ! MPI Communication in x-direction if (mpi_dir == 1) then if (pbc_loc == -1) then ! PBC at the beginning @@ -755,9 +748,9 @@ contains end if end if - ! END: MPI Communication in x-direction ============================ + ! END: MPI Communication in x-direction - ! MPI Communication in y-direction ================================= + ! MPI Communication in y-direction elseif (mpi_dir == 2) then if (pbc_loc == -1) then ! PBC at the beginning @@ -809,9 +802,9 @@ contains end if end if - ! END: MPI Communication in y-direction ============================ + ! END: MPI Communication in y-direction - ! MPI Communication in z-direction ================================= + ! MPI Communication in z-direction else if (pbc_loc == -1) then ! PBC at the beginning @@ -865,7 +858,7 @@ contains end if end if - ! END: MPI Communication in z-direction ============================ + ! END: MPI Communication in z-direction #endif @@ -1338,7 +1331,7 @@ contains !nCalls_time = nCalls_time + 1 - ! MPI Communication in x-direction ================================= + ! MPI Communication in x-direction if (bc_x%beg >= 0) then ! PBC at the beginning if (bc_x%end >= 0) then ! PBC at the beginning and end @@ -1598,9 +1591,9 @@ contains end do end if - ! END: MPI Communication in x-direction ============================ + ! END: MPI Communication in x-direction - ! MPI Communication in y-direction ================================= + ! MPI Communication in y-direction if (bc_y%beg >= 0) then ! PBC at the beginning @@ -1873,9 +1866,9 @@ contains end do end if - ! END: MPI Communication in y-direction ============================ + ! END: MPI Communication in y-direction - ! MPI Communication in z-direction ================================= + ! MPI Communication in z-direction if (bc_z%beg >= 0) then ! PBC at the beginning if (bc_z%end >= 0) then ! PBC at the beginning and end @@ -2150,7 +2143,7 @@ contains end if - ! END: MPI Communication in z-direction ============================ + ! END: MPI Communication in z-direction #endif diff --git a/src/simulation/m_qbmm.fpp b/src/simulation/m_qbmm.fpp index 57b6548d79..3c111c4fb1 100644 --- a/src/simulation/m_qbmm.fpp +++ b/src/simulation/m_qbmm.fpp @@ -8,8 +8,6 @@ !> @brief This module is used to compute moment inversion via qbmm module m_qbmm - ! Dependencies ============================================================= - use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -22,8 +20,6 @@ module m_qbmm use m_helper - ! ========================================================================== - implicit none private; public :: s_initialize_qbmm_module, s_mom_inv, s_coeff, s_compute_qbmm_rhs diff --git a/src/simulation/m_rhs.fpp b/src/simulation/m_rhs.fpp index ec70e16b8e..cf1022f14e 100644 --- a/src/simulation/m_rhs.fpp +++ b/src/simulation/m_rhs.fpp @@ -19,7 +19,6 @@ !! in the volume fraction model. module m_rhs - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -59,7 +58,6 @@ module m_rhs use m_body_forces use m_chemistry - ! ========================================================================== implicit none @@ -237,8 +235,6 @@ contains @:ACC_SETUP_SFs(tau_Re_vf(E_idx)) end if - ! ================================================================== - if (qbmm) then @:ALLOCATE(mom_sp(1:nmomsp), mom_3d(0:2, 0:2, nb)) @@ -263,7 +259,7 @@ contains end do end if - ! Allocation/Association of qK_cons_n and qK_prim_n ========== + ! Allocation/Association of qK_cons_n and qK_prim_n @:ALLOCATE(qL_prim(1:num_dims)) @:ALLOCATE(qR_prim(1:num_dims)) @@ -280,7 +276,7 @@ contains if (mpp_lim .and. bubbles_euler) then @:ALLOCATE(alf_sum%sf(idwbuff(1)%beg:idwbuff(1)%end, idwbuff(2)%beg:idwbuff(2)%end, idwbuff(3)%beg:idwbuff(3)%end)) end if - ! END: Allocation/Association of qK_cons_n and qK_prim_n ====== + ! END: Allocation/Association of qK_cons_n and qK_prim_n @:ALLOCATE(qL_rsx_vf(idwbuff(1)%beg:idwbuff(1)%end, & idwbuff(2)%beg:idwbuff(2)%end, idwbuff(3)%beg:idwbuff(3)%end, 1:sys_size)) @@ -313,7 +309,7 @@ contains end if - ! Allocation of dq_prim_ds_qp ====================================== + ! Allocation of dq_prim_ds_qp @:ALLOCATE(dq_prim_dx_qp(1:1)) @:ALLOCATE(dq_prim_dy_qp(1:1)) @@ -375,9 +371,9 @@ contains end if end do end if - ! END: Allocation of dq_prim_ds_qp ================================= + ! END: Allocation of dq_prim_ds_qp - ! Allocation/Association of dqK_prim_ds_n ======================= + ! Allocation/Association of dqK_prim_ds_n @:ALLOCATE(dqL_prim_dx_n(1:num_dims)) @:ALLOCATE(dqL_prim_dy_n(1:num_dims)) @:ALLOCATE(dqL_prim_dz_n(1:num_dims)) @@ -435,7 +431,7 @@ contains @:ACC_SETUP_VFs(dqR_prim_dx_n(i), dqR_prim_dy_n(i), dqR_prim_dz_n(i)) end do end if - ! END: Allocation/Association of d K_prim_ds_n ================== + ! END: Allocation/Association of d K_prim_ds_n if (viscous) then if (weno_Re_flux) then @@ -473,14 +469,11 @@ contains end if end if - ! ================================================================== - - ! Allocation of gm_alphaK_n ===================================== + ! Allocation of gm_alphaK_n @:ALLOCATE(gm_alphaL_n(1:num_dims)) @:ALLOCATE(gm_alphaR_n(1:num_dims)) - ! ================================================================== - ! Allocation/Association of flux_n, flux_src_n, and flux_gsrc_n === + ! Allocation/Association of flux_n, flux_src_n, and flux_gsrc_n @:ALLOCATE(flux_n(1:num_dims)) @:ALLOCATE(flux_src_n(1:num_dims)) @:ALLOCATE(flux_gsrc_n(1:num_dims)) @@ -562,7 +555,7 @@ contains end if end do - ! END: Allocation/Association of flux_n, flux_src_n, and flux_gsrc_n === + ! END: Allocation/Association of flux_n, flux_src_n, and flux_gsrc_n if (alt_soundspeed) then @:ALLOCATE(blkmod1(0:m, 0:n, 0:p), blkmod2(0:m, 0:n, 0:p), alpha1(0:m, 0:n, 0:p), alpha2(0:m, 0:n, 0:p), Kterm(0:m, 0:n, 0:p)) @@ -626,7 +619,7 @@ contains call nvtxStartRange("COMPUTE-RHS") call cpu_time(t_start) - ! Association/Population of Working Variables ====================== + ! Association/Population of Working Variables !$acc parallel loop collapse(4) gang vector default(present) do i = 1, sys_size do l = idwbuff(3)%beg, idwbuff(3)%end @@ -638,9 +631,7 @@ contains end do end do - ! ================================================================== - - ! Converting Conservative to Primitive Variables ================== + ! Converting Conservative to Primitive Variables if (mpp_lim .and. bubbles_euler) then !$acc parallel loop collapse(3) gang vector default(present) @@ -684,8 +675,6 @@ contains if (t_step == t_step_stop) return end if - ! ================================================================== - if (qbmm) call s_mom_inv(q_cons_qp%vf, q_prim_qp%vf, mom_sp, mom_3d, pb, rhs_pb, mv, rhs_mv, idwbuff(1), idwbuff(2), idwbuff(3), nbub) if (viscous) then @@ -707,11 +696,11 @@ contains call s_get_capilary(q_prim_qp%vf) call nvtxEndRange end if - ! Dimensional Splitting Loop ======================================= + ! Dimensional Splitting Loop do id = 1, num_dims - ! Reconstructing Primitive/Conservative Variables =============== + ! Reconstructing Primitive/Conservative Variables call nvtxStartRange("RHS-WENO") @@ -775,7 +764,7 @@ contains call nvtxEndRange ! WENO - ! Configuring Coordinate Direction Indexes ====================== + ! Configuring Coordinate Direction Indexes if (id == 1) then irx%beg = -1; iry%beg = 0; irz%beg = 0 elseif (id == 2) then @@ -784,11 +773,10 @@ contains irx%beg = 0; iry%beg = 0; irz%beg = -1 end if irx%end = m; iry%end = n; irz%end = p - ! =============================================================== call nvtxStartRange("RHS-RIEMANN-SOLVER") - ! Computing Riemann Solver Flux and Source Flux ================= + ! Computing Riemann Solver Flux and Source Flux call nvtxStartRange("RHS_riemann_solver") call s_riemann_solver(qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, & dqR_prim_dx_n(id)%vf, & @@ -807,8 +795,7 @@ contains id, irx, iry, irz) call nvtxEndRange - ! =============================================================== - ! Additional physics and source terms =========================== + ! Additional physics and source terms ! RHS addition for advection source call nvtxStartRange("RHS-ADVECTION-SRC") call s_compute_advection_source_term(id, & @@ -860,10 +847,10 @@ contains rhs_mv) call nvtxEndRange end if - ! END: Additional physics and source terms ========================= + ! END: Additional physics and source terms end do - ! END: Dimensional Splitting Loop ================================= + ! END: Dimensional Splitting Loop if (ib) then !$acc parallel loop collapse(3) gang vector default(present) @@ -880,7 +867,7 @@ contains end do end if - ! Additional Physics and Source Temrs ================================== + ! Additional Physics and Source Temrs ! Additions for acoustic_source if (acoustic_source) then call nvtxStartRange("RHS-ACOUSTIC-SRC") @@ -908,7 +895,7 @@ contains call nvtxEndRange end if - ! END: Additional pphysics and source terms ============================ + ! END: Additional pphysics and source terms if (run_time_info .or. probe_wrt .or. ib .or. bubbles_lagrange) then !$acc parallel loop collapse(4) gang vector default(present) @@ -930,7 +917,6 @@ contains else time_avg = 0._wp end if - ! ================================================================== call nvtxEndRange @@ -1078,7 +1064,7 @@ contains end if elseif (idir == 2) then - ! RHS Contribution in y-direction =============================== + ! RHS Contribution in y-direction ! Applying the Riemann fluxes if (bc_y%beg <= -5 .and. bc_y%beg >= -13) then @@ -1251,7 +1237,7 @@ contains end if elseif (idir == 3) then - ! RHS Contribution in z-direction =============================== + ! RHS Contribution in z-direction ! Applying the Riemann fluxes @@ -1786,7 +1772,7 @@ contains end do end if - ! Pressures relaxation procedure =================================== + ! Pressures relaxation procedure ! Is the pressure relaxation procedure necessary? relax = 1 @@ -1869,9 +1855,7 @@ contains end do end if - ! ================================================================== - - ! Mixture-total-energy correction ================================== + ! Mixture-total-energy correction ! The mixture-total-energy correction of the mixture pressure P is not necessary here ! because the primitive variables are directly recovered later on by the conservative @@ -1969,7 +1953,6 @@ contains q_cons_vf(i + advxb - 1)%sf(j, k, l)* & (gammas(i)*pres_relax + pi_infs(i)) end do - ! ================================================================== end do end do end do @@ -1996,7 +1979,7 @@ contains integer :: weno_dir !< Coordinate direction of the WENO reconstruction - ! Reconstruction in s1-direction =================================== + ! Reconstruction in s1-direction if (norm_dir == 1) then is1 = idwbuff(1); is2 = idwbuff(2); is3 = idwbuff(3) @@ -2036,7 +2019,6 @@ contains is1, is2, is3) end if - ! ================================================================== end subroutine s_reconstruct_cell_boundary_values subroutine s_reconstruct_cell_boundary_values_first_order(v_vf, vL_x, vL_y, vL_z, vR_x, vR_y, vR_z, & @@ -2050,7 +2032,7 @@ contains integer :: recon_dir !< Coordinate direction of the WENO reconstruction integer :: i, j, k, l - ! Reconstruction in s1-direction =================================== + ! Reconstruction in s1-direction if (norm_dir == 1) then is1 = idwbuff(1); is2 = idwbuff(2); is3 = idwbuff(3) diff --git a/src/simulation/m_riemann_solvers.fpp b/src/simulation/m_riemann_solvers.fpp index 5da0a56d4a..04513e71ae 100644 --- a/src/simulation/m_riemann_solvers.fpp +++ b/src/simulation/m_riemann_solvers.fpp @@ -24,7 +24,6 @@ module m_riemann_solvers - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -46,7 +45,6 @@ module m_riemann_solvers get_mixture_specific_heat_cv_mass, get_mixture_energy_mass, & get_species_specific_heats_r, get_species_enthalpies_rt, & get_mixture_specific_heat_cp_mass - ! ========================================================================== implicit none @@ -212,7 +210,7 @@ contains !! For more information please refer to: !! 1) s_compute_cartesian_viscous_source_flux !! 2) s_compute_cylindrical_viscous_source_flux - subroutine s_compute_viscous_source_flux(velL_vf, & ! ------------- + subroutine s_compute_viscous_source_flux(velL_vf, & dvelL_dx_vf, & dvelL_dy_vf, & dvelL_dz_vf, & @@ -240,7 +238,7 @@ contains type(int_bounds_info), intent(IN) :: ix, iy, iz if (grid_geometry == 3) then - call s_compute_cylindrical_viscous_source_flux(velL_vf, & ! ------------- + call s_compute_cylindrical_viscous_source_flux(velL_vf, & dvelL_dx_vf, & dvelL_dy_vf, & dvelL_dz_vf, & @@ -252,7 +250,7 @@ contains norm_dir, & ix, iy, iz) else - call s_compute_cartesian_viscous_source_flux(velL_vf, & ! ------------- + call s_compute_cartesian_viscous_source_flux(velL_vf, & dvelL_dx_vf, & dvelL_dy_vf, & dvelL_dz_vf, & @@ -266,7 +264,7 @@ contains end if end subroutine s_compute_viscous_source_flux - subroutine s_hll_riemann_solver(qL_prim_rsx_vf, qL_prim_rsy_vf, qL_prim_rsz_vf, dqL_prim_dx_vf, & ! ------- + subroutine s_hll_riemann_solver(qL_prim_rsx_vf, qL_prim_rsy_vf, qL_prim_rsz_vf, dqL_prim_dx_vf, & dqL_prim_dy_vf, & dqL_prim_dz_vf, & qL_prim_vf, & @@ -2921,7 +2919,7 @@ contains !$acc update device(isx, isy, isz) ! for stuff in the same module !$acc update device(dir_idx, dir_flg, dir_idx_tau) ! for stuff in different modules - ! Population of Buffers in x-direction ============================= + ! Population of Buffers in x-direction if (norm_dir == 1) then if (bc_x%beg == -4) then ! Riemann state extrap. BC at beginning @@ -3033,9 +3031,9 @@ contains end if end if - ! END: Population of Buffers in x-direction ======================== + ! END: Population of Buffers in x-direction - ! Population of Buffers in y-direction ============================= + ! Population of Buffers in y-direction elseif (norm_dir == 2) then if (bc_y%beg == -4) then ! Riemann state extrap. BC at beginning @@ -3136,9 +3134,9 @@ contains end if end if - ! END: Population of Buffers in y-direction ======================== + ! END: Population of Buffers in y-direction - ! Population of Buffers in z-direction ============================= + ! Population of Buffers in z-direction else if (bc_z%beg == -4) then ! Riemann state extrap. BC at beginning @@ -3231,7 +3229,7 @@ contains end if end if - ! END: Population of Buffers in z-direction ======================== + ! END: Population of Buffers in z-direction end subroutine s_populate_riemann_states_variables_buffers @@ -3267,7 +3265,7 @@ contains integer :: i, j, k, l ! Generic loop iterators - ! Reshaping Inputted Data in x-direction =========================== + ! Reshaping Inputted Data in x-direction if (norm_dir == 1) then @@ -3299,9 +3297,7 @@ contains end do end if - ! ================================================================== - - ! Reshaping Inputted Data in y-direction =========================== + ! Reshaping Inputted Data in y-direction elseif (norm_dir == 2) then if (viscous .or. (surface_tension)) then @@ -3330,9 +3326,7 @@ contains end do end if - ! ================================================================== - - ! Reshaping Inputted Data in z-direction =========================== + ! Reshaping Inputted Data in z-direction else if (viscous .or. (surface_tension)) then @@ -3363,8 +3357,6 @@ contains end if - ! ================================================================== - end subroutine s_initialize_riemann_solver !> The goal of this subroutine is to evaluate and account @@ -3424,7 +3416,7 @@ contains ! Generic loop iterators integer :: i, j, k, l - ! Viscous Stresses in z-direction ================================== + ! Viscous Stresses in z-direction if (norm_dir == 1) then if (shear_stress) then ! Shear stresses !$acc parallel loop collapse(3) gang vector default(present) private(avg_vel, dvel_avg_dx, tau_Re) @@ -3620,9 +3612,9 @@ contains end do end do end if - ! END: Viscous Stresses in z-direction ============================= + ! END: Viscous Stresses in z-direction - ! Viscous Stresses in r-direction ================================== + ! Viscous Stresses in r-direction elseif (norm_dir == 2) then if (shear_stress) then ! Shear stresses @@ -3780,9 +3772,9 @@ contains end do end do end if - ! END: Viscous Stresses in r-direction ============================= + ! END: Viscous Stresses in r-direction - ! Viscous Stresses in theta-direction ================================== + ! Viscous Stresses in theta-direction else if (shear_stress) then ! Shear stresses @@ -3890,7 +3882,7 @@ contains end if end if - ! END: Viscous Stresses in theta-direction ============================= + ! END: Viscous Stresses in theta-direction end subroutine s_compute_cylindrical_viscous_source_flux @@ -3947,7 +3939,7 @@ contains integer :: i, j, k, l !< Generic loop iterators - ! Viscous Stresses in x-direction ================================== + ! Viscous Stresses in x-direction if (norm_dir == 1) then if (shear_stress) then ! Shear stresses @@ -4138,9 +4130,9 @@ contains end do end do end if - ! END: Viscous Stresses in x-direction ============================= + ! END: Viscous Stresses in x-direction - ! Viscous Stresses in y-direction ================================== + ! Viscous Stresses in y-direction elseif (norm_dir == 2) then if (shear_stress) then ! Shear stresses @@ -4285,9 +4277,9 @@ contains end do end do end if - ! END: Viscous Stresses in y-direction ============================= + ! END: Viscous Stresses in y-direction - ! Viscous Stresses in z-direction ================================== + ! Viscous Stresses in z-direction else if (shear_stress) then ! Shear stresses @@ -4382,7 +4374,7 @@ contains end if end if - ! END: Viscous Stresses in z-direction ============================= + ! END: Viscous Stresses in z-direction end subroutine s_compute_cartesian_viscous_source_flux @@ -4408,7 +4400,7 @@ contains integer :: i, j, k, l !< Generic loop iterators - ! Reshaping Outputted Data in y-direction ========================== + ! Reshaping Outputted Data in y-direction if (norm_dir == 2) then !$acc parallel loop collapse(4) gang vector default(present) do i = 1, sys_size @@ -4460,8 +4452,7 @@ contains end do end if - ! ================================================================== - ! Reshaping Outputted Data in z-direction ========================== + ! Reshaping Outputted Data in z-direction elseif (norm_dir == 3) then !$acc parallel loop collapse(4) gang vector default(present) do i = 1, sys_size @@ -4552,10 +4543,6 @@ contains end if end if - ! ================================================================== - - ! ================================================================== - end subroutine s_finalize_riemann_solver !> Module deallocation and/or disassociation procedures diff --git a/src/simulation/m_sim_helpers.f90 b/src/simulation/m_sim_helpers.f90 index 35954f2b23..fdb387cbc5 100644 --- a/src/simulation/m_sim_helpers.f90 +++ b/src/simulation/m_sim_helpers.f90 @@ -1,12 +1,10 @@ module m_sim_helpers - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters use m_variables_conversion - ! ========================================================================== implicit none diff --git a/src/simulation/m_start_up.fpp b/src/simulation/m_start_up.fpp index be757f9144..af3c33500f 100644 --- a/src/simulation/m_start_up.fpp +++ b/src/simulation/m_start_up.fpp @@ -18,7 +18,6 @@ !! setting up the time stepping, domain decomposition and I/O procedures. module m_start_up - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -82,8 +81,6 @@ module m_start_up use m_body_forces - ! ========================================================================== - implicit none private; public :: s_read_input_file, & @@ -225,7 +222,7 @@ contains ! Logical used to check the existence of the current directory file logical :: file_exist - ! Logistics ======================================================== + ! Logistics file_path = trim(case_dir)//'/.' call my_inquire(file_path, file_exist) @@ -233,7 +230,6 @@ contains if (file_exist .neqv. .true.) then call s_mpi_abort(trim(file_path)//' is missing. Exiting ...') end if - ! ================================================================== call s_check_inputs_common() call s_check_inputs() @@ -278,7 +274,7 @@ contains call s_mpi_abort(trim(file_path)//' is missing. Exiting ...') end if - ! Cell-boundary Locations in x-direction =========================== + ! Cell-boundary Locations in x-direction file_path = trim(t_step_dir)//'/x_cb.dat' inquire (FILE=trim(file_path), EXIST=file_exist) @@ -303,9 +299,8 @@ contains end if end do end if - ! ================================================================== - ! Cell-boundary Locations in y-direction =========================== + ! Cell-boundary Locations in y-direction if (n > 0) then file_path = trim(t_step_dir)//'/y_cb.dat' @@ -326,9 +321,8 @@ contains y_cc(0:n) = y_cb(-1:n - 1) + dy(0:n)/2._wp end if - ! ================================================================== - ! Cell-boundary Locations in z-direction =========================== + ! Cell-boundary Locations in z-direction if (p > 0) then file_path = trim(t_step_dir)//'/z_cb.dat' @@ -349,7 +343,6 @@ contains z_cc(0:p) = z_cb(-1:p - 1) + dz(0:p)/2._wp end if - ! ================================================================== do i = 1, sys_size write (file_path, '(A,I0,A)') & @@ -403,10 +396,8 @@ contains end do end if end if - ! ================================================================== - - ! Read IBM Data ==================================================== + ! Read IBM Data if (ib) then ! Read IB markers write (file_path, '(A,I0,A)') & @@ -949,7 +940,7 @@ contains integer :: i !< Generic loop iterator - ! Population of Buffers in x-direction ============================= + ! Population of Buffers in x-direction ! Populating cell-width distribution buffer, at the beginning of the ! coordinate direction, based on the selected boundary condition. In @@ -1013,9 +1004,9 @@ contains x_cc(m + i) = x_cc(m + (i - 1)) + (dx(m + (i - 1)) + dx(m + i))/2._wp end do - ! END: Population of Buffers in x-direction ======================== + ! END: Population of Buffers in x-direction - ! Population of Buffers in y-direction ============================= + ! Population of Buffers in y-direction ! Populating cell-width distribution buffer, at the beginning of the ! coordinate direction, based on the selected boundary condition. In @@ -1081,9 +1072,9 @@ contains y_cc(n + i) = y_cc(n + (i - 1)) + (dy(n + (i - 1)) + dy(n + i))/2._wp end do - ! END: Population of Buffers in y-direction ======================== + ! END: Population of Buffers in y-direction - ! Population of Buffers in z-direction ============================= + ! Population of Buffers in z-direction ! Populating cell-width distribution buffer, at the beginning of the ! coordinate direction, based on the selected boundary condition. In @@ -1149,7 +1140,7 @@ contains z_cc(p + i) = z_cc(p + (i - 1)) + (dz(p + (i - 1)) + dz(p + i))/2._wp end do - ! END: Population of Buffers in z-direction ======================== + ! END: Population of Buffers in z-direction end subroutine s_populate_grid_variables_buffers diff --git a/src/simulation/m_surface_tension.fpp b/src/simulation/m_surface_tension.fpp index 12cb8e48a9..0f9a24a51a 100644 --- a/src/simulation/m_surface_tension.fpp +++ b/src/simulation/m_surface_tension.fpp @@ -4,8 +4,6 @@ !> @brief This module is used to compute source terms for surface tension model module m_surface_tension - ! Dependencies ============================================================= - use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -19,7 +17,6 @@ module m_surface_tension use m_helper use m_boundary_conditions - ! ========================================================================== implicit none @@ -314,7 +311,7 @@ contains integer :: i, j, k, l - ! Reconstruction in s1-direction =================================== + ! Reconstruction in s1-direction if (norm_dir == 1) then is1 = idwbuff(1); is2 = idwbuff(2); is3 = idwbuff(3) diff --git a/src/simulation/m_time_steppers.fpp b/src/simulation/m_time_steppers.fpp index fcf4e9cc45..fbe443a2d3 100644 --- a/src/simulation/m_time_steppers.fpp +++ b/src/simulation/m_time_steppers.fpp @@ -12,7 +12,6 @@ !! where TVD designates a total-variation-diminishing time-stepper. module m_time_steppers - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -44,7 +43,6 @@ module m_time_steppers use m_thermochem, only: num_species use m_body_forces - ! ========================================================================== implicit none @@ -311,7 +309,7 @@ contains integer :: i, j, k, l, q !< Generic loop iterator - ! Stage 1 of 1 ===================================================== + ! Stage 1 of 1 call nvtxStartRange("TIMESTEP") call s_compute_rhs(q_cons_ts(1)%vf, q_T_sf, q_prim_vf, rhs_vf, pb_ts(1)%sf, rhs_pb, mv_ts(1)%sf, rhs_mv, t_step, time_avg) @@ -408,8 +406,6 @@ contains end if end if - ! ================================================================== - end subroutine s_1st_order_tvd_rk !> 2nd order TVD RK time-stepping algorithm @@ -422,7 +418,7 @@ contains integer :: i, j, k, l, q!< Generic loop iterator real(wp) :: start, finish - ! Stage 1 of 2 ===================================================== + ! Stage 1 of 2 call cpu_time(start) @@ -514,9 +510,8 @@ contains call s_ibm_correct_state(q_cons_ts(2)%vf, q_prim_vf) end if end if - ! ================================================================== - ! Stage 2 of 2 ===================================================== + ! Stage 2 of 2 call s_compute_rhs(q_cons_ts(2)%vf, q_T_sf, q_prim_vf, rhs_vf, pb_ts(2)%sf, rhs_pb, mv_ts(2)%sf, rhs_mv, t_step, time_avg) @@ -596,13 +591,12 @@ contains call nvtxEndRange call cpu_time(finish) - ! ================================================================== end subroutine s_2nd_order_tvd_rk !> 3rd order TVD RK time-stepping algorithm !! @param t_step Current time-step - subroutine s_3rd_order_tvd_rk(t_step, time_avg) ! -------------------------------- + subroutine s_3rd_order_tvd_rk(t_step, time_avg) integer, intent(IN) :: t_step real(wp), intent(INOUT) :: time_avg @@ -611,7 +605,7 @@ contains real(wp) :: start, finish - ! Stage 1 of 3 ===================================================== + ! Stage 1 of 3 if (.not. adap_dt) then call cpu_time(start) @@ -704,9 +698,8 @@ contains call s_ibm_correct_state(q_cons_ts(2)%vf, q_prim_vf) end if end if - ! ================================================================== - ! Stage 2 of 3 ===================================================== + ! Stage 2 of 3 call s_compute_rhs(q_cons_ts(2)%vf, q_T_sf, q_prim_vf, rhs_vf, pb_ts(2)%sf, rhs_pb, mv_ts(2)%sf, rhs_mv, t_step, time_avg) @@ -782,9 +775,8 @@ contains call s_ibm_correct_state(q_cons_ts(2)%vf, q_prim_vf) end if end if - ! ================================================================== - ! Stage 3 of 3 ===================================================== + ! Stage 3 of 3 call s_compute_rhs(q_cons_ts(2)%vf, q_T_sf, q_prim_vf, rhs_vf, pb_ts(2)%sf, rhs_pb, mv_ts(2)%sf, rhs_mv, t_step, time_avg) if (bubbles_lagrange) then @@ -870,7 +862,6 @@ contains time = time + (finish - start) end if - ! ================================================================== end subroutine s_3rd_order_tvd_rk !> Strang splitting scheme with 3rd order TVD RK time-stepping algorithm for @@ -888,13 +879,13 @@ contains call nvtxStartRange("TIMESTEP") - ! Stage 1 of 3 ===================================================== + ! Stage 1 of 3 call s_adaptive_dt_bubble(t_step) - ! Stage 2 of 3 ===================================================== + ! Stage 2 of 3 call s_3rd_order_tvd_rk(t_step, time_avg) - ! Stage 3 of 3 ===================================================== + ! Stage 3 of 3 call s_adaptive_dt_bubble(t_step) call nvtxEndRange @@ -903,8 +894,6 @@ contains time = time + (finish - start) - ! ================================================================== - end subroutine s_strang_splitting !> Bubble source part in Strang operator splitting scheme @@ -926,7 +915,7 @@ contains call s_comp_alpha_from_n(q_cons_ts(1)%vf) - end subroutine s_adaptive_dt_bubble ! ------------------------------ + end subroutine s_adaptive_dt_bubble subroutine s_compute_dt() diff --git a/src/simulation/m_viscous.fpp b/src/simulation/m_viscous.fpp index 34857e95fb..44d6bbf62a 100644 --- a/src/simulation/m_viscous.fpp +++ b/src/simulation/m_viscous.fpp @@ -6,7 +6,6 @@ !> @brief The module contains the subroutines used to compute viscous terms. module m_viscous - ! Dependencies ============================================================= use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -16,7 +15,6 @@ module m_viscous use m_helper use m_finite_differences - ! ========================================================================== private; public s_get_viscous, & s_compute_viscous_stress_tensor, & @@ -978,7 +976,7 @@ contains integer :: i, j, k, l - ! Reconstruction in s1-direction =================================== + ! Reconstruction in s1-direction if (norm_dir == 1) then is1_viscous = ix; is2_viscous = iy; is3_viscous = iz @@ -1060,8 +1058,6 @@ contains end if end if - ! ================================================================== - end subroutine s_reconstruct_cell_boundary_values_visc subroutine s_reconstruct_cell_boundary_values_visc_deriv(v_vf, vL_x, vL_y, vL_z, vR_x, vR_y, vR_z, & @@ -1077,7 +1073,7 @@ contains integer :: weno_dir !< Coordinate direction of the WENO reconstruction integer :: i, j, k, l - ! Reconstruction in s1-direction =================================== + ! Reconstruction in s1-direction if (norm_dir == 1) then is1_viscous = ix; is2_viscous = iy; is3_viscous = iz @@ -1160,7 +1156,6 @@ contains end if end if end if - ! ================================================================== end subroutine s_reconstruct_cell_boundary_values_visc_deriv @@ -1202,7 +1197,7 @@ contains !$acc update device(is1_viscous, is2_viscous, is3_viscous, iv) - ! First-Order Spatial Derivatives in x-direction =================== + ! First-Order Spatial Derivatives in x-direction if (norm_dir == 1) then ! A general application of the scalar divergence theorem that @@ -1228,9 +1223,9 @@ contains end do end do - ! END: First-Order Spatial Derivatives in x-direction ============== + ! END: First-Order Spatial Derivatives in x-direction - ! First-Order Spatial Derivatives in y-direction =================== + ! First-Order Spatial Derivatives in y-direction elseif (norm_dir == 2) then ! A general application of the scalar divergence theorem that @@ -1256,9 +1251,9 @@ contains end do end do - ! END: First-Order Spatial Derivatives in y-direction ============== + ! END: First-Order Spatial Derivatives in y-direction - ! First-Order Spatial Derivatives in z-direction =================== + ! First-Order Spatial Derivatives in z-direction else ! A general application of the scalar divergence theorem that @@ -1285,7 +1280,7 @@ contains end do end if - ! END: First-Order Spatial Derivatives in z-direction ============== + ! END: First-Order Spatial Derivatives in z-direction end subroutine s_apply_scalar_divergence_theorem diff --git a/src/simulation/m_weno.fpp b/src/simulation/m_weno.fpp index 28665db594..feb182b60f 100644 --- a/src/simulation/m_weno.fpp +++ b/src/simulation/m_weno.fpp @@ -17,7 +17,7 @@ !! WENO-Z but is less robust, is implemented according to the work !! of Fu et al. (2016). module m_weno - ! Dependencies ============================================================= + use m_derived_types !< Definitions of the derived types use m_global_parameters !< Definitions of the global parameters @@ -29,9 +29,6 @@ module m_weno #endif use m_mpi_proxy - ! ========================================================================== - - !implicit none private; public :: s_initialize_weno_module, s_initialize_weno, s_finalize_weno_module, s_weno @@ -47,7 +44,7 @@ module m_weno real(wp), allocatable, dimension(:, :, :, :) :: v_rs_ws_x, v_rs_ws_y, v_rs_ws_z !> @} - ! WENO Coefficients ======================================================== + ! WENO Coefficients !> @name Polynomial coefficients at the left and right cell-boundaries (CB) and at !! the left and right quadrature points (QP), in the x-, y- and z-directions. @@ -97,7 +94,7 @@ module m_weno ! real(wp), pointer, dimension(:, :, :) :: beta_coef => null() !> @} - ! END: WENO Coefficients =================================================== + ! END: WENO Coefficients integer :: v_size !< Number of WENO-reconstructed cell-average variables @@ -128,7 +125,7 @@ contains if (weno_order == 1) return - ! Allocating/Computing WENO Coefficients in x-direction ============ + ! Allocating/Computing WENO Coefficients in x-direction is1_weno%beg = -buff_size; is1_weno%end = m - is1_weno%beg if (n == 0) then is2_weno%beg = 0 @@ -164,9 +161,7 @@ contains @:ALLOCATE(v_rs_ws_x(is1_weno%beg:is1_weno%end, & is2_weno%beg:is2_weno%end, is3_weno%beg:is3_weno%end, 1:sys_size)) - ! ================================================================== - - ! Allocating/Computing WENO Coefficients in y-direction ============ + ! Allocating/Computing WENO Coefficients in y-direction if (n == 0) return is2_weno%beg = -buff_size; is2_weno%end = n - is2_weno%beg @@ -196,9 +191,7 @@ contains @:ALLOCATE(v_rs_ws_y(is2_weno%beg:is2_weno%end, & is1_weno%beg:is1_weno%end, is3_weno%beg:is3_weno%end, 1:sys_size)) - ! ================================================================== - - ! Allocating/Computing WENO Coefficients in z-direction ============ + ! Allocating/Computing WENO Coefficients in z-direction if (p == 0) return is2_weno%beg = -buff_size; is2_weno%end = n - is2_weno%beg @@ -221,8 +214,6 @@ contains @:ALLOCATE(v_rs_ws_z(is3_weno%beg:is3_weno%end, & is2_weno%beg:is2_weno%end, is1_weno%beg:is1_weno%end, 1:sys_size)) - ! ================================================================== - end subroutine s_initialize_weno_module !> The purpose of this subroutine is to compute the grid @@ -260,7 +251,7 @@ contains end if #:for WENO_DIR, XYZ in [(1, 'x'), (2, 'y'), (3, 'z')] - ! Computing WENO3 Coefficients ===================================== + ! Computing WENO3 Coefficients if (weno_dir == ${WENO_DIR}$) then if (weno_order == 3) then do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn @@ -303,9 +294,9 @@ contains d_cbL_${XYZ}$ (0, s) = 0._wp; d_cbL_${XYZ}$ (1, s) = 1._wp end if end if - ! END: Computing WENO3 Coefficients ================================ + ! END: Computing WENO3 Coefficients - ! Computing WENO5 Coefficients ===================================== + ! Computing WENO5 Coefficients elseif (weno_order == 5) then do i = is%beg - 1 + weno_polyn, is%end - 1 - weno_polyn @@ -645,7 +636,6 @@ contains end if #:endfor -! END: Computing WENO Coefficients ================================ if (weno_dir == 1) then !$acc update device(poly_coef_cbL_x, poly_coef_cbR_x, d_cbL_x, d_cbR_x, beta_coef_x) elseif (weno_dir == 2) then @@ -1170,9 +1160,8 @@ contains end do !$acc end parallel loop end if - ! ================================================================== - ! Reshaping/Projecting onto Characteristic Fields in y-direction === + ! Reshaping/Projecting onto Characteristic Fields in y-direction if (n == 0) return if (weno_dir == 2) then @@ -1213,9 +1202,7 @@ contains #endif end if - ! ================================================================== - - ! Reshaping/Projecting onto Characteristic Fields in z-direction === + ! Reshaping/Projecting onto Characteristic Fields in z-direction if (p == 0) return if (weno_dir == 3) then #if MFC_cuTENSOR @@ -1245,8 +1232,6 @@ contains #endif end if - ! ================================================================== - end subroutine s_initialize_weno !> The goal of this subroutine is to ensure that the WENO @@ -1355,9 +1340,9 @@ contains + sign(5e-1_wp, vL_max - vL_rs_vf(j, k, l, i))) & *min(abs(vL_min - vL_rs_vf(j, k, l, i)), & abs(vL_max - vL_rs_vf(j, k, l, i))) - ! END: Left Monotonicity Preserving Bound ========================== + ! END: Left Monotonicity Preserving Bound - ! Right Monotonicity Preserving Bound ============================== + ! Right Monotonicity Preserving Bound d(-1) = v_rs_ws(j, k, l, i) & + v_rs_ws(j - 2, k, l, i) & - v_rs_ws(j - 1, k, l, i) & @@ -1414,7 +1399,7 @@ contains + sign(5e-1_wp, vR_max - vR_rs_vf(j, k, l, i))) & *min(abs(vR_min - vR_rs_vf(j, k, l, i)), & abs(vR_max - vR_rs_vf(j, k, l, i))) - ! END: Right Monotonicity Preserving Bound ========================= + ! END: Right Monotonicity Preserving Bound end do end do end do @@ -1433,13 +1418,12 @@ contains !deallocate(vL_rs_vf_x, vR_rs_vf_x) @:DEALLOCATE(v_rs_ws_x) - ! Deallocating WENO coefficients in x-direction ==================== + ! Deallocating WENO coefficients in x-direction @:DEALLOCATE(poly_coef_cbL_x, poly_coef_cbR_x) @:DEALLOCATE(d_cbL_x, d_cbR_x) @:DEALLOCATE(beta_coef_x) - ! ================================================================== - ! Deallocating WENO coefficients in y-direction ==================== + ! Deallocating WENO coefficients in y-direction if (n == 0) return !deallocate(vL_rs_vf_y, vR_rs_vf_y) @@ -1448,9 +1432,8 @@ contains @:DEALLOCATE(poly_coef_cbL_y, poly_coef_cbR_y) @:DEALLOCATE(d_cbL_y, d_cbR_y) @:DEALLOCATE(beta_coef_y) - ! ================================================================== - ! Deallocating WENO coefficients in z-direction ==================== + ! Deallocating WENO coefficients in z-direction if (p == 0) return !deallocate(vL_rs_vf_z, vR_rs_vf_z) @@ -1459,7 +1442,6 @@ contains @:DEALLOCATE(poly_coef_cbL_z, poly_coef_cbR_z) @:DEALLOCATE(d_cbL_z, d_cbR_z) @:DEALLOCATE(beta_coef_z) - ! ================================================================== end subroutine s_finalize_weno_module diff --git a/src/simulation/p_main.fpp b/src/simulation/p_main.fpp index 052695cc2b..57dcbfbdf6 100644 --- a/src/simulation/p_main.fpp +++ b/src/simulation/p_main.fpp @@ -14,8 +14,6 @@ !! are only available in the volume fraction model. program p_main - ! Dependencies ============================================================= - use m_global_parameters !< Definitions of the global parameters use m_start_up @@ -23,7 +21,6 @@ program p_main use m_time_steppers use m_nvtx - ! ========================================================================== implicit none @@ -74,7 +71,7 @@ program p_main call nvtxEndRange ! INIT call nvtxStartRange("SIMULATION-TIME-MARCH") - ! Time-stepping Loop ======================================================= + ! Time-stepping Loop do if (cfl_dt) then @@ -106,7 +103,6 @@ program p_main call system_clock(cpu_end) end do - ! ========================================================================== call nvtxEndRange ! Simulation