accumulate_chemistry_screening_stats Subroutine

private subroutine accumulate_chemistry_screening_stats(nowned, nactive, skipped_temperature, skipped_named_species, skipped_legacy_mass_fraction, total_time, reactor_time, reactor_calls)

Accumulate local chemistry workload/screening statistics.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: nowned
integer, intent(in) :: nactive
integer, intent(in) :: skipped_temperature
integer, intent(in) :: skipped_named_species
integer, intent(in) :: skipped_legacy_mass_fraction
real(kind=rk), intent(in) :: total_time
real(kind=rk), intent(in) :: reactor_time
integer, intent(in), optional :: reactor_calls

Source Code

   subroutine accumulate_chemistry_screening_stats(nowned, nactive, skipped_temperature, &
                                                   skipped_named_species, skipped_legacy_mass_fraction, &
                                                   total_time, reactor_time, reactor_calls)
      integer, intent(in) :: nowned, nactive
      integer, intent(in) :: skipped_temperature, skipped_named_species, skipped_legacy_mass_fraction
      real(rk), intent(in) :: total_time, reactor_time
      integer, intent(in), optional :: reactor_calls
      integer :: nskipped

      nskipped = max(0, nowned - nactive)

      chemistry_stats_updates_local = chemistry_stats_updates_local + 1.0_rk
      chemistry_stats_owned_cells_local = chemistry_stats_owned_cells_local + real(nowned, rk)
      chemistry_stats_active_cells_local = chemistry_stats_active_cells_local + real(nactive, rk)
      chemistry_stats_skipped_cells_local = chemistry_stats_skipped_cells_local + real(nskipped, rk)
      if (present(reactor_calls)) then
         chemistry_stats_reactor_calls_local = chemistry_stats_reactor_calls_local + real(reactor_calls, rk)
      else
         chemistry_stats_reactor_calls_local = chemistry_stats_reactor_calls_local + real(nactive, rk)
      end if
      chemistry_stats_skipped_temperature_local = chemistry_stats_skipped_temperature_local + real(skipped_temperature, rk)
      chemistry_stats_skipped_named_species_local = chemistry_stats_skipped_named_species_local + real(skipped_named_species, rk)
      chemistry_stats_skipped_legacy_mass_fraction_local = chemistry_stats_skipped_legacy_mass_fraction_local + &
                                                           real(skipped_legacy_mass_fraction, rk)
      if (nowned > 0 .and. nactive <= 0) then
         chemistry_stats_all_skipped_updates_local = chemistry_stats_all_skipped_updates_local + 1.0_rk
      end if
      chemistry_stats_total_time_local = chemistry_stats_total_time_local + total_time
      chemistry_stats_reactor_time_local = chemistry_stats_reactor_time_local + reactor_time
   end subroutine accumulate_chemistry_screening_stats