13374 character(*),
intent(in):: message
13375 real(DP),
intent(in):: answer(:,:,:,:,:,:,:)
13376 real(DP),
intent(in):: check(:,:,:,:,:,:,:)
13377 logical,
intent(in),
optional:: negative_support
13379 logical:: negative_support_on
13380 character(STRING):: pos_str
13381 character(TOKEN):: abs_mes
13382 real(DP):: wrong, right
13384 integer:: answer_shape(7), check_shape(7), pos(7)
13385 logical:: consist_shape(7)
13386 character(TOKEN):: pos_array(7)
13387 integer,
allocatable:: mask_array(:,:,:,:,:,:,:)
13388 logical,
allocatable:: judge(:,:,:,:,:,:,:)
13389 logical,
allocatable:: judge_rev(:,:,:,:,:,:,:)
13390 logical,
allocatable:: answer_negative(:,:,:,:,:,:,:)
13391 logical,
allocatable:: check_negative(:,:,:,:,:,:,:)
13392 logical,
allocatable:: both_negative(:,:,:,:,:,:,:)
13396 if (
present(negative_support))
then 13397 negative_support_on = negative_support
13399 negative_support_on = .true.
13405 answer_shape = shape(answer)
13406 check_shape = shape(check)
13408 consist_shape = answer_shape == check_shape
13410 if (.not. all(consist_shape))
then 13411 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 13413 write(*,*)
' shape of check is (', check_shape,
')' 13414 write(*,*)
' is INCORRECT' 13415 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 13421 allocate( mask_array( &
13422 & answer_shape(1), &
13424 & answer_shape(2), &
13426 & answer_shape(3), &
13428 & answer_shape(4), &
13430 & answer_shape(5), &
13432 & answer_shape(6), &
13434 & answer_shape(7) ) &
13438 & answer_shape(1), &
13440 & answer_shape(2), &
13442 & answer_shape(3), &
13444 & answer_shape(4), &
13446 & answer_shape(5), &
13448 & answer_shape(6), &
13450 & answer_shape(7) ) &
13453 allocate( judge_rev( &
13454 & answer_shape(1), &
13456 & answer_shape(2), &
13458 & answer_shape(3), &
13460 & answer_shape(4), &
13462 & answer_shape(5), &
13464 & answer_shape(6), &
13466 & answer_shape(7) ) &
13469 allocate( answer_negative( &
13470 & answer_shape(1), &
13472 & answer_shape(2), &
13474 & answer_shape(3), &
13476 & answer_shape(4), &
13478 & answer_shape(5), &
13480 & answer_shape(6), &
13482 & answer_shape(7) ) &
13485 allocate( check_negative( &
13486 & answer_shape(1), &
13488 & answer_shape(2), &
13490 & answer_shape(3), &
13492 & answer_shape(4), &
13494 & answer_shape(5), &
13496 & answer_shape(6), &
13498 & answer_shape(7) ) &
13501 allocate( both_negative( &
13502 & answer_shape(1), &
13504 & answer_shape(2), &
13506 & answer_shape(3), &
13508 & answer_shape(4), &
13510 & answer_shape(5), &
13512 & answer_shape(6), &
13514 & answer_shape(7) ) &
13517 answer_negative = answer < 0.0_dp
13518 check_negative = check < 0.0_dp
13519 both_negative = answer_negative .and. check_negative
13520 if (.not. negative_support_on) both_negative = .false.
13522 judge = answer < check
13523 where (both_negative) judge = .not. judge
13525 judge_rev = .not. judge
13526 err_flag = any(judge_rev)
13528 pos = maxloc(mask_array, judge_rev)
13562 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
13564 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
13566 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
13568 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
13570 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
13572 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
13574 write(unit=pos_array(7), fmt=
"(i20)") pos(7)
13578 & trim(adjustl(pos_array(1))) //
',' // &
13580 & trim(adjustl(pos_array(2))) //
',' // &
13582 & trim(adjustl(pos_array(3))) //
',' // &
13584 & trim(adjustl(pos_array(4))) //
',' // &
13586 & trim(adjustl(pos_array(5))) //
',' // &
13588 & trim(adjustl(pos_array(6))) //
',' // &
13590 & trim(adjustl(pos_array(7))) //
')' 13592 if ( both_negative( &
13607 abs_mes =
'ABSOLUTE value of' 13614 deallocate(mask_array, judge, judge_rev)
13615 deallocate(answer_negative, check_negative, both_negative)
13621 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 13623 write(*,*)
' ' // trim(abs_mes) // &
13624 &
' check' // trim(pos_str) //
' = ', wrong
13625 write(*,*)
' is NOT GREATER THAN' 13626 write(*,*)
' ' // trim(abs_mes) // &
13627 &
' answer' // trim(pos_str) //
' = ', right
13631 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK'
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ