The ParaMonte Documentation Website
Current view: top level - kernel/tests - Test_Batse_mod.f90 (source / functions) Hit Total Coverage
Test: ParaMonte 1.5.1 :: Coarray Parallel Kernel - Code Coverage Report Lines: 70 70 100.0 %
Date: 2021-01-08 12:59:07 Functions: 10 10 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       2             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       3             : !!!!
       4             : !!!!   MIT License
       5             : !!!!
       6             : !!!!   ParaMonte: plain powerful parallel Monte Carlo library.
       7             : !!!!
       8             : !!!!   Copyright (C) 2012-present, The Computational Data Science Lab
       9             : !!!!
      10             : !!!!   This file is part of the ParaMonte library.
      11             : !!!!
      12             : !!!!   Permission is hereby granted, free of charge, to any person obtaining a
      13             : !!!!   copy of this software and associated documentation files (the "Software"),
      14             : !!!!   to deal in the Software without restriction, including without limitation
      15             : !!!!   the rights to use, copy, modify, merge, publish, distribute, sublicense,
      16             : !!!!   and/or sell copies of the Software, and to permit persons to whom the
      17             : !!!!   Software is furnished to do so, subject to the following conditions:
      18             : !!!!
      19             : !!!!   The above copyright notice and this permission notice shall be
      20             : !!!!   included in all copies or substantial portions of the Software.
      21             : !!!!
      22             : !!!!   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
      23             : !!!!   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
      24             : !!!!   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
      25             : !!!!   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
      26             : !!!!   DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
      27             : !!!!   OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
      28             : !!!!   OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
      29             : !!!!
      30             : !!!!   ACKNOWLEDGMENT
      31             : !!!!
      32             : !!!!   ParaMonte is an honor-ware and its currency is acknowledgment and citations.
      33             : !!!!   As per the ParaMonte library license agreement terms, if you use any parts of
      34             : !!!!   this library for any purposes, kindly acknowledge the use of ParaMonte in your
      35             : !!!!   work (education/research/industry/development/...) by citing the ParaMonte
      36             : !!!!   library as described on this page:
      37             : !!!!
      38             : !!!!       https://github.com/cdslaborg/paramonte/blob/main/ACKNOWLEDGMENT.md
      39             : !!!!
      40             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      41             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      42             : 
      43             : !>  \brief This module contains tests of the module [Batse_mod](@ref batse_mod).
      44             : !>  \author Amir Shahmoradi
      45             : 
      46             : module Test_Batse_mod
      47             : 
      48             :     !use Constants_mod, only: IK, RK
      49             :     use Batse_mod
      50             :     use Test_mod, only: Test_type
      51             :     implicit none
      52             : 
      53             :     private
      54             :     public :: test_Batse
      55             : 
      56             :     type(Test_type) :: Test
      57             : 
      58             :     integer(IK) , parameter :: np = 86
      59             :     real(RK)    , parameter :: LOG10PBOL = 0._RK
      60             :     real(RK)    , parameter :: LOG10EPK_LOG10PH(2,np)   = reshape( &
      61             :                                                         [ -3.0000000000000000_RK, 4.92000000000000_RK &
      62             :                                                         , -2.9000000000000000_RK, 4.92271550938680_RK &
      63             :                                                         , -2.8000000000000000_RK, 4.94170723276800_RK &
      64             :                                                         , -2.7000000000000000_RK, 4.96223780646120_RK &
      65             :                                                         , -2.6000000000000000_RK, 4.98414439011840_RK &
      66             :                                                         , -2.5000000000000000_RK, 5.00727609375000_RK &
      67             :                                                         , -2.4000000000000000_RK, 5.03149354874880_RK &
      68             :                                                         , -2.3000000000000000_RK, 5.05666847891400_RK &
      69             :                                                         , -2.2000000000000000_RK, 5.08268327147520_RK &
      70             :                                                         , -2.1000000000000000_RK, 5.10943054811640_RK &
      71             :                                                         , -2.0000000000000000_RK, 5.13681273600000_RK &
      72             :                                                         , -1.9000000000000000_RK, 5.16474163879080_RK &
      73             :                                                         , -1.8000000000000000_RK, 5.19313800768000_RK &
      74             :                                                         , -1.7000000000000000_RK, 5.22193111240920_RK &
      75             :                                                         , -1.6000000000000000_RK, 5.25105831229440_RK &
      76             :                                                         , -1.5000000000000000_RK, 5.28046462725000_RK &
      77             :                                                         , -1.4000000000000000_RK, 5.31010230881280_RK &
      78             :                                                         , -1.3000000000000000_RK, 5.33993041116600_RK &
      79             :                                                         , -1.2000000000000000_RK, 5.36991436216320_RK &
      80             :                                                         , -1.1000000000000000_RK, 5.40002553435240_RK &
      81             :                                                         , -1.0000000000000000_RK, 5.43024081600000_RK &
      82             :                                                         , -0.9000000000000000_RK, 5.46054218211480_RK &
      83             :                                                         , -0.8000000000000000_RK, 5.49091626547200_RK &
      84             :                                                         , -0.7000000000000000_RK, 5.52135392763720_RK &
      85             :                                                         , -0.6000000000000000_RK, 5.55184982999040_RK &
      86             :                                                         , -0.5000000000000000_RK, 5.58240200475000_RK &
      87             :                                                         , -0.4000000000000000_RK, 5.61301142599680_RK &
      88             :                                                         , -0.3000000000000000_RK, 5.64368158069800_RK &
      89             :                                                         , -0.2000000000000000_RK, 5.67441803973120_RK &
      90             :                                                         , -0.0999999999999996_RK, 5.70522802890840_RK &
      91             :                                                         , 0.00000000000000000_RK, 5.73612000000000_RK &
      92             :                                                         , 0.10000000000000000_RK, 5.76710320175880_RK &
      93             :                                                         , 0.20000000000000000_RK, 5.79818725094400_RK &
      94             :                                                         , 0.30000000000000000_RK, 5.82938170334520_RK &
      95             :                                                         , 0.40000000000000000_RK, 5.86069562480640_RK &
      96             :                                                         , 0.50000000000000000_RK, 5.89213716225000_RK &
      97             :                                                         , 0.60000000000000000_RK, 5.92371311470080_RK &
      98             :                                                         , 0.70000000000000000_RK, 5.95542850431000_RK &
      99             :                                                         , 0.80000000000000000_RK, 5.98728614737920_RK &
     100             :                                                         , 0.90000000000000000_RK, 6.01928622538440_RK &
     101             :                                                         , 1.00000000000000000_RK, 6.05142585600000_RK &
     102             :                                                         , 1.10000000000000000_RK, 6.08369866412280_RK &
     103             :                                                         , 1.20000000000000000_RK, 6.11609435289600_RK &
     104             :                                                         , 1.30000000000000000_RK, 6.14859827473320_RK &
     105             :                                                         , 1.40000000000000000_RK, 6.18119100234240_RK &
     106             :                                                         , 1.50000000000000000_RK, 6.21425921875001_RK &
     107             :                                                         , 1.60000000000000000_RK, 6.24740828569600_RK &
     108             :                                                         , 1.70000000000000000_RK, 6.27826369177797_RK &
     109             :                                                         , 1.80000000000000000_RK, 6.30171825203203_RK &
     110             :                                                         , 1.90000000000000000_RK, 6.31516935429406_RK &
     111             :                                                         , 2.00000000000000000_RK, 6.31782000000002_RK &
     112             :                                                         , 2.10000000000000000_RK, 6.30989986450613_RK &
     113             :                                                         , 2.20000000000000000_RK, 6.29197575116811_RK &
     114             :                                                         , 2.30000000000000000_RK, 6.26452081342198_RK &
     115             :                                                         , 2.40000000000000000_RK, 6.22791191910419_RK &
     116             :                                                         , 2.50000000000000000_RK, 6.18562562500000_RK &
     117             :                                                         , 2.60000000000000000_RK, 6.13382209600000_RK &
     118             :                                                         , 2.70000000000000000_RK, 6.07721678100000_RK &
     119             :                                                         , 2.80000000000000000_RK, 6.01662553600000_RK &
     120             :                                                         , 2.90000000000000000_RK, 5.95282848100000_RK &
     121             :                                                         , 3.00000000000000000_RK, 5.88657000000000_RK &
     122             :                                                         , 3.10000000000000000_RK, 5.81855874100000_RK &
     123             :                                                         , 3.20000000000000000_RK, 5.74946761600000_RK &
     124             :                                                         , 3.30000000000000000_RK, 5.67993380100000_RK &
     125             :                                                         , 3.40000000000000000_RK, 5.61055873600000_RK &
     126             :                                                         , 3.50000000000000000_RK, 5.54190812500000_RK &
     127             :                                                         , 3.60000000000000000_RK, 5.47451193600000_RK &
     128             :                                                         , 3.70000000000000000_RK, 5.40886440100000_RK &
     129             :                                                         , 3.80000000000000000_RK, 5.34542401600000_RK &
     130             :                                                         , 3.90000000000000000_RK, 5.28461354100000_RK &
     131             :                                                         , 4.00000000000000000_RK, 5.22495000000000_RK &
     132             :                                                         , 4.10000000000000000_RK, 5.17119063610000_RK &
     133             :                                                         , 4.20000000000000000_RK, 5.12504318720001_RK &
     134             :                                                         , 4.30000000000000000_RK, 5.08588032630002_RK &
     135             :                                                         , 4.40000000000000000_RK, 5.05301458240003_RK &
     136             :                                                         , 4.50000000000000000_RK, 5.02572031250004_RK &
     137             :                                                         , 4.60000000000000000_RK, 5.00325567360003_RK &
     138             :                                                         , 4.70000000000000000_RK, 4.98488459470005_RK &
     139             :                                                         , 4.80000000000000000_RK, 4.96989874879999_RK &
     140             :                                                         , 4.90000000000000000_RK, 4.95763952489999_RK &
     141             :                                                         , 5.00000000000000000_RK, 4.94752000000006_RK &
     142             :                                                         , 5.10000000000000000_RK, 4.93904691110002_RK &
     143             :                                                         , 5.20000000000000000_RK, 4.93184262720004_RK &
     144             :                                                         , 5.30000000000000000_RK, 4.92566712130003_RK &
     145             :                                                         , 5.40000000000000000_RK, 4.92043994240004_RK &
     146             :                                                         , 5.50000000000000000_RK, 4.92000000000000_RK ],shape=shape(LOG10EPK_LOG10PH))
     147             : 
     148             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     149             : 
     150             : contains
     151             : 
     152             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     153             : 
     154           3 :     subroutine test_Batse()
     155             :         implicit none
     156           3 :         Test = Test_type(moduleName=MODULE_NAME)
     157           3 :         call Test%run(test_getLogPF53,"test_getLogPF53")
     158           3 :         call Test%run(test_getLogPbol,"test_getLogPbol")
     159           3 :         call Test%run(test_getLog10PF53,"test_getLog10PF53")
     160           3 :         call Test%run(test_readDataGRB_1,"test_readDataGRB_1")
     161           3 :         call Test%run(test_readDataGRB_2,"test_readDataGRB_2")
     162           3 :         call Test%run(test_getLogEffectivePeakPhotonFlux_SPR_1,"test_getLogEffectivePeakPhotonFlux_SPR_1")
     163           3 :         call Test%run(test_getLogEffectivePeakPhotonFlux_DPR_1,"test_getLogEffectivePeakPhotonFlux_DPR_1")
     164           3 :         call Test%run(test_getLogEffectivePeakPhotonFluxCorrection_SPR_1,"test_getLogEffectivePeakPhotonFluxCorrection_SPR_1")
     165           3 :         call Test%run(test_getLogEffectivePeakPhotonFluxCorrection_DPR_1,"test_getLogEffectivePeakPhotonFluxCorrection_DPR_1")
     166           3 :         call Test%finalize()
     167           3 :     end subroutine test_Batse
     168             : 
     169             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     170             : 
     171           3 :     function test_readDataGRB_1() result(assertion)
     172             :         implicit none
     173             :         logical :: assertion
     174             :         call readDataGRB( inFilePath = Test%inDir//"/Test_Batse_mod@batseDataLGRB1366.in" &
     175             :                         , outFilePath = Test%outDir//"/Test_Batse_mod@batseDataLGRB1366.in" &
     176             :                         , isLgrb = .true. &
     177           3 :                         )
     178           3 :         assertion = .true.
     179           6 :     end function test_readDataGRB_1
     180             : 
     181             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     182             : 
     183           3 :     function test_readDataGRB_2() result(assertion)
     184             :         implicit none
     185             :         logical :: assertion
     186             :         call readDataGRB( inFilePath = Test%inDir//"/Test_Batse_mod@batseDataSGRB565.in" &
     187             :                         , outFilePath = Test%outDir//"/Test_Batse_mod@batseDataSGRB565.in" &
     188             :                         , isLgrb = .false. &
     189           3 :                         )
     190           3 :         assertion = .true.
     191           6 :     end function test_readDataGRB_2
     192             : 
     193             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     194             : 
     195           3 :     function test_getLog10PF53() result(assertion)
     196             : 
     197           3 :         use Constants_mod, only: IK, RK
     198             :         implicit none
     199             :         logical :: assertion
     200             :         integer(IK) :: ip
     201             :         real(RK), parameter :: tolerance = 1.e-12_RK
     202             : 
     203         261 :         do ip = 1,np
     204         258 :             assertion = abs(LOG10EPK_LOG10PH(2,ip)-getLog10PF53(LOG10EPK_LOG10PH(1,ip),LOG10PBOL))<tolerance
     205         258 :             if (assertion) cycle
     206             :             ! LCOV_EXCL_START
     207             :             if (Test%isDebugMode) then
     208             :                 write(*,"(A)") "The error with respect to reference value is larger than the tolerance.", new_line("a") &
     209             :                              , "tolerance, ip, LOG10EPK_LOG10PH(2,ip), getLog10PF53(LOG10EPK_LOG10PH(1,ip),LOG10PBOL): " &
     210             :                              , tolerance, ip, LOG10EPK_LOG10PH(2,ip), getLog10PF53(LOG10EPK_LOG10PH(1,ip),LOG10PBOL)
     211             :             end if
     212             :             ! LCOV_EXCL_STOP
     213             :         end do
     214             : 
     215           3 :     end function test_getLog10PF53
     216             : 
     217             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     218             : 
     219           3 :     function test_getLogPF53() result(assertion)
     220             : 
     221           3 :         use Constants_mod, only: IK, RK, LN10
     222             :         implicit none
     223             :         integer(IK) , parameter :: np = 86
     224             :         logical                 :: assertion
     225             :         integer(IK)             :: ip
     226             :         real(RK), parameter     :: tolerance = 1.e-12_RK
     227             : 
     228         261 :         do ip = 1,np
     229         258 :             assertion = abs( getLog10PF53(LOG10EPK_LOG10PH(1,ip),LOG10PBOL) - getLogPF53(LOG10EPK_LOG10PH(1,ip)*LN10,LOG10PBOL)/LN10 ) < tolerance
     230         258 :             if (assertion) cycle
     231             :             ! LCOV_EXCL_START
     232             :             if (Test%isDebugMode) then
     233             :                 write(*,"(A)") "The error with respect to reference value is larger than the tolerance.", new_line("a") &
     234             :                              , "tolerance, ip, LOG10EPK_LOG10PH(2,ip), getLog10PF53(LOG10EPK_LOG10PH(1,ip),LOG10PBOL): " &
     235             :                              , tolerance, ip, LOG10EPK_LOG10PH(2,ip), getLog10PF53(LOG10EPK_LOG10PH(1,ip),LOG10PBOL)
     236             :             end if
     237             :             ! LCOV_EXCL_STOP
     238             :         end do
     239             : 
     240           3 :     end function test_getLogPF53
     241             : 
     242             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     243             : 
     244           3 :     function test_getLogPbol() result(assertion)
     245             : 
     246           3 :         use Constants_mod, only: IK, RK, LN10
     247             :         implicit none
     248             :         integer(IK) , parameter :: np = 86
     249             :         logical                 :: assertion
     250             :         integer(IK)             :: ip
     251             :         real(RK), parameter     :: tolerance = 1.e-12_RK
     252             : 
     253           3 :         assertion = .true.
     254         261 :         do ip = 1,np
     255         258 :             assertion = abs ( getLog10PF53(LOG10EPK_LOG10PH(1,ip),LOG10PBOL) &
     256         258 :                             + getLogPbol(LOG10EPK_LOG10PH(1,ip)*LN10,LOG10PBOL) / LN10 &
     257             :                             - LOG10PBOL &
     258         258 :                             ) < tolerance
     259         258 :             if (assertion) cycle
     260             :             ! LCOV_EXCL_START
     261             :             if (Test%isDebugMode .and. .not. assertion) then
     262             :                 write(*,"(A)") "The error with respect to reference value is larger than the tolerance.", new_line("a") &
     263             :                              , "tolerance, ip, LOG10EPK_LOG10PH(2,ip), getLog10PF53(LOG10EPK_LOG10PH(1,ip),LOG10PBOL): " &
     264             :                              , tolerance, ip, LOG10EPK_LOG10PH(2,ip), getLog10PF53(LOG10EPK_LOG10PH(1,ip),LOG10PBOL)
     265             :             end if
     266             :             ! LCOV_EXCL_STOP
     267             :         end do
     268             : 
     269           3 :     end function test_getLogPbol
     270             : 
     271             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     272             : 
     273           3 :     function test_getLogEffectivePeakPhotonFlux_SPR_1() result(assertion)
     274             :         use, intrinsic :: iso_fortran_env, only: RK => real32
     275             :         implicit none
     276             :         logical                 :: assertion
     277             :         real(RK), parameter     :: tolerance = sqrt(epsilon(1._RK))
     278             :         real(RK), parameter     :: logEffectivePeakPhotonFlux_ref = -real(THRESH_ERFC_AMP,RK)
     279           3 :         real(RK)                :: logEffectivePeakPhotonFlux
     280           3 :         real(RK)                :: difference
     281           3 :         logEffectivePeakPhotonFlux = getLogEffectivePeakPhotonFlux(0._RK,real(THRESH_ERFC_AVG,RK))
     282           3 :         difference = abs(logEffectivePeakPhotonFlux - logEffectivePeakPhotonFlux_ref)
     283           3 :         assertion = difference < tolerance
     284             :         ! LCOV_EXCL_START
     285             :         if (Test%isDebugMode .and. .not. assertion) then
     286             :             write(Test%outputUnit,"(*(g0))")
     287             :             write(Test%outputUnit,"(*(g0))") "logEffectivePeakPhotonFlux_ref    = ", logEffectivePeakPhotonFlux_ref
     288             :             write(Test%outputUnit,"(*(g0))") "logEffectivePeakPhotonFlux        = ", logEffectivePeakPhotonFlux
     289             :             write(Test%outputUnit,"(*(g0))") "difference                        = ", difference
     290             :             write(Test%outputUnit,"(*(g0))")
     291             :         end if
     292             :         ! LCOV_EXCL_STOP
     293           6 :     end function test_getLogEffectivePeakPhotonFlux_SPR_1
     294             : 
     295             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     296             : 
     297           3 :     function test_getLogEffectivePeakPhotonFlux_DPR_1() result(assertion)
     298             :         use, intrinsic :: iso_fortran_env, only: RK => real64
     299             :         implicit none
     300             :         logical                 :: assertion
     301             :         real(RK), parameter     :: tolerance = sqrt(epsilon(1._RK))
     302             :         real(RK), parameter     :: logEffectivePeakPhotonFlux_ref = -real(THRESH_ERFC_AMP,RK)
     303           3 :         real(RK)                :: logEffectivePeakPhotonFlux
     304           3 :         real(RK)                :: difference
     305           3 :         logEffectivePeakPhotonFlux = getLogEffectivePeakPhotonFlux(0._RK,real(THRESH_ERFC_AVG,RK))
     306           3 :         difference = abs(logEffectivePeakPhotonFlux - logEffectivePeakPhotonFlux_ref)
     307           3 :         assertion = difference < tolerance
     308             :         ! LCOV_EXCL_START
     309             :         if (Test%isDebugMode .and. .not. assertion) then
     310             :             write(Test%outputUnit,"(*(g0))")
     311             :             write(Test%outputUnit,"(*(g0))") "logEffectivePeakPhotonFlux_ref    = ", logEffectivePeakPhotonFlux_ref
     312             :             write(Test%outputUnit,"(*(g0))") "logEffectivePeakPhotonFlux        = ", logEffectivePeakPhotonFlux
     313             :             write(Test%outputUnit,"(*(g0))") "difference                        = ", difference
     314             :             write(Test%outputUnit,"(*(g0))")
     315             :         end if
     316             :         ! LCOV_EXCL_STOP
     317           6 :     end function test_getLogEffectivePeakPhotonFlux_DPR_1
     318             : 
     319             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     320             : 
     321           3 :     function test_getLogEffectivePeakPhotonFluxCorrection_SPR_1() result(assertion)
     322             :         use, intrinsic :: iso_fortran_env, only: RK => real32
     323             :         implicit none
     324             :         logical                 :: assertion
     325             :         real(RK), parameter     :: tolerance = sqrt(epsilon(1._RK))
     326             :         real(RK), parameter     :: logEffectivePeakPhotonFluxCorrection_ref = real(THRESH_ERFC_AMP,RK)
     327           3 :         real(RK)                :: logEffectivePeakPhotonFluxCorrection
     328           3 :         real(RK)                :: difference
     329           3 :         logEffectivePeakPhotonFluxCorrection = getLogEffectivePeakPhotonFluxCorrection_SPR(real(THRESH_ERFC_AVG,RK))
     330           3 :         difference = abs(logEffectivePeakPhotonFluxCorrection - logEffectivePeakPhotonFluxCorrection_ref)
     331           3 :         assertion = difference < tolerance
     332             :         ! LCOV_EXCL_START
     333             :         if (Test%isDebugMode .and. .not. assertion) then
     334             :             write(Test%outputUnit,"(*(g0))")
     335             :             write(Test%outputUnit,"(*(g0))") "logEffectivePeakPhotonFluxCorrection_ref  = ", logEffectivePeakPhotonFluxCorrection_ref
     336             :             write(Test%outputUnit,"(*(g0))") "logEffectivePeakPhotonFluxCorrection      = ", logEffectivePeakPhotonFluxCorrection
     337             :             write(Test%outputUnit,"(*(g0))") "difference                                = ", difference
     338             :             write(Test%outputUnit,"(*(g0))")
     339             :         end if
     340             :         ! LCOV_EXCL_STOP
     341           6 :     end function test_getLogEffectivePeakPhotonFluxCorrection_SPR_1
     342             : 
     343             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     344             : 
     345           3 :     function test_getLogEffectivePeakPhotonFluxCorrection_DPR_1() result(assertion)
     346             :         use, intrinsic :: iso_fortran_env, only: RK => real64
     347             :         implicit none
     348             :         logical                 :: assertion
     349             :         real(RK), parameter     :: tolerance = sqrt(epsilon(1._RK))
     350             :         real(RK), parameter     :: logEffectivePeakPhotonFluxCorrection_ref = real(THRESH_ERFC_AMP,RK)
     351           3 :         real(RK)                :: logEffectivePeakPhotonFluxCorrection
     352           3 :         real(RK)                :: difference
     353           3 :         logEffectivePeakPhotonFluxCorrection = getLogEffectivePeakPhotonFluxCorrection_DPR(real(THRESH_ERFC_AVG,RK))
     354           3 :         difference = abs(logEffectivePeakPhotonFluxCorrection - logEffectivePeakPhotonFluxCorrection_ref)
     355           3 :         assertion = difference < tolerance
     356             :         ! LCOV_EXCL_START
     357             :         if (Test%isDebugMode .and. .not. assertion) then
     358             :             write(Test%outputUnit,"(*(g0))")
     359             :             write(Test%outputUnit,"(*(g0))") "logEffectivePeakPhotonFluxCorrection_ref  = ", logEffectivePeakPhotonFluxCorrection_ref
     360             :             write(Test%outputUnit,"(*(g0))") "logEffectivePeakPhotonFluxCorrection      = ", logEffectivePeakPhotonFluxCorrection
     361             :             write(Test%outputUnit,"(*(g0))") "difference                                = ", difference
     362             :             write(Test%outputUnit,"(*(g0))")
     363             :         end if
     364             :         ! LCOV_EXCL_STOP
     365           6 :     end function test_getLogEffectivePeakPhotonFluxCorrection_DPR_1
     366             : 
     367             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     368             : 
     369             : end module Test_Batse_mod

ParaMonte: Plain Powerful Parallel Monte Carlo Library 
The Computational Data Science Lab
© Copyright 2012 - 2021