17862 character(*),
intent(in):: message
17863 real(DP),
intent(in):: answer(:,:,:,:,:,:,:)
17864 real(DP),
intent(in):: check(:,:,:,:,:,:,:)
17865 logical,
intent(in),
optional:: negative_support
17867 logical:: negative_support_on
17868 character(STRING):: pos_str
17869 character(TOKEN):: abs_mes
17870 real(DP):: wrong, right
17872 integer:: answer_shape(7), check_shape(7), pos(7)
17873 logical:: consist_shape(7)
17874 character(TOKEN):: pos_array(7)
17875 integer,
allocatable:: mask_array(:,:,:,:,:,:,:)
17876 logical,
allocatable:: judge(:,:,:,:,:,:,:)
17877 logical,
allocatable:: judge_rev(:,:,:,:,:,:,:)
17878 logical,
allocatable:: answer_negative(:,:,:,:,:,:,:)
17879 logical,
allocatable:: check_negative(:,:,:,:,:,:,:)
17880 logical,
allocatable:: both_negative(:,:,:,:,:,:,:)
17884 if (
present(negative_support))
then 17885 negative_support_on = negative_support
17887 negative_support_on = .true.
17893 answer_shape = shape(answer)
17894 check_shape = shape(check)
17896 consist_shape = answer_shape == check_shape
17898 if (.not. all(consist_shape))
then 17899 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 17901 write(*,*)
' shape of check is (', check_shape,
')' 17902 write(*,*)
' is INCORRECT' 17903 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 17909 allocate( mask_array( &
17910 & answer_shape(1), &
17912 & answer_shape(2), &
17914 & answer_shape(3), &
17916 & answer_shape(4), &
17918 & answer_shape(5), &
17920 & answer_shape(6), &
17922 & answer_shape(7) ) &
17926 & answer_shape(1), &
17928 & answer_shape(2), &
17930 & answer_shape(3), &
17932 & answer_shape(4), &
17934 & answer_shape(5), &
17936 & answer_shape(6), &
17938 & answer_shape(7) ) &
17941 allocate( judge_rev( &
17942 & answer_shape(1), &
17944 & answer_shape(2), &
17946 & answer_shape(3), &
17948 & answer_shape(4), &
17950 & answer_shape(5), &
17952 & answer_shape(6), &
17954 & answer_shape(7) ) &
17957 allocate( answer_negative( &
17958 & answer_shape(1), &
17960 & answer_shape(2), &
17962 & answer_shape(3), &
17964 & answer_shape(4), &
17966 & answer_shape(5), &
17968 & answer_shape(6), &
17970 & answer_shape(7) ) &
17973 allocate( check_negative( &
17974 & answer_shape(1), &
17976 & answer_shape(2), &
17978 & answer_shape(3), &
17980 & answer_shape(4), &
17982 & answer_shape(5), &
17984 & answer_shape(6), &
17986 & answer_shape(7) ) &
17989 allocate( both_negative( &
17990 & answer_shape(1), &
17992 & answer_shape(2), &
17994 & answer_shape(3), &
17996 & answer_shape(4), &
17998 & answer_shape(5), &
18000 & answer_shape(6), &
18002 & answer_shape(7) ) &
18005 answer_negative = answer < 0.0_dp
18006 check_negative = check < 0.0_dp
18007 both_negative = answer_negative .and. check_negative
18008 if (.not. negative_support_on) both_negative = .false.
18010 judge = answer > check
18011 where (both_negative) judge = .not. judge
18013 judge_rev = .not. judge
18014 err_flag = any(judge_rev)
18016 pos = maxloc(mask_array, judge_rev)
18050 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
18052 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
18054 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
18056 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
18058 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
18060 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
18062 write(unit=pos_array(7), fmt=
"(i20)") pos(7)
18066 & trim(adjustl(pos_array(1))) //
',' // &
18068 & trim(adjustl(pos_array(2))) //
',' // &
18070 & trim(adjustl(pos_array(3))) //
',' // &
18072 & trim(adjustl(pos_array(4))) //
',' // &
18074 & trim(adjustl(pos_array(5))) //
',' // &
18076 & trim(adjustl(pos_array(6))) //
',' // &
18078 & trim(adjustl(pos_array(7))) //
')' 18080 if ( both_negative( &
18095 abs_mes =
'ABSOLUTE value of' 18102 deallocate(mask_array, judge, judge_rev)
18103 deallocate(answer_negative, check_negative, both_negative)
18109 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 18111 write(*,*)
' ' // trim(abs_mes) // &
18112 &
' check' // trim(pos_str) //
' = ', wrong
18113 write(*,*)
' is NOT LESS THAN' 18114 write(*,*)
' ' // trim(abs_mes) // &
18115 &
' answer' // trim(pos_str) //
' = ', right
18119 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK'
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ