293 public assertequal, assertgreaterthan, assertlessthan
295 interface assertequal
296 module procedure dctestassertequalchar0
419 interface assertgreaterthan
473 interface assertlessthan
530 subroutine dctestassertequalchar0(message, answer, check)
533 character(*),
intent(in):: message
534 character(*),
intent(in):: answer
535 character(*),
intent(in):: check
537 character(STRING):: pos_str
538 character(STRING):: wrong, right
549 err_flag = .not. trim(answer) == trim(check)
558 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 560 write(*,*)
' check' // trim(pos_str) //
' = ', trim(wrong)
561 write(*,*)
' is NOT EQUAL to' 562 write(*,*)
' answer' // trim(pos_str) //
' = ', trim(right)
566 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 570 end subroutine dctestassertequalchar0
576 character(*),
intent(in):: message
577 character(*),
intent(in):: answer(:)
578 character(*),
intent(in):: check(:)
580 character(STRING):: pos_str
581 character(STRING):: wrong, right
583 integer:: answer_shape(1), check_shape(1), pos(1)
584 logical:: consist_shape(1)
585 character(TOKEN):: pos_array(1)
586 integer,
allocatable:: mask_array(:)
587 logical,
allocatable:: judge(:)
588 logical,
allocatable:: judge_rev(:)
591 character(STRING),
allocatable:: answer_fixed_length(:)
592 character(STRING),
allocatable:: check_fixed_length(:)
600 answer_shape = shape(answer)
601 check_shape = shape(check)
603 consist_shape = answer_shape == check_shape
605 if (.not. all(consist_shape))
then 606 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 608 write(*,*)
' shape of check is (', check_shape,
')' 609 write(*,*)
' is INCORRECT' 610 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 616 allocate( mask_array( &
618 & answer_shape(1) ) &
623 & answer_shape(1) ) &
626 allocate( judge_rev( &
628 & answer_shape(1) ) &
632 allocate( answer_fixed_length( &
634 & answer_shape(1) ) &
637 allocate( check_fixed_length( &
642 answer_fixed_length = answer
643 check_fixed_length = check
645 judge = answer_fixed_length == check_fixed_length
646 deallocate(answer_fixed_length, check_fixed_length)
650 judge_rev = .not. judge
651 err_flag = any(judge_rev)
653 pos = maxloc(mask_array, judge_rev)
665 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
670 & trim(adjustl(pos_array(1))) //
')' 673 deallocate(mask_array, judge, judge_rev)
679 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 681 write(*,*)
' check' // trim(pos_str) //
' = ', trim(wrong)
682 write(*,*)
' is NOT EQUAL to' 683 write(*,*)
' answer' // trim(pos_str) //
' = ', trim(right)
687 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 697 character(*),
intent(in):: message
698 character(*),
intent(in):: answer(:,:)
699 character(*),
intent(in):: check(:,:)
701 character(STRING):: pos_str
702 character(STRING):: wrong, right
704 integer:: answer_shape(2), check_shape(2), pos(2)
705 logical:: consist_shape(2)
706 character(TOKEN):: pos_array(2)
707 integer,
allocatable:: mask_array(:,:)
708 logical,
allocatable:: judge(:,:)
709 logical,
allocatable:: judge_rev(:,:)
712 character(STRING),
allocatable:: answer_fixed_length(:,:)
713 character(STRING),
allocatable:: check_fixed_length(:,:)
721 answer_shape = shape(answer)
722 check_shape = shape(check)
724 consist_shape = answer_shape == check_shape
726 if (.not. all(consist_shape))
then 727 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 729 write(*,*)
' shape of check is (', check_shape,
')' 730 write(*,*)
' is INCORRECT' 731 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 737 allocate( mask_array( &
740 & answer_shape(2) ) &
746 & answer_shape(2) ) &
749 allocate( judge_rev( &
752 & answer_shape(2) ) &
756 allocate( answer_fixed_length( &
759 & answer_shape(2) ) &
762 allocate( check_fixed_length( &
768 answer_fixed_length = answer
769 check_fixed_length = check
771 judge = answer_fixed_length == check_fixed_length
772 deallocate(answer_fixed_length, check_fixed_length)
776 judge_rev = .not. judge
777 err_flag = any(judge_rev)
779 pos = maxloc(mask_array, judge_rev)
793 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
795 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
799 & trim(adjustl(pos_array(1))) //
',' // &
801 & trim(adjustl(pos_array(2))) //
')' 804 deallocate(mask_array, judge, judge_rev)
810 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 812 write(*,*)
' check' // trim(pos_str) //
' = ', trim(wrong)
813 write(*,*)
' is NOT EQUAL to' 814 write(*,*)
' answer' // trim(pos_str) //
' = ', trim(right)
818 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 828 character(*),
intent(in):: message
829 character(*),
intent(in):: answer(:,:,:)
830 character(*),
intent(in):: check(:,:,:)
832 character(STRING):: pos_str
833 character(STRING):: wrong, right
835 integer:: answer_shape(3), check_shape(3), pos(3)
836 logical:: consist_shape(3)
837 character(TOKEN):: pos_array(3)
838 integer,
allocatable:: mask_array(:,:,:)
839 logical,
allocatable:: judge(:,:,:)
840 logical,
allocatable:: judge_rev(:,:,:)
843 character(STRING),
allocatable:: answer_fixed_length(:,:,:)
844 character(STRING),
allocatable:: check_fixed_length(:,:,:)
852 answer_shape = shape(answer)
853 check_shape = shape(check)
855 consist_shape = answer_shape == check_shape
857 if (.not. all(consist_shape))
then 858 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 860 write(*,*)
' shape of check is (', check_shape,
')' 861 write(*,*)
' is INCORRECT' 862 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 868 allocate( mask_array( &
873 & answer_shape(3) ) &
881 & answer_shape(3) ) &
884 allocate( judge_rev( &
889 & answer_shape(3) ) &
893 allocate( answer_fixed_length( &
898 & answer_shape(3) ) &
901 allocate( check_fixed_length( &
909 answer_fixed_length = answer
910 check_fixed_length = check
912 judge = answer_fixed_length == check_fixed_length
913 deallocate(answer_fixed_length, check_fixed_length)
917 judge_rev = .not. judge
918 err_flag = any(judge_rev)
920 pos = maxloc(mask_array, judge_rev)
938 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
940 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
942 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
946 & trim(adjustl(pos_array(1))) //
',' // &
948 & trim(adjustl(pos_array(2))) //
',' // &
950 & trim(adjustl(pos_array(3))) //
')' 953 deallocate(mask_array, judge, judge_rev)
959 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 961 write(*,*)
' check' // trim(pos_str) //
' = ', trim(wrong)
962 write(*,*)
' is NOT EQUAL to' 963 write(*,*)
' answer' // trim(pos_str) //
' = ', trim(right)
967 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 977 character(*),
intent(in):: message
978 character(*),
intent(in):: answer(:,:,:,:)
979 character(*),
intent(in):: check(:,:,:,:)
981 character(STRING):: pos_str
982 character(STRING):: wrong, right
984 integer:: answer_shape(4), check_shape(4), pos(4)
985 logical:: consist_shape(4)
986 character(TOKEN):: pos_array(4)
987 integer,
allocatable:: mask_array(:,:,:,:)
988 logical,
allocatable:: judge(:,:,:,:)
989 logical,
allocatable:: judge_rev(:,:,:,:)
992 character(STRING),
allocatable:: answer_fixed_length(:,:,:,:)
993 character(STRING),
allocatable:: check_fixed_length(:,:,:,:)
1001 answer_shape = shape(answer)
1002 check_shape = shape(check)
1004 consist_shape = answer_shape == check_shape
1006 if (.not. all(consist_shape))
then 1007 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 1009 write(*,*)
' shape of check is (', check_shape,
')' 1010 write(*,*)
' is INCORRECT' 1011 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 1017 allocate( mask_array( &
1018 & answer_shape(1), &
1020 & answer_shape(2), &
1022 & answer_shape(3), &
1024 & answer_shape(4) ) &
1028 & answer_shape(1), &
1030 & answer_shape(2), &
1032 & answer_shape(3), &
1034 & answer_shape(4) ) &
1037 allocate( judge_rev( &
1038 & answer_shape(1), &
1040 & answer_shape(2), &
1042 & answer_shape(3), &
1044 & answer_shape(4) ) &
1048 allocate( answer_fixed_length( &
1049 & answer_shape(1), &
1051 & answer_shape(2), &
1053 & answer_shape(3), &
1055 & answer_shape(4) ) &
1058 allocate( check_fixed_length( &
1065 & check_shape(4) ) &
1068 answer_fixed_length = answer
1069 check_fixed_length = check
1071 judge = answer_fixed_length == check_fixed_length
1072 deallocate(answer_fixed_length, check_fixed_length)
1076 judge_rev = .not. judge
1077 err_flag = any(judge_rev)
1079 pos = maxloc(mask_array, judge_rev)
1101 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
1103 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
1105 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
1107 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
1111 & trim(adjustl(pos_array(1))) //
',' // &
1113 & trim(adjustl(pos_array(2))) //
',' // &
1115 & trim(adjustl(pos_array(3))) //
',' // &
1117 & trim(adjustl(pos_array(4))) //
')' 1120 deallocate(mask_array, judge, judge_rev)
1126 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 1128 write(*,*)
' check' // trim(pos_str) //
' = ', trim(wrong)
1129 write(*,*)
' is NOT EQUAL to' 1130 write(*,*)
' answer' // trim(pos_str) //
' = ', trim(right)
1134 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 1144 character(*),
intent(in):: message
1145 character(*),
intent(in):: answer(:,:,:,:,:)
1146 character(*),
intent(in):: check(:,:,:,:,:)
1148 character(STRING):: pos_str
1149 character(STRING):: wrong, right
1151 integer:: answer_shape(5), check_shape(5), pos(5)
1152 logical:: consist_shape(5)
1153 character(TOKEN):: pos_array(5)
1154 integer,
allocatable:: mask_array(:,:,:,:,:)
1155 logical,
allocatable:: judge(:,:,:,:,:)
1156 logical,
allocatable:: judge_rev(:,:,:,:,:)
1159 character(STRING),
allocatable:: answer_fixed_length(:,:,:,:,:)
1160 character(STRING),
allocatable:: check_fixed_length(:,:,:,:,:)
1168 answer_shape = shape(answer)
1169 check_shape = shape(check)
1171 consist_shape = answer_shape == check_shape
1173 if (.not. all(consist_shape))
then 1174 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 1176 write(*,*)
' shape of check is (', check_shape,
')' 1177 write(*,*)
' is INCORRECT' 1178 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 1184 allocate( mask_array( &
1185 & answer_shape(1), &
1187 & answer_shape(2), &
1189 & answer_shape(3), &
1191 & answer_shape(4), &
1193 & answer_shape(5) ) &
1197 & answer_shape(1), &
1199 & answer_shape(2), &
1201 & answer_shape(3), &
1203 & answer_shape(4), &
1205 & answer_shape(5) ) &
1208 allocate( judge_rev( &
1209 & answer_shape(1), &
1211 & answer_shape(2), &
1213 & answer_shape(3), &
1215 & answer_shape(4), &
1217 & answer_shape(5) ) &
1221 allocate( answer_fixed_length( &
1222 & answer_shape(1), &
1224 & answer_shape(2), &
1226 & answer_shape(3), &
1228 & answer_shape(4), &
1230 & answer_shape(5) ) &
1233 allocate( check_fixed_length( &
1242 & check_shape(5) ) &
1245 answer_fixed_length = answer
1246 check_fixed_length = check
1248 judge = answer_fixed_length == check_fixed_length
1249 deallocate(answer_fixed_length, check_fixed_length)
1253 judge_rev = .not. judge
1254 err_flag = any(judge_rev)
1256 pos = maxloc(mask_array, judge_rev)
1282 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
1284 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
1286 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
1288 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
1290 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
1294 & trim(adjustl(pos_array(1))) //
',' // &
1296 & trim(adjustl(pos_array(2))) //
',' // &
1298 & trim(adjustl(pos_array(3))) //
',' // &
1300 & trim(adjustl(pos_array(4))) //
',' // &
1302 & trim(adjustl(pos_array(5))) //
')' 1305 deallocate(mask_array, judge, judge_rev)
1311 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 1313 write(*,*)
' check' // trim(pos_str) //
' = ', trim(wrong)
1314 write(*,*)
' is NOT EQUAL to' 1315 write(*,*)
' answer' // trim(pos_str) //
' = ', trim(right)
1319 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 1329 character(*),
intent(in):: message
1330 character(*),
intent(in):: answer(:,:,:,:,:,:)
1331 character(*),
intent(in):: check(:,:,:,:,:,:)
1333 character(STRING):: pos_str
1334 character(STRING):: wrong, right
1336 integer:: answer_shape(6), check_shape(6), pos(6)
1337 logical:: consist_shape(6)
1338 character(TOKEN):: pos_array(6)
1339 integer,
allocatable:: mask_array(:,:,:,:,:,:)
1340 logical,
allocatable:: judge(:,:,:,:,:,:)
1341 logical,
allocatable:: judge_rev(:,:,:,:,:,:)
1344 character(STRING),
allocatable:: answer_fixed_length(:,:,:,:,:,:)
1345 character(STRING),
allocatable:: check_fixed_length(:,:,:,:,:,:)
1353 answer_shape = shape(answer)
1354 check_shape = shape(check)
1356 consist_shape = answer_shape == check_shape
1358 if (.not. all(consist_shape))
then 1359 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 1361 write(*,*)
' shape of check is (', check_shape,
')' 1362 write(*,*)
' is INCORRECT' 1363 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 1369 allocate( mask_array( &
1370 & answer_shape(1), &
1372 & answer_shape(2), &
1374 & answer_shape(3), &
1376 & answer_shape(4), &
1378 & answer_shape(5), &
1380 & answer_shape(6) ) &
1384 & answer_shape(1), &
1386 & answer_shape(2), &
1388 & answer_shape(3), &
1390 & answer_shape(4), &
1392 & answer_shape(5), &
1394 & answer_shape(6) ) &
1397 allocate( judge_rev( &
1398 & answer_shape(1), &
1400 & answer_shape(2), &
1402 & answer_shape(3), &
1404 & answer_shape(4), &
1406 & answer_shape(5), &
1408 & answer_shape(6) ) &
1412 allocate( answer_fixed_length( &
1413 & answer_shape(1), &
1415 & answer_shape(2), &
1417 & answer_shape(3), &
1419 & answer_shape(4), &
1421 & answer_shape(5), &
1423 & answer_shape(6) ) &
1426 allocate( check_fixed_length( &
1437 & check_shape(6) ) &
1440 answer_fixed_length = answer
1441 check_fixed_length = check
1443 judge = answer_fixed_length == check_fixed_length
1444 deallocate(answer_fixed_length, check_fixed_length)
1448 judge_rev = .not. judge
1449 err_flag = any(judge_rev)
1451 pos = maxloc(mask_array, judge_rev)
1481 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
1483 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
1485 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
1487 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
1489 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
1491 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
1495 & trim(adjustl(pos_array(1))) //
',' // &
1497 & trim(adjustl(pos_array(2))) //
',' // &
1499 & trim(adjustl(pos_array(3))) //
',' // &
1501 & trim(adjustl(pos_array(4))) //
',' // &
1503 & trim(adjustl(pos_array(5))) //
',' // &
1505 & trim(adjustl(pos_array(6))) //
')' 1508 deallocate(mask_array, judge, judge_rev)
1514 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 1516 write(*,*)
' check' // trim(pos_str) //
' = ', trim(wrong)
1517 write(*,*)
' is NOT EQUAL to' 1518 write(*,*)
' answer' // trim(pos_str) //
' = ', trim(right)
1522 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 1532 character(*),
intent(in):: message
1533 character(*),
intent(in):: answer(:,:,:,:,:,:,:)
1534 character(*),
intent(in):: check(:,:,:,:,:,:,:)
1536 character(STRING):: pos_str
1537 character(STRING):: wrong, right
1539 integer:: answer_shape(7), check_shape(7), pos(7)
1540 logical:: consist_shape(7)
1541 character(TOKEN):: pos_array(7)
1542 integer,
allocatable:: mask_array(:,:,:,:,:,:,:)
1543 logical,
allocatable:: judge(:,:,:,:,:,:,:)
1544 logical,
allocatable:: judge_rev(:,:,:,:,:,:,:)
1547 character(STRING),
allocatable:: answer_fixed_length(:,:,:,:,:,:,:)
1548 character(STRING),
allocatable:: check_fixed_length(:,:,:,:,:,:,:)
1556 answer_shape = shape(answer)
1557 check_shape = shape(check)
1559 consist_shape = answer_shape == check_shape
1561 if (.not. all(consist_shape))
then 1562 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 1564 write(*,*)
' shape of check is (', check_shape,
')' 1565 write(*,*)
' is INCORRECT' 1566 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 1572 allocate( mask_array( &
1573 & answer_shape(1), &
1575 & answer_shape(2), &
1577 & answer_shape(3), &
1579 & answer_shape(4), &
1581 & answer_shape(5), &
1583 & answer_shape(6), &
1585 & answer_shape(7) ) &
1589 & answer_shape(1), &
1591 & answer_shape(2), &
1593 & answer_shape(3), &
1595 & answer_shape(4), &
1597 & answer_shape(5), &
1599 & answer_shape(6), &
1601 & answer_shape(7) ) &
1604 allocate( judge_rev( &
1605 & answer_shape(1), &
1607 & answer_shape(2), &
1609 & answer_shape(3), &
1611 & answer_shape(4), &
1613 & answer_shape(5), &
1615 & answer_shape(6), &
1617 & answer_shape(7) ) &
1621 allocate( answer_fixed_length( &
1622 & answer_shape(1), &
1624 & answer_shape(2), &
1626 & answer_shape(3), &
1628 & answer_shape(4), &
1630 & answer_shape(5), &
1632 & answer_shape(6), &
1634 & answer_shape(7) ) &
1637 allocate( check_fixed_length( &
1650 & check_shape(7) ) &
1653 answer_fixed_length = answer
1654 check_fixed_length = check
1656 judge = answer_fixed_length == check_fixed_length
1657 deallocate(answer_fixed_length, check_fixed_length)
1661 judge_rev = .not. judge
1662 err_flag = any(judge_rev)
1664 pos = maxloc(mask_array, judge_rev)
1698 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
1700 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
1702 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
1704 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
1706 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
1708 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
1710 write(unit=pos_array(7), fmt=
"(i20)") pos(7)
1714 & trim(adjustl(pos_array(1))) //
',' // &
1716 & trim(adjustl(pos_array(2))) //
',' // &
1718 & trim(adjustl(pos_array(3))) //
',' // &
1720 & trim(adjustl(pos_array(4))) //
',' // &
1722 & trim(adjustl(pos_array(5))) //
',' // &
1724 & trim(adjustl(pos_array(6))) //
',' // &
1726 & trim(adjustl(pos_array(7))) //
')' 1729 deallocate(mask_array, judge, judge_rev)
1735 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 1737 write(*,*)
' check' // trim(pos_str) //
' = ', trim(wrong)
1738 write(*,*)
' is NOT EQUAL to' 1739 write(*,*)
' answer' // trim(pos_str) //
' = ', trim(right)
1743 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 1753 character(*),
intent(in):: message
1754 integer,
intent(in):: answer
1755 integer,
intent(in):: check
1757 character(STRING):: pos_str
1758 integer:: wrong, right
1768 err_flag = .not. answer == check
1777 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 1779 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
1780 write(*,*)
' is NOT EQUAL to' 1781 write(*,*)
' answer' // trim(pos_str) //
' = ', right
1785 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 1795 character(*),
intent(in):: message
1796 integer,
intent(in):: answer(:)
1797 integer,
intent(in):: check(:)
1799 character(STRING):: pos_str
1800 integer:: wrong, right
1802 integer:: answer_shape(1), check_shape(1), pos(1)
1803 logical:: consist_shape(1)
1804 character(TOKEN):: pos_array(1)
1805 integer,
allocatable:: mask_array(:)
1806 logical,
allocatable:: judge(:)
1807 logical,
allocatable:: judge_rev(:)
1816 answer_shape = shape(answer)
1817 check_shape = shape(check)
1819 consist_shape = answer_shape == check_shape
1821 if (.not. all(consist_shape))
then 1822 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 1824 write(*,*)
' shape of check is (', check_shape,
')' 1825 write(*,*)
' is INCORRECT' 1826 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 1832 allocate( mask_array( &
1834 & answer_shape(1) ) &
1839 & answer_shape(1) ) &
1842 allocate( judge_rev( &
1844 & answer_shape(1) ) &
1848 judge = answer == check
1852 judge_rev = .not. judge
1853 err_flag = any(judge_rev)
1855 pos = maxloc(mask_array, judge_rev)
1867 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
1872 & trim(adjustl(pos_array(1))) //
')' 1875 deallocate(mask_array, judge, judge_rev)
1881 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 1883 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
1884 write(*,*)
' is NOT EQUAL to' 1885 write(*,*)
' answer' // trim(pos_str) //
' = ', right
1889 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 1899 character(*),
intent(in):: message
1900 integer,
intent(in):: answer(:,:)
1901 integer,
intent(in):: check(:,:)
1903 character(STRING):: pos_str
1904 integer:: wrong, right
1906 integer:: answer_shape(2), check_shape(2), pos(2)
1907 logical:: consist_shape(2)
1908 character(TOKEN):: pos_array(2)
1909 integer,
allocatable:: mask_array(:,:)
1910 logical,
allocatable:: judge(:,:)
1911 logical,
allocatable:: judge_rev(:,:)
1920 answer_shape = shape(answer)
1921 check_shape = shape(check)
1923 consist_shape = answer_shape == check_shape
1925 if (.not. all(consist_shape))
then 1926 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 1928 write(*,*)
' shape of check is (', check_shape,
')' 1929 write(*,*)
' is INCORRECT' 1930 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 1936 allocate( mask_array( &
1937 & answer_shape(1), &
1939 & answer_shape(2) ) &
1943 & answer_shape(1), &
1945 & answer_shape(2) ) &
1948 allocate( judge_rev( &
1949 & answer_shape(1), &
1951 & answer_shape(2) ) &
1955 judge = answer == check
1959 judge_rev = .not. judge
1960 err_flag = any(judge_rev)
1962 pos = maxloc(mask_array, judge_rev)
1976 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
1978 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
1982 & trim(adjustl(pos_array(1))) //
',' // &
1984 & trim(adjustl(pos_array(2))) //
')' 1987 deallocate(mask_array, judge, judge_rev)
1993 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 1995 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
1996 write(*,*)
' is NOT EQUAL to' 1997 write(*,*)
' answer' // trim(pos_str) //
' = ', right
2001 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 2011 character(*),
intent(in):: message
2012 integer,
intent(in):: answer(:,:,:)
2013 integer,
intent(in):: check(:,:,:)
2015 character(STRING):: pos_str
2016 integer:: wrong, right
2018 integer:: answer_shape(3), check_shape(3), pos(3)
2019 logical:: consist_shape(3)
2020 character(TOKEN):: pos_array(3)
2021 integer,
allocatable:: mask_array(:,:,:)
2022 logical,
allocatable:: judge(:,:,:)
2023 logical,
allocatable:: judge_rev(:,:,:)
2032 answer_shape = shape(answer)
2033 check_shape = shape(check)
2035 consist_shape = answer_shape == check_shape
2037 if (.not. all(consist_shape))
then 2038 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 2040 write(*,*)
' shape of check is (', check_shape,
')' 2041 write(*,*)
' is INCORRECT' 2042 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 2048 allocate( mask_array( &
2049 & answer_shape(1), &
2051 & answer_shape(2), &
2053 & answer_shape(3) ) &
2057 & answer_shape(1), &
2059 & answer_shape(2), &
2061 & answer_shape(3) ) &
2064 allocate( judge_rev( &
2065 & answer_shape(1), &
2067 & answer_shape(2), &
2069 & answer_shape(3) ) &
2073 judge = answer == check
2077 judge_rev = .not. judge
2078 err_flag = any(judge_rev)
2080 pos = maxloc(mask_array, judge_rev)
2098 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
2100 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
2102 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
2106 & trim(adjustl(pos_array(1))) //
',' // &
2108 & trim(adjustl(pos_array(2))) //
',' // &
2110 & trim(adjustl(pos_array(3))) //
')' 2113 deallocate(mask_array, judge, judge_rev)
2119 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 2121 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
2122 write(*,*)
' is NOT EQUAL to' 2123 write(*,*)
' answer' // trim(pos_str) //
' = ', right
2127 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 2137 character(*),
intent(in):: message
2138 integer,
intent(in):: answer(:,:,:,:)
2139 integer,
intent(in):: check(:,:,:,:)
2141 character(STRING):: pos_str
2142 integer:: wrong, right
2144 integer:: answer_shape(4), check_shape(4), pos(4)
2145 logical:: consist_shape(4)
2146 character(TOKEN):: pos_array(4)
2147 integer,
allocatable:: mask_array(:,:,:,:)
2148 logical,
allocatable:: judge(:,:,:,:)
2149 logical,
allocatable:: judge_rev(:,:,:,:)
2158 answer_shape = shape(answer)
2159 check_shape = shape(check)
2161 consist_shape = answer_shape == check_shape
2163 if (.not. all(consist_shape))
then 2164 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 2166 write(*,*)
' shape of check is (', check_shape,
')' 2167 write(*,*)
' is INCORRECT' 2168 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 2174 allocate( mask_array( &
2175 & answer_shape(1), &
2177 & answer_shape(2), &
2179 & answer_shape(3), &
2181 & answer_shape(4) ) &
2185 & answer_shape(1), &
2187 & answer_shape(2), &
2189 & answer_shape(3), &
2191 & answer_shape(4) ) &
2194 allocate( judge_rev( &
2195 & answer_shape(1), &
2197 & answer_shape(2), &
2199 & answer_shape(3), &
2201 & answer_shape(4) ) &
2205 judge = answer == check
2209 judge_rev = .not. judge
2210 err_flag = any(judge_rev)
2212 pos = maxloc(mask_array, judge_rev)
2234 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
2236 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
2238 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
2240 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
2244 & trim(adjustl(pos_array(1))) //
',' // &
2246 & trim(adjustl(pos_array(2))) //
',' // &
2248 & trim(adjustl(pos_array(3))) //
',' // &
2250 & trim(adjustl(pos_array(4))) //
')' 2253 deallocate(mask_array, judge, judge_rev)
2259 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 2261 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
2262 write(*,*)
' is NOT EQUAL to' 2263 write(*,*)
' answer' // trim(pos_str) //
' = ', right
2267 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 2277 character(*),
intent(in):: message
2278 integer,
intent(in):: answer(:,:,:,:,:)
2279 integer,
intent(in):: check(:,:,:,:,:)
2281 character(STRING):: pos_str
2282 integer:: wrong, right
2284 integer:: answer_shape(5), check_shape(5), pos(5)
2285 logical:: consist_shape(5)
2286 character(TOKEN):: pos_array(5)
2287 integer,
allocatable:: mask_array(:,:,:,:,:)
2288 logical,
allocatable:: judge(:,:,:,:,:)
2289 logical,
allocatable:: judge_rev(:,:,:,:,:)
2298 answer_shape = shape(answer)
2299 check_shape = shape(check)
2301 consist_shape = answer_shape == check_shape
2303 if (.not. all(consist_shape))
then 2304 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 2306 write(*,*)
' shape of check is (', check_shape,
')' 2307 write(*,*)
' is INCORRECT' 2308 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 2314 allocate( mask_array( &
2315 & answer_shape(1), &
2317 & answer_shape(2), &
2319 & answer_shape(3), &
2321 & answer_shape(4), &
2323 & answer_shape(5) ) &
2327 & answer_shape(1), &
2329 & answer_shape(2), &
2331 & answer_shape(3), &
2333 & answer_shape(4), &
2335 & answer_shape(5) ) &
2338 allocate( judge_rev( &
2339 & answer_shape(1), &
2341 & answer_shape(2), &
2343 & answer_shape(3), &
2345 & answer_shape(4), &
2347 & answer_shape(5) ) &
2351 judge = answer == check
2355 judge_rev = .not. judge
2356 err_flag = any(judge_rev)
2358 pos = maxloc(mask_array, judge_rev)
2384 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
2386 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
2388 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
2390 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
2392 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
2396 & trim(adjustl(pos_array(1))) //
',' // &
2398 & trim(adjustl(pos_array(2))) //
',' // &
2400 & trim(adjustl(pos_array(3))) //
',' // &
2402 & trim(adjustl(pos_array(4))) //
',' // &
2404 & trim(adjustl(pos_array(5))) //
')' 2407 deallocate(mask_array, judge, judge_rev)
2413 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 2415 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
2416 write(*,*)
' is NOT EQUAL to' 2417 write(*,*)
' answer' // trim(pos_str) //
' = ', right
2421 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 2431 character(*),
intent(in):: message
2432 integer,
intent(in):: answer(:,:,:,:,:,:)
2433 integer,
intent(in):: check(:,:,:,:,:,:)
2435 character(STRING):: pos_str
2436 integer:: wrong, right
2438 integer:: answer_shape(6), check_shape(6), pos(6)
2439 logical:: consist_shape(6)
2440 character(TOKEN):: pos_array(6)
2441 integer,
allocatable:: mask_array(:,:,:,:,:,:)
2442 logical,
allocatable:: judge(:,:,:,:,:,:)
2443 logical,
allocatable:: judge_rev(:,:,:,:,:,:)
2452 answer_shape = shape(answer)
2453 check_shape = shape(check)
2455 consist_shape = answer_shape == check_shape
2457 if (.not. all(consist_shape))
then 2458 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 2460 write(*,*)
' shape of check is (', check_shape,
')' 2461 write(*,*)
' is INCORRECT' 2462 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 2468 allocate( mask_array( &
2469 & answer_shape(1), &
2471 & answer_shape(2), &
2473 & answer_shape(3), &
2475 & answer_shape(4), &
2477 & answer_shape(5), &
2479 & answer_shape(6) ) &
2483 & answer_shape(1), &
2485 & answer_shape(2), &
2487 & answer_shape(3), &
2489 & answer_shape(4), &
2491 & answer_shape(5), &
2493 & answer_shape(6) ) &
2496 allocate( judge_rev( &
2497 & answer_shape(1), &
2499 & answer_shape(2), &
2501 & answer_shape(3), &
2503 & answer_shape(4), &
2505 & answer_shape(5), &
2507 & answer_shape(6) ) &
2511 judge = answer == check
2515 judge_rev = .not. judge
2516 err_flag = any(judge_rev)
2518 pos = maxloc(mask_array, judge_rev)
2548 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
2550 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
2552 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
2554 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
2556 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
2558 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
2562 & trim(adjustl(pos_array(1))) //
',' // &
2564 & trim(adjustl(pos_array(2))) //
',' // &
2566 & trim(adjustl(pos_array(3))) //
',' // &
2568 & trim(adjustl(pos_array(4))) //
',' // &
2570 & trim(adjustl(pos_array(5))) //
',' // &
2572 & trim(adjustl(pos_array(6))) //
')' 2575 deallocate(mask_array, judge, judge_rev)
2581 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 2583 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
2584 write(*,*)
' is NOT EQUAL to' 2585 write(*,*)
' answer' // trim(pos_str) //
' = ', right
2589 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 2599 character(*),
intent(in):: message
2600 integer,
intent(in):: answer(:,:,:,:,:,:,:)
2601 integer,
intent(in):: check(:,:,:,:,:,:,:)
2603 character(STRING):: pos_str
2604 integer:: wrong, right
2606 integer:: answer_shape(7), check_shape(7), pos(7)
2607 logical:: consist_shape(7)
2608 character(TOKEN):: pos_array(7)
2609 integer,
allocatable:: mask_array(:,:,:,:,:,:,:)
2610 logical,
allocatable:: judge(:,:,:,:,:,:,:)
2611 logical,
allocatable:: judge_rev(:,:,:,:,:,:,:)
2620 answer_shape = shape(answer)
2621 check_shape = shape(check)
2623 consist_shape = answer_shape == check_shape
2625 if (.not. all(consist_shape))
then 2626 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 2628 write(*,*)
' shape of check is (', check_shape,
')' 2629 write(*,*)
' is INCORRECT' 2630 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 2636 allocate( mask_array( &
2637 & answer_shape(1), &
2639 & answer_shape(2), &
2641 & answer_shape(3), &
2643 & answer_shape(4), &
2645 & answer_shape(5), &
2647 & answer_shape(6), &
2649 & answer_shape(7) ) &
2653 & answer_shape(1), &
2655 & answer_shape(2), &
2657 & answer_shape(3), &
2659 & answer_shape(4), &
2661 & answer_shape(5), &
2663 & answer_shape(6), &
2665 & answer_shape(7) ) &
2668 allocate( judge_rev( &
2669 & answer_shape(1), &
2671 & answer_shape(2), &
2673 & answer_shape(3), &
2675 & answer_shape(4), &
2677 & answer_shape(5), &
2679 & answer_shape(6), &
2681 & answer_shape(7) ) &
2685 judge = answer == check
2689 judge_rev = .not. judge
2690 err_flag = any(judge_rev)
2692 pos = maxloc(mask_array, judge_rev)
2726 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
2728 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
2730 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
2732 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
2734 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
2736 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
2738 write(unit=pos_array(7), fmt=
"(i20)") pos(7)
2742 & trim(adjustl(pos_array(1))) //
',' // &
2744 & trim(adjustl(pos_array(2))) //
',' // &
2746 & trim(adjustl(pos_array(3))) //
',' // &
2748 & trim(adjustl(pos_array(4))) //
',' // &
2750 & trim(adjustl(pos_array(5))) //
',' // &
2752 & trim(adjustl(pos_array(6))) //
',' // &
2754 & trim(adjustl(pos_array(7))) //
')' 2757 deallocate(mask_array, judge, judge_rev)
2763 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 2765 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
2766 write(*,*)
' is NOT EQUAL to' 2767 write(*,*)
' answer' // trim(pos_str) //
' = ', right
2771 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 2781 character(*),
intent(in):: message
2782 real,
intent(in):: answer
2783 real,
intent(in):: check
2785 character(STRING):: pos_str
2796 err_flag = .not. answer == check
2805 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 2807 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
2808 write(*,*)
' is NOT EQUAL to' 2809 write(*,*)
' answer' // trim(pos_str) //
' = ', right
2813 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 2823 character(*),
intent(in):: message
2824 real,
intent(in):: answer(:)
2825 real,
intent(in):: check(:)
2827 character(STRING):: pos_str
2830 integer:: answer_shape(1), check_shape(1), pos(1)
2831 logical:: consist_shape(1)
2832 character(TOKEN):: pos_array(1)
2833 integer,
allocatable:: mask_array(:)
2834 logical,
allocatable:: judge(:)
2835 logical,
allocatable:: judge_rev(:)
2844 answer_shape = shape(answer)
2845 check_shape = shape(check)
2847 consist_shape = answer_shape == check_shape
2849 if (.not. all(consist_shape))
then 2850 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 2852 write(*,*)
' shape of check is (', check_shape,
')' 2853 write(*,*)
' is INCORRECT' 2854 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 2860 allocate( mask_array( &
2862 & answer_shape(1) ) &
2867 & answer_shape(1) ) &
2870 allocate( judge_rev( &
2872 & answer_shape(1) ) &
2876 judge = answer == check
2880 judge_rev = .not. judge
2881 err_flag = any(judge_rev)
2883 pos = maxloc(mask_array, judge_rev)
2895 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
2900 & trim(adjustl(pos_array(1))) //
')' 2903 deallocate(mask_array, judge, judge_rev)
2909 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 2911 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
2912 write(*,*)
' is NOT EQUAL to' 2913 write(*,*)
' answer' // trim(pos_str) //
' = ', right
2917 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 2927 character(*),
intent(in):: message
2928 real,
intent(in):: answer(:,:)
2929 real,
intent(in):: check(:,:)
2931 character(STRING):: pos_str
2934 integer:: answer_shape(2), check_shape(2), pos(2)
2935 logical:: consist_shape(2)
2936 character(TOKEN):: pos_array(2)
2937 integer,
allocatable:: mask_array(:,:)
2938 logical,
allocatable:: judge(:,:)
2939 logical,
allocatable:: judge_rev(:,:)
2948 answer_shape = shape(answer)
2949 check_shape = shape(check)
2951 consist_shape = answer_shape == check_shape
2953 if (.not. all(consist_shape))
then 2954 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 2956 write(*,*)
' shape of check is (', check_shape,
')' 2957 write(*,*)
' is INCORRECT' 2958 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 2964 allocate( mask_array( &
2965 & answer_shape(1), &
2967 & answer_shape(2) ) &
2971 & answer_shape(1), &
2973 & answer_shape(2) ) &
2976 allocate( judge_rev( &
2977 & answer_shape(1), &
2979 & answer_shape(2) ) &
2983 judge = answer == check
2987 judge_rev = .not. judge
2988 err_flag = any(judge_rev)
2990 pos = maxloc(mask_array, judge_rev)
3004 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
3006 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
3010 & trim(adjustl(pos_array(1))) //
',' // &
3012 & trim(adjustl(pos_array(2))) //
')' 3015 deallocate(mask_array, judge, judge_rev)
3021 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3023 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
3024 write(*,*)
' is NOT EQUAL to' 3025 write(*,*)
' answer' // trim(pos_str) //
' = ', right
3029 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 3039 character(*),
intent(in):: message
3040 real,
intent(in):: answer(:,:,:)
3041 real,
intent(in):: check(:,:,:)
3043 character(STRING):: pos_str
3046 integer:: answer_shape(3), check_shape(3), pos(3)
3047 logical:: consist_shape(3)
3048 character(TOKEN):: pos_array(3)
3049 integer,
allocatable:: mask_array(:,:,:)
3050 logical,
allocatable:: judge(:,:,:)
3051 logical,
allocatable:: judge_rev(:,:,:)
3060 answer_shape = shape(answer)
3061 check_shape = shape(check)
3063 consist_shape = answer_shape == check_shape
3065 if (.not. all(consist_shape))
then 3066 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3068 write(*,*)
' shape of check is (', check_shape,
')' 3069 write(*,*)
' is INCORRECT' 3070 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 3076 allocate( mask_array( &
3077 & answer_shape(1), &
3079 & answer_shape(2), &
3081 & answer_shape(3) ) &
3085 & answer_shape(1), &
3087 & answer_shape(2), &
3089 & answer_shape(3) ) &
3092 allocate( judge_rev( &
3093 & answer_shape(1), &
3095 & answer_shape(2), &
3097 & answer_shape(3) ) &
3101 judge = answer == check
3105 judge_rev = .not. judge
3106 err_flag = any(judge_rev)
3108 pos = maxloc(mask_array, judge_rev)
3126 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
3128 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
3130 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
3134 & trim(adjustl(pos_array(1))) //
',' // &
3136 & trim(adjustl(pos_array(2))) //
',' // &
3138 & trim(adjustl(pos_array(3))) //
')' 3141 deallocate(mask_array, judge, judge_rev)
3147 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3149 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
3150 write(*,*)
' is NOT EQUAL to' 3151 write(*,*)
' answer' // trim(pos_str) //
' = ', right
3155 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 3165 character(*),
intent(in):: message
3166 real,
intent(in):: answer(:,:,:,:)
3167 real,
intent(in):: check(:,:,:,:)
3169 character(STRING):: pos_str
3172 integer:: answer_shape(4), check_shape(4), pos(4)
3173 logical:: consist_shape(4)
3174 character(TOKEN):: pos_array(4)
3175 integer,
allocatable:: mask_array(:,:,:,:)
3176 logical,
allocatable:: judge(:,:,:,:)
3177 logical,
allocatable:: judge_rev(:,:,:,:)
3186 answer_shape = shape(answer)
3187 check_shape = shape(check)
3189 consist_shape = answer_shape == check_shape
3191 if (.not. all(consist_shape))
then 3192 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3194 write(*,*)
' shape of check is (', check_shape,
')' 3195 write(*,*)
' is INCORRECT' 3196 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 3202 allocate( mask_array( &
3203 & answer_shape(1), &
3205 & answer_shape(2), &
3207 & answer_shape(3), &
3209 & answer_shape(4) ) &
3213 & answer_shape(1), &
3215 & answer_shape(2), &
3217 & answer_shape(3), &
3219 & answer_shape(4) ) &
3222 allocate( judge_rev( &
3223 & answer_shape(1), &
3225 & answer_shape(2), &
3227 & answer_shape(3), &
3229 & answer_shape(4) ) &
3233 judge = answer == check
3237 judge_rev = .not. judge
3238 err_flag = any(judge_rev)
3240 pos = maxloc(mask_array, judge_rev)
3262 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
3264 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
3266 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
3268 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
3272 & trim(adjustl(pos_array(1))) //
',' // &
3274 & trim(adjustl(pos_array(2))) //
',' // &
3276 & trim(adjustl(pos_array(3))) //
',' // &
3278 & trim(adjustl(pos_array(4))) //
')' 3281 deallocate(mask_array, judge, judge_rev)
3287 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3289 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
3290 write(*,*)
' is NOT EQUAL to' 3291 write(*,*)
' answer' // trim(pos_str) //
' = ', right
3295 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 3305 character(*),
intent(in):: message
3306 real,
intent(in):: answer(:,:,:,:,:)
3307 real,
intent(in):: check(:,:,:,:,:)
3309 character(STRING):: pos_str
3312 integer:: answer_shape(5), check_shape(5), pos(5)
3313 logical:: consist_shape(5)
3314 character(TOKEN):: pos_array(5)
3315 integer,
allocatable:: mask_array(:,:,:,:,:)
3316 logical,
allocatable:: judge(:,:,:,:,:)
3317 logical,
allocatable:: judge_rev(:,:,:,:,:)
3326 answer_shape = shape(answer)
3327 check_shape = shape(check)
3329 consist_shape = answer_shape == check_shape
3331 if (.not. all(consist_shape))
then 3332 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3334 write(*,*)
' shape of check is (', check_shape,
')' 3335 write(*,*)
' is INCORRECT' 3336 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 3342 allocate( mask_array( &
3343 & answer_shape(1), &
3345 & answer_shape(2), &
3347 & answer_shape(3), &
3349 & answer_shape(4), &
3351 & answer_shape(5) ) &
3355 & answer_shape(1), &
3357 & answer_shape(2), &
3359 & answer_shape(3), &
3361 & answer_shape(4), &
3363 & answer_shape(5) ) &
3366 allocate( judge_rev( &
3367 & answer_shape(1), &
3369 & answer_shape(2), &
3371 & answer_shape(3), &
3373 & answer_shape(4), &
3375 & answer_shape(5) ) &
3379 judge = answer == check
3383 judge_rev = .not. judge
3384 err_flag = any(judge_rev)
3386 pos = maxloc(mask_array, judge_rev)
3412 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
3414 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
3416 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
3418 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
3420 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
3424 & trim(adjustl(pos_array(1))) //
',' // &
3426 & trim(adjustl(pos_array(2))) //
',' // &
3428 & trim(adjustl(pos_array(3))) //
',' // &
3430 & trim(adjustl(pos_array(4))) //
',' // &
3432 & trim(adjustl(pos_array(5))) //
')' 3435 deallocate(mask_array, judge, judge_rev)
3441 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3443 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
3444 write(*,*)
' is NOT EQUAL to' 3445 write(*,*)
' answer' // trim(pos_str) //
' = ', right
3449 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 3459 character(*),
intent(in):: message
3460 real,
intent(in):: answer(:,:,:,:,:,:)
3461 real,
intent(in):: check(:,:,:,:,:,:)
3463 character(STRING):: pos_str
3466 integer:: answer_shape(6), check_shape(6), pos(6)
3467 logical:: consist_shape(6)
3468 character(TOKEN):: pos_array(6)
3469 integer,
allocatable:: mask_array(:,:,:,:,:,:)
3470 logical,
allocatable:: judge(:,:,:,:,:,:)
3471 logical,
allocatable:: judge_rev(:,:,:,:,:,:)
3480 answer_shape = shape(answer)
3481 check_shape = shape(check)
3483 consist_shape = answer_shape == check_shape
3485 if (.not. all(consist_shape))
then 3486 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3488 write(*,*)
' shape of check is (', check_shape,
')' 3489 write(*,*)
' is INCORRECT' 3490 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 3496 allocate( mask_array( &
3497 & answer_shape(1), &
3499 & answer_shape(2), &
3501 & answer_shape(3), &
3503 & answer_shape(4), &
3505 & answer_shape(5), &
3507 & answer_shape(6) ) &
3511 & answer_shape(1), &
3513 & answer_shape(2), &
3515 & answer_shape(3), &
3517 & answer_shape(4), &
3519 & answer_shape(5), &
3521 & answer_shape(6) ) &
3524 allocate( judge_rev( &
3525 & answer_shape(1), &
3527 & answer_shape(2), &
3529 & answer_shape(3), &
3531 & answer_shape(4), &
3533 & answer_shape(5), &
3535 & answer_shape(6) ) &
3539 judge = answer == check
3543 judge_rev = .not. judge
3544 err_flag = any(judge_rev)
3546 pos = maxloc(mask_array, judge_rev)
3576 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
3578 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
3580 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
3582 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
3584 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
3586 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
3590 & trim(adjustl(pos_array(1))) //
',' // &
3592 & trim(adjustl(pos_array(2))) //
',' // &
3594 & trim(adjustl(pos_array(3))) //
',' // &
3596 & trim(adjustl(pos_array(4))) //
',' // &
3598 & trim(adjustl(pos_array(5))) //
',' // &
3600 & trim(adjustl(pos_array(6))) //
')' 3603 deallocate(mask_array, judge, judge_rev)
3609 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3611 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
3612 write(*,*)
' is NOT EQUAL to' 3613 write(*,*)
' answer' // trim(pos_str) //
' = ', right
3617 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 3627 character(*),
intent(in):: message
3628 real,
intent(in):: answer(:,:,:,:,:,:,:)
3629 real,
intent(in):: check(:,:,:,:,:,:,:)
3631 character(STRING):: pos_str
3634 integer:: answer_shape(7), check_shape(7), pos(7)
3635 logical:: consist_shape(7)
3636 character(TOKEN):: pos_array(7)
3637 integer,
allocatable:: mask_array(:,:,:,:,:,:,:)
3638 logical,
allocatable:: judge(:,:,:,:,:,:,:)
3639 logical,
allocatable:: judge_rev(:,:,:,:,:,:,:)
3648 answer_shape = shape(answer)
3649 check_shape = shape(check)
3651 consist_shape = answer_shape == check_shape
3653 if (.not. all(consist_shape))
then 3654 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3656 write(*,*)
' shape of check is (', check_shape,
')' 3657 write(*,*)
' is INCORRECT' 3658 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 3664 allocate( mask_array( &
3665 & answer_shape(1), &
3667 & answer_shape(2), &
3669 & answer_shape(3), &
3671 & answer_shape(4), &
3673 & answer_shape(5), &
3675 & answer_shape(6), &
3677 & answer_shape(7) ) &
3681 & answer_shape(1), &
3683 & answer_shape(2), &
3685 & answer_shape(3), &
3687 & answer_shape(4), &
3689 & answer_shape(5), &
3691 & answer_shape(6), &
3693 & answer_shape(7) ) &
3696 allocate( judge_rev( &
3697 & answer_shape(1), &
3699 & answer_shape(2), &
3701 & answer_shape(3), &
3703 & answer_shape(4), &
3705 & answer_shape(5), &
3707 & answer_shape(6), &
3709 & answer_shape(7) ) &
3713 judge = answer == check
3717 judge_rev = .not. judge
3718 err_flag = any(judge_rev)
3720 pos = maxloc(mask_array, judge_rev)
3754 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
3756 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
3758 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
3760 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
3762 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
3764 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
3766 write(unit=pos_array(7), fmt=
"(i20)") pos(7)
3770 & trim(adjustl(pos_array(1))) //
',' // &
3772 & trim(adjustl(pos_array(2))) //
',' // &
3774 & trim(adjustl(pos_array(3))) //
',' // &
3776 & trim(adjustl(pos_array(4))) //
',' // &
3778 & trim(adjustl(pos_array(5))) //
',' // &
3780 & trim(adjustl(pos_array(6))) //
',' // &
3782 & trim(adjustl(pos_array(7))) //
')' 3785 deallocate(mask_array, judge, judge_rev)
3791 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3793 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
3794 write(*,*)
' is NOT EQUAL to' 3795 write(*,*)
' answer' // trim(pos_str) //
' = ', right
3799 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 3809 character(*),
intent(in):: message
3810 real(DP),
intent(in):: answer
3811 real(DP),
intent(in):: check
3813 character(STRING):: pos_str
3814 real(DP):: wrong, right
3824 err_flag = .not. answer == check
3833 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3835 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
3836 write(*,*)
' is NOT EQUAL to' 3837 write(*,*)
' answer' // trim(pos_str) //
' = ', right
3841 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 3851 character(*),
intent(in):: message
3852 real(DP),
intent(in):: answer(:)
3853 real(DP),
intent(in):: check(:)
3855 character(STRING):: pos_str
3856 real(DP):: wrong, right
3858 integer:: answer_shape(1), check_shape(1), pos(1)
3859 logical:: consist_shape(1)
3860 character(TOKEN):: pos_array(1)
3861 integer,
allocatable:: mask_array(:)
3862 logical,
allocatable:: judge(:)
3863 logical,
allocatable:: judge_rev(:)
3872 answer_shape = shape(answer)
3873 check_shape = shape(check)
3875 consist_shape = answer_shape == check_shape
3877 if (.not. all(consist_shape))
then 3878 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3880 write(*,*)
' shape of check is (', check_shape,
')' 3881 write(*,*)
' is INCORRECT' 3882 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 3888 allocate( mask_array( &
3890 & answer_shape(1) ) &
3895 & answer_shape(1) ) &
3898 allocate( judge_rev( &
3900 & answer_shape(1) ) &
3904 judge = answer == check
3908 judge_rev = .not. judge
3909 err_flag = any(judge_rev)
3911 pos = maxloc(mask_array, judge_rev)
3923 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
3928 & trim(adjustl(pos_array(1))) //
')' 3931 deallocate(mask_array, judge, judge_rev)
3937 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3939 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
3940 write(*,*)
' is NOT EQUAL to' 3941 write(*,*)
' answer' // trim(pos_str) //
' = ', right
3945 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 3955 character(*),
intent(in):: message
3956 real(DP),
intent(in):: answer(:,:)
3957 real(DP),
intent(in):: check(:,:)
3959 character(STRING):: pos_str
3960 real(DP):: wrong, right
3962 integer:: answer_shape(2), check_shape(2), pos(2)
3963 logical:: consist_shape(2)
3964 character(TOKEN):: pos_array(2)
3965 integer,
allocatable:: mask_array(:,:)
3966 logical,
allocatable:: judge(:,:)
3967 logical,
allocatable:: judge_rev(:,:)
3976 answer_shape = shape(answer)
3977 check_shape = shape(check)
3979 consist_shape = answer_shape == check_shape
3981 if (.not. all(consist_shape))
then 3982 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 3984 write(*,*)
' shape of check is (', check_shape,
')' 3985 write(*,*)
' is INCORRECT' 3986 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 3992 allocate( mask_array( &
3993 & answer_shape(1), &
3995 & answer_shape(2) ) &
3999 & answer_shape(1), &
4001 & answer_shape(2) ) &
4004 allocate( judge_rev( &
4005 & answer_shape(1), &
4007 & answer_shape(2) ) &
4011 judge = answer == check
4015 judge_rev = .not. judge
4016 err_flag = any(judge_rev)
4018 pos = maxloc(mask_array, judge_rev)
4032 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
4034 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
4038 & trim(adjustl(pos_array(1))) //
',' // &
4040 & trim(adjustl(pos_array(2))) //
')' 4043 deallocate(mask_array, judge, judge_rev)
4049 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 4051 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
4052 write(*,*)
' is NOT EQUAL to' 4053 write(*,*)
' answer' // trim(pos_str) //
' = ', right
4057 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 4067 character(*),
intent(in):: message
4068 real(DP),
intent(in):: answer(:,:,:)
4069 real(DP),
intent(in):: check(:,:,:)
4071 character(STRING):: pos_str
4072 real(DP):: wrong, right
4074 integer:: answer_shape(3), check_shape(3), pos(3)
4075 logical:: consist_shape(3)
4076 character(TOKEN):: pos_array(3)
4077 integer,
allocatable:: mask_array(:,:,:)
4078 logical,
allocatable:: judge(:,:,:)
4079 logical,
allocatable:: judge_rev(:,:,:)
4088 answer_shape = shape(answer)
4089 check_shape = shape(check)
4091 consist_shape = answer_shape == check_shape
4093 if (.not. all(consist_shape))
then 4094 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 4096 write(*,*)
' shape of check is (', check_shape,
')' 4097 write(*,*)
' is INCORRECT' 4098 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 4104 allocate( mask_array( &
4105 & answer_shape(1), &
4107 & answer_shape(2), &
4109 & answer_shape(3) ) &
4113 & answer_shape(1), &
4115 & answer_shape(2), &
4117 & answer_shape(3) ) &
4120 allocate( judge_rev( &
4121 & answer_shape(1), &
4123 & answer_shape(2), &
4125 & answer_shape(3) ) &
4129 judge = answer == check
4133 judge_rev = .not. judge
4134 err_flag = any(judge_rev)
4136 pos = maxloc(mask_array, judge_rev)
4154 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
4156 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
4158 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
4162 & trim(adjustl(pos_array(1))) //
',' // &
4164 & trim(adjustl(pos_array(2))) //
',' // &
4166 & trim(adjustl(pos_array(3))) //
')' 4169 deallocate(mask_array, judge, judge_rev)
4175 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 4177 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
4178 write(*,*)
' is NOT EQUAL to' 4179 write(*,*)
' answer' // trim(pos_str) //
' = ', right
4183 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 4193 character(*),
intent(in):: message
4194 real(DP),
intent(in):: answer(:,:,:,:)
4195 real(DP),
intent(in):: check(:,:,:,:)
4197 character(STRING):: pos_str
4198 real(DP):: wrong, right
4200 integer:: answer_shape(4), check_shape(4), pos(4)
4201 logical:: consist_shape(4)
4202 character(TOKEN):: pos_array(4)
4203 integer,
allocatable:: mask_array(:,:,:,:)
4204 logical,
allocatable:: judge(:,:,:,:)
4205 logical,
allocatable:: judge_rev(:,:,:,:)
4214 answer_shape = shape(answer)
4215 check_shape = shape(check)
4217 consist_shape = answer_shape == check_shape
4219 if (.not. all(consist_shape))
then 4220 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 4222 write(*,*)
' shape of check is (', check_shape,
')' 4223 write(*,*)
' is INCORRECT' 4224 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 4230 allocate( mask_array( &
4231 & answer_shape(1), &
4233 & answer_shape(2), &
4235 & answer_shape(3), &
4237 & answer_shape(4) ) &
4241 & answer_shape(1), &
4243 & answer_shape(2), &
4245 & answer_shape(3), &
4247 & answer_shape(4) ) &
4250 allocate( judge_rev( &
4251 & answer_shape(1), &
4253 & answer_shape(2), &
4255 & answer_shape(3), &
4257 & answer_shape(4) ) &
4261 judge = answer == check
4265 judge_rev = .not. judge
4266 err_flag = any(judge_rev)
4268 pos = maxloc(mask_array, judge_rev)
4290 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
4292 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
4294 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
4296 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
4300 & trim(adjustl(pos_array(1))) //
',' // &
4302 & trim(adjustl(pos_array(2))) //
',' // &
4304 & trim(adjustl(pos_array(3))) //
',' // &
4306 & trim(adjustl(pos_array(4))) //
')' 4309 deallocate(mask_array, judge, judge_rev)
4315 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 4317 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
4318 write(*,*)
' is NOT EQUAL to' 4319 write(*,*)
' answer' // trim(pos_str) //
' = ', right
4323 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 4333 character(*),
intent(in):: message
4334 real(DP),
intent(in):: answer(:,:,:,:,:)
4335 real(DP),
intent(in):: check(:,:,:,:,:)
4337 character(STRING):: pos_str
4338 real(DP):: wrong, right
4340 integer:: answer_shape(5), check_shape(5), pos(5)
4341 logical:: consist_shape(5)
4342 character(TOKEN):: pos_array(5)
4343 integer,
allocatable:: mask_array(:,:,:,:,:)
4344 logical,
allocatable:: judge(:,:,:,:,:)
4345 logical,
allocatable:: judge_rev(:,:,:,:,:)
4354 answer_shape = shape(answer)
4355 check_shape = shape(check)
4357 consist_shape = answer_shape == check_shape
4359 if (.not. all(consist_shape))
then 4360 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 4362 write(*,*)
' shape of check is (', check_shape,
')' 4363 write(*,*)
' is INCORRECT' 4364 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 4370 allocate( mask_array( &
4371 & answer_shape(1), &
4373 & answer_shape(2), &
4375 & answer_shape(3), &
4377 & answer_shape(4), &
4379 & answer_shape(5) ) &
4383 & answer_shape(1), &
4385 & answer_shape(2), &
4387 & answer_shape(3), &
4389 & answer_shape(4), &
4391 & answer_shape(5) ) &
4394 allocate( judge_rev( &
4395 & answer_shape(1), &
4397 & answer_shape(2), &
4399 & answer_shape(3), &
4401 & answer_shape(4), &
4403 & answer_shape(5) ) &
4407 judge = answer == check
4411 judge_rev = .not. judge
4412 err_flag = any(judge_rev)
4414 pos = maxloc(mask_array, judge_rev)
4440 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
4442 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
4444 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
4446 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
4448 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
4452 & trim(adjustl(pos_array(1))) //
',' // &
4454 & trim(adjustl(pos_array(2))) //
',' // &
4456 & trim(adjustl(pos_array(3))) //
',' // &
4458 & trim(adjustl(pos_array(4))) //
',' // &
4460 & trim(adjustl(pos_array(5))) //
')' 4463 deallocate(mask_array, judge, judge_rev)
4469 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 4471 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
4472 write(*,*)
' is NOT EQUAL to' 4473 write(*,*)
' answer' // trim(pos_str) //
' = ', right
4477 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 4487 character(*),
intent(in):: message
4488 real(DP),
intent(in):: answer(:,:,:,:,:,:)
4489 real(DP),
intent(in):: check(:,:,:,:,:,:)
4491 character(STRING):: pos_str
4492 real(DP):: wrong, right
4494 integer:: answer_shape(6), check_shape(6), pos(6)
4495 logical:: consist_shape(6)
4496 character(TOKEN):: pos_array(6)
4497 integer,
allocatable:: mask_array(:,:,:,:,:,:)
4498 logical,
allocatable:: judge(:,:,:,:,:,:)
4499 logical,
allocatable:: judge_rev(:,:,:,:,:,:)
4508 answer_shape = shape(answer)
4509 check_shape = shape(check)
4511 consist_shape = answer_shape == check_shape
4513 if (.not. all(consist_shape))
then 4514 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 4516 write(*,*)
' shape of check is (', check_shape,
')' 4517 write(*,*)
' is INCORRECT' 4518 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 4524 allocate( mask_array( &
4525 & answer_shape(1), &
4527 & answer_shape(2), &
4529 & answer_shape(3), &
4531 & answer_shape(4), &
4533 & answer_shape(5), &
4535 & answer_shape(6) ) &
4539 & answer_shape(1), &
4541 & answer_shape(2), &
4543 & answer_shape(3), &
4545 & answer_shape(4), &
4547 & answer_shape(5), &
4549 & answer_shape(6) ) &
4552 allocate( judge_rev( &
4553 & answer_shape(1), &
4555 & answer_shape(2), &
4557 & answer_shape(3), &
4559 & answer_shape(4), &
4561 & answer_shape(5), &
4563 & answer_shape(6) ) &
4567 judge = answer == check
4571 judge_rev = .not. judge
4572 err_flag = any(judge_rev)
4574 pos = maxloc(mask_array, judge_rev)
4604 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
4606 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
4608 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
4610 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
4612 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
4614 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
4618 & trim(adjustl(pos_array(1))) //
',' // &
4620 & trim(adjustl(pos_array(2))) //
',' // &
4622 & trim(adjustl(pos_array(3))) //
',' // &
4624 & trim(adjustl(pos_array(4))) //
',' // &
4626 & trim(adjustl(pos_array(5))) //
',' // &
4628 & trim(adjustl(pos_array(6))) //
')' 4631 deallocate(mask_array, judge, judge_rev)
4637 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 4639 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
4640 write(*,*)
' is NOT EQUAL to' 4641 write(*,*)
' answer' // trim(pos_str) //
' = ', right
4645 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 4655 character(*),
intent(in):: message
4656 real(DP),
intent(in):: answer(:,:,:,:,:,:,:)
4657 real(DP),
intent(in):: check(:,:,:,:,:,:,:)
4659 character(STRING):: pos_str
4660 real(DP):: wrong, right
4662 integer:: answer_shape(7), check_shape(7), pos(7)
4663 logical:: consist_shape(7)
4664 character(TOKEN):: pos_array(7)
4665 integer,
allocatable:: mask_array(:,:,:,:,:,:,:)
4666 logical,
allocatable:: judge(:,:,:,:,:,:,:)
4667 logical,
allocatable:: judge_rev(:,:,:,:,:,:,:)
4676 answer_shape = shape(answer)
4677 check_shape = shape(check)
4679 consist_shape = answer_shape == check_shape
4681 if (.not. all(consist_shape))
then 4682 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 4684 write(*,*)
' shape of check is (', check_shape,
')' 4685 write(*,*)
' is INCORRECT' 4686 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 4692 allocate( mask_array( &
4693 & answer_shape(1), &
4695 & answer_shape(2), &
4697 & answer_shape(3), &
4699 & answer_shape(4), &
4701 & answer_shape(5), &
4703 & answer_shape(6), &
4705 & answer_shape(7) ) &
4709 & answer_shape(1), &
4711 & answer_shape(2), &
4713 & answer_shape(3), &
4715 & answer_shape(4), &
4717 & answer_shape(5), &
4719 & answer_shape(6), &
4721 & answer_shape(7) ) &
4724 allocate( judge_rev( &
4725 & answer_shape(1), &
4727 & answer_shape(2), &
4729 & answer_shape(3), &
4731 & answer_shape(4), &
4733 & answer_shape(5), &
4735 & answer_shape(6), &
4737 & answer_shape(7) ) &
4741 judge = answer == check
4745 judge_rev = .not. judge
4746 err_flag = any(judge_rev)
4748 pos = maxloc(mask_array, judge_rev)
4782 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
4784 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
4786 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
4788 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
4790 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
4792 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
4794 write(unit=pos_array(7), fmt=
"(i20)") pos(7)
4798 & trim(adjustl(pos_array(1))) //
',' // &
4800 & trim(adjustl(pos_array(2))) //
',' // &
4802 & trim(adjustl(pos_array(3))) //
',' // &
4804 & trim(adjustl(pos_array(4))) //
',' // &
4806 & trim(adjustl(pos_array(5))) //
',' // &
4808 & trim(adjustl(pos_array(6))) //
',' // &
4810 & trim(adjustl(pos_array(7))) //
')' 4813 deallocate(mask_array, judge, judge_rev)
4819 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 4821 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
4822 write(*,*)
' is NOT EQUAL to' 4823 write(*,*)
' answer' // trim(pos_str) //
' = ', right
4827 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 4836 character(*),
intent(in):: message
4837 logical,
intent(in):: answer
4838 logical,
intent(in):: check
4840 character(STRING):: answer_str
4841 character(STRING):: check_str
4849 answer_str =
".true." 4851 answer_str =
".false." 4855 check_str =
".true." 4857 check_str =
".false." 4862 call dctestassertequalchar0(message, answer_str, check_str)
4870 character(*),
intent(in):: message
4871 logical,
intent(in):: answer(:)
4872 logical,
intent(in):: check(:)
4874 integer:: answer_shape(1), check_shape(1), i
4875 logical,
allocatable:: answer_tmp(:), check_tmp(:)
4876 character(STRING),
allocatable:: answer_str_tmp(:), check_str_tmp(:)
4877 character(STRING),
allocatable:: answer_str(:)
4878 character(STRING),
allocatable:: check_str(:)
4885 allocate(answer_tmp(
size(answer)))
4886 allocate(check_tmp(
size(check)))
4887 allocate(answer_str_tmp(
size(answer)))
4888 allocate(check_str_tmp(
size(check)))
4889 answer_tmp = pack(answer, .true.)
4890 check_tmp = pack(check, .true.)
4892 do i = 1,
size(answer_tmp)
4893 if (answer_tmp(i))
then 4894 answer_str_tmp(i) =
'.true.' 4896 answer_str_tmp(i) =
'.false.' 4900 do i = 1,
size(check_tmp)
4901 if (check_tmp(i))
then 4902 check_str_tmp(i) =
'.true.' 4904 check_str_tmp(i) =
'.false.' 4908 answer_shape = shape(answer)
4909 check_shape = shape(check)
4911 allocate( answer_str( &
4913 & answer_shape(1) ) &
4916 allocate( check_str( &
4918 & check_shape(1) ) &
4921 answer_str = reshape(answer_str_tmp, answer_shape)
4922 check_str = reshape(check_str_tmp, check_shape)
4928 deallocate(answer_str, answer_tmp, answer_str_tmp)
4929 deallocate(check_str, check_tmp, check_str_tmp)
4936 character(*),
intent(in):: message
4937 logical,
intent(in):: answer(:,:)
4938 logical,
intent(in):: check(:,:)
4940 integer:: answer_shape(2), check_shape(2), i
4941 logical,
allocatable:: answer_tmp(:), check_tmp(:)
4942 character(STRING),
allocatable:: answer_str_tmp(:), check_str_tmp(:)
4943 character(STRING),
allocatable:: answer_str(:,:)
4944 character(STRING),
allocatable:: check_str(:,:)
4951 allocate(answer_tmp(
size(answer)))
4952 allocate(check_tmp(
size(check)))
4953 allocate(answer_str_tmp(
size(answer)))
4954 allocate(check_str_tmp(
size(check)))
4955 answer_tmp = pack(answer, .true.)
4956 check_tmp = pack(check, .true.)
4958 do i = 1,
size(answer_tmp)
4959 if (answer_tmp(i))
then 4960 answer_str_tmp(i) =
'.true.' 4962 answer_str_tmp(i) =
'.false.' 4966 do i = 1,
size(check_tmp)
4967 if (check_tmp(i))
then 4968 check_str_tmp(i) =
'.true.' 4970 check_str_tmp(i) =
'.false.' 4974 answer_shape = shape(answer)
4975 check_shape = shape(check)
4977 allocate( answer_str( &
4978 & answer_shape(1), &
4980 & answer_shape(2) ) &
4983 allocate( check_str( &
4986 & check_shape(2) ) &
4989 answer_str = reshape(answer_str_tmp, answer_shape)
4990 check_str = reshape(check_str_tmp, check_shape)
4996 deallocate(answer_str, answer_tmp, answer_str_tmp)
4997 deallocate(check_str, check_tmp, check_str_tmp)
5004 character(*),
intent(in):: message
5005 logical,
intent(in):: answer(:,:,:)
5006 logical,
intent(in):: check(:,:,:)
5008 integer:: answer_shape(3), check_shape(3), i
5009 logical,
allocatable:: answer_tmp(:), check_tmp(:)
5010 character(STRING),
allocatable:: answer_str_tmp(:), check_str_tmp(:)
5011 character(STRING),
allocatable:: answer_str(:,:,:)
5012 character(STRING),
allocatable:: check_str(:,:,:)
5019 allocate(answer_tmp(
size(answer)))
5020 allocate(check_tmp(
size(check)))
5021 allocate(answer_str_tmp(
size(answer)))
5022 allocate(check_str_tmp(
size(check)))
5023 answer_tmp = pack(answer, .true.)
5024 check_tmp = pack(check, .true.)
5026 do i = 1,
size(answer_tmp)
5027 if (answer_tmp(i))
then 5028 answer_str_tmp(i) =
'.true.' 5030 answer_str_tmp(i) =
'.false.' 5034 do i = 1,
size(check_tmp)
5035 if (check_tmp(i))
then 5036 check_str_tmp(i) =
'.true.' 5038 check_str_tmp(i) =
'.false.' 5042 answer_shape = shape(answer)
5043 check_shape = shape(check)
5045 allocate( answer_str( &
5046 & answer_shape(1), &
5048 & answer_shape(2), &
5050 & answer_shape(3) ) &
5053 allocate( check_str( &
5058 & check_shape(3) ) &
5061 answer_str = reshape(answer_str_tmp, answer_shape)
5062 check_str = reshape(check_str_tmp, check_shape)
5068 deallocate(answer_str, answer_tmp, answer_str_tmp)
5069 deallocate(check_str, check_tmp, check_str_tmp)
5076 character(*),
intent(in):: message
5077 logical,
intent(in):: answer(:,:,:,:)
5078 logical,
intent(in):: check(:,:,:,:)
5080 integer:: answer_shape(4), check_shape(4), i
5081 logical,
allocatable:: answer_tmp(:), check_tmp(:)
5082 character(STRING),
allocatable:: answer_str_tmp(:), check_str_tmp(:)
5083 character(STRING),
allocatable:: answer_str(:,:,:,:)
5084 character(STRING),
allocatable:: check_str(:,:,:,:)
5091 allocate(answer_tmp(
size(answer)))
5092 allocate(check_tmp(
size(check)))
5093 allocate(answer_str_tmp(
size(answer)))
5094 allocate(check_str_tmp(
size(check)))
5095 answer_tmp = pack(answer, .true.)
5096 check_tmp = pack(check, .true.)
5098 do i = 1,
size(answer_tmp)
5099 if (answer_tmp(i))
then 5100 answer_str_tmp(i) =
'.true.' 5102 answer_str_tmp(i) =
'.false.' 5106 do i = 1,
size(check_tmp)
5107 if (check_tmp(i))
then 5108 check_str_tmp(i) =
'.true.' 5110 check_str_tmp(i) =
'.false.' 5114 answer_shape = shape(answer)
5115 check_shape = shape(check)
5117 allocate( answer_str( &
5118 & answer_shape(1), &
5120 & answer_shape(2), &
5122 & answer_shape(3), &
5124 & answer_shape(4) ) &
5127 allocate( check_str( &
5134 & check_shape(4) ) &
5137 answer_str = reshape(answer_str_tmp, answer_shape)
5138 check_str = reshape(check_str_tmp, check_shape)
5144 deallocate(answer_str, answer_tmp, answer_str_tmp)
5145 deallocate(check_str, check_tmp, check_str_tmp)
5152 character(*),
intent(in):: message
5153 logical,
intent(in):: answer(:,:,:,:,:)
5154 logical,
intent(in):: check(:,:,:,:,:)
5156 integer:: answer_shape(5), check_shape(5), i
5157 logical,
allocatable:: answer_tmp(:), check_tmp(:)
5158 character(STRING),
allocatable:: answer_str_tmp(:), check_str_tmp(:)
5159 character(STRING),
allocatable:: answer_str(:,:,:,:,:)
5160 character(STRING),
allocatable:: check_str(:,:,:,:,:)
5167 allocate(answer_tmp(
size(answer)))
5168 allocate(check_tmp(
size(check)))
5169 allocate(answer_str_tmp(
size(answer)))
5170 allocate(check_str_tmp(
size(check)))
5171 answer_tmp = pack(answer, .true.)
5172 check_tmp = pack(check, .true.)
5174 do i = 1,
size(answer_tmp)
5175 if (answer_tmp(i))
then 5176 answer_str_tmp(i) =
'.true.' 5178 answer_str_tmp(i) =
'.false.' 5182 do i = 1,
size(check_tmp)
5183 if (check_tmp(i))
then 5184 check_str_tmp(i) =
'.true.' 5186 check_str_tmp(i) =
'.false.' 5190 answer_shape = shape(answer)
5191 check_shape = shape(check)
5193 allocate( answer_str( &
5194 & answer_shape(1), &
5196 & answer_shape(2), &
5198 & answer_shape(3), &
5200 & answer_shape(4), &
5202 & answer_shape(5) ) &
5205 allocate( check_str( &
5214 & check_shape(5) ) &
5217 answer_str = reshape(answer_str_tmp, answer_shape)
5218 check_str = reshape(check_str_tmp, check_shape)
5224 deallocate(answer_str, answer_tmp, answer_str_tmp)
5225 deallocate(check_str, check_tmp, check_str_tmp)
5232 character(*),
intent(in):: message
5233 logical,
intent(in):: answer(:,:,:,:,:,:)
5234 logical,
intent(in):: check(:,:,:,:,:,:)
5236 integer:: answer_shape(6), check_shape(6), i
5237 logical,
allocatable:: answer_tmp(:), check_tmp(:)
5238 character(STRING),
allocatable:: answer_str_tmp(:), check_str_tmp(:)
5239 character(STRING),
allocatable:: answer_str(:,:,:,:,:,:)
5240 character(STRING),
allocatable:: check_str(:,:,:,:,:,:)
5247 allocate(answer_tmp(
size(answer)))
5248 allocate(check_tmp(
size(check)))
5249 allocate(answer_str_tmp(
size(answer)))
5250 allocate(check_str_tmp(
size(check)))
5251 answer_tmp = pack(answer, .true.)
5252 check_tmp = pack(check, .true.)
5254 do i = 1,
size(answer_tmp)
5255 if (answer_tmp(i))
then 5256 answer_str_tmp(i) =
'.true.' 5258 answer_str_tmp(i) =
'.false.' 5262 do i = 1,
size(check_tmp)
5263 if (check_tmp(i))
then 5264 check_str_tmp(i) =
'.true.' 5266 check_str_tmp(i) =
'.false.' 5270 answer_shape = shape(answer)
5271 check_shape = shape(check)
5273 allocate( answer_str( &
5274 & answer_shape(1), &
5276 & answer_shape(2), &
5278 & answer_shape(3), &
5280 & answer_shape(4), &
5282 & answer_shape(5), &
5284 & answer_shape(6) ) &
5287 allocate( check_str( &
5298 & check_shape(6) ) &
5301 answer_str = reshape(answer_str_tmp, answer_shape)
5302 check_str = reshape(check_str_tmp, check_shape)
5308 deallocate(answer_str, answer_tmp, answer_str_tmp)
5309 deallocate(check_str, check_tmp, check_str_tmp)
5316 character(*),
intent(in):: message
5317 logical,
intent(in):: answer(:,:,:,:,:,:,:)
5318 logical,
intent(in):: check(:,:,:,:,:,:,:)
5320 integer:: answer_shape(7), check_shape(7), i
5321 logical,
allocatable:: answer_tmp(:), check_tmp(:)
5322 character(STRING),
allocatable:: answer_str_tmp(:), check_str_tmp(:)
5323 character(STRING),
allocatable:: answer_str(:,:,:,:,:,:,:)
5324 character(STRING),
allocatable:: check_str(:,:,:,:,:,:,:)
5331 allocate(answer_tmp(
size(answer)))
5332 allocate(check_tmp(
size(check)))
5333 allocate(answer_str_tmp(
size(answer)))
5334 allocate(check_str_tmp(
size(check)))
5335 answer_tmp = pack(answer, .true.)
5336 check_tmp = pack(check, .true.)
5338 do i = 1,
size(answer_tmp)
5339 if (answer_tmp(i))
then 5340 answer_str_tmp(i) =
'.true.' 5342 answer_str_tmp(i) =
'.false.' 5346 do i = 1,
size(check_tmp)
5347 if (check_tmp(i))
then 5348 check_str_tmp(i) =
'.true.' 5350 check_str_tmp(i) =
'.false.' 5354 answer_shape = shape(answer)
5355 check_shape = shape(check)
5357 allocate( answer_str( &
5358 & answer_shape(1), &
5360 & answer_shape(2), &
5362 & answer_shape(3), &
5364 & answer_shape(4), &
5366 & answer_shape(5), &
5368 & answer_shape(6), &
5370 & answer_shape(7) ) &
5373 allocate( check_str( &
5386 & check_shape(7) ) &
5389 answer_str = reshape(answer_str_tmp, answer_shape)
5390 check_str = reshape(check_str_tmp, check_shape)
5396 deallocate(answer_str, answer_tmp, answer_str_tmp)
5397 deallocate(check_str, check_tmp, check_str_tmp)
5403 & message, answer, check, significant_digits, ignore_digits )
5406 character(*),
intent(in):: message
5407 real,
intent(in):: answer
5408 real,
intent(in):: check
5409 integer,
intent(in):: significant_digits
5410 integer,
intent(in):: ignore_digits
5412 character(STRING):: pos_str
5413 real:: wrong, right_max, right_min
5414 character(STRING):: pos_str_space
5415 integer:: pos_str_len
5424 if ( significant_digits < 1 )
then 5425 write(*,*)
' *** Error [AssertEQ] *** ' 5426 write(*,*)
' Specify a number more than 1 to "significant_digits"' 5430 if ( answer < 0.0 .and. check < 0.0 )
then 5434 & - 0.1 ** significant_digits ) &
5435 & + 0.1 ** (- ignore_digits)
5440 & + 0.1 ** significant_digits ) &
5441 & - 0.1 ** (- ignore_digits)
5447 & + 0.1 ** significant_digits ) &
5448 & + 0.1 ** (- ignore_digits)
5453 & - 0.1 ** significant_digits ) &
5454 & - 0.1 ** (- ignore_digits)
5458 right_max = answer_max
5459 right_min = answer_min
5460 if ( right_max < right_min )
then 5461 right_tmp = right_max
5462 right_max = right_min
5463 right_min = right_tmp
5466 err_flag = .not. (answer_max > check .and. check > answer_min)
5474 pos_str_len = len_trim(pos_str)
5476 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 5478 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
5479 write(*,*)
' is NOT EQUAL to' 5480 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
5481 & //
' ', right_min,
' < ' 5482 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
5486 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 5494 & message, answer, check, significant_digits, ignore_digits )
5497 character(*),
intent(in):: message
5498 real,
intent(in):: answer(:)
5499 real,
intent(in):: check(:)
5500 integer,
intent(in):: significant_digits
5501 integer,
intent(in):: ignore_digits
5503 character(STRING):: pos_str
5504 real:: wrong, right_max, right_min
5505 character(STRING):: pos_str_space
5506 integer:: pos_str_len
5509 integer:: answer_shape(1), check_shape(1), pos(1)
5510 logical:: consist_shape(1)
5511 character(TOKEN):: pos_array(1)
5512 integer,
allocatable:: mask_array(:)
5513 logical,
allocatable:: judge(:)
5514 logical,
allocatable:: judge_rev(:)
5515 logical,
allocatable:: answer_negative(:)
5516 logical,
allocatable:: check_negative(:)
5517 logical,
allocatable:: both_negative(:)
5518 real,
allocatable:: answer_max(:)
5519 real,
allocatable:: answer_min(:)
5524 if ( significant_digits < 1 )
then 5525 write(*,*)
' *** Error [AssertEQ] *** ' 5526 write(*,*)
' Specify a number more than 1 to "significant_digits"' 5530 answer_shape = shape(answer)
5531 check_shape = shape(check)
5533 consist_shape = answer_shape == check_shape
5535 if (.not. all(consist_shape))
then 5536 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 5538 write(*,*)
' shape of check is (', check_shape,
')' 5539 write(*,*)
' is INCORRECT' 5540 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 5546 allocate( mask_array( &
5548 & answer_shape(1) ) &
5553 & answer_shape(1) ) &
5556 allocate( judge_rev( &
5558 & answer_shape(1) ) &
5561 allocate( answer_negative( &
5563 & answer_shape(1) ) &
5566 allocate( check_negative( &
5568 & answer_shape(1) ) &
5571 allocate( both_negative( &
5573 & answer_shape(1) ) &
5576 allocate( answer_max( &
5578 & answer_shape(1) ) &
5581 allocate( answer_min( &
5583 & answer_shape(1) ) &
5586 answer_negative = answer < 0.0
5587 check_negative = check < 0.0
5588 both_negative = answer_negative .and. check_negative
5590 where (both_negative)
5594 & - 0.1 ** significant_digits ) &
5595 & + 0.1 ** (- ignore_digits)
5600 & + 0.1 ** significant_digits ) &
5601 & - 0.1 ** (- ignore_digits)
5606 & + 0.1 ** significant_digits ) &
5607 & + 0.1 ** (- ignore_digits)
5612 & - 0.1 ** significant_digits ) &
5613 & - 0.1 ** (- ignore_digits)
5616 judge = answer_max > check .and. check > answer_min
5617 judge_rev = .not. judge
5618 err_flag = any(judge_rev)
5620 pos = maxloc(mask_array, judge_rev)
5628 right_max = answer_max( &
5632 right_min = answer_min( &
5636 if ( right_max < right_min )
then 5637 right_tmp = right_max
5638 right_max = right_min
5639 right_min = right_tmp
5642 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
5647 & trim(adjustl(pos_array(1))) //
')' 5650 deallocate(mask_array, judge, judge_rev)
5651 deallocate(answer_negative, check_negative, both_negative)
5652 deallocate(answer_max, answer_min)
5658 pos_str_len = len_trim(pos_str)
5660 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 5662 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
5663 write(*,*)
' is NOT EQUAL to' 5664 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
5665 & //
' ', right_min,
' < ' 5666 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
5670 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 5678 & message, answer, check, significant_digits, ignore_digits )
5681 character(*),
intent(in):: message
5682 real,
intent(in):: answer(:,:)
5683 real,
intent(in):: check(:,:)
5684 integer,
intent(in):: significant_digits
5685 integer,
intent(in):: ignore_digits
5687 character(STRING):: pos_str
5688 real:: wrong, right_max, right_min
5689 character(STRING):: pos_str_space
5690 integer:: pos_str_len
5693 integer:: answer_shape(2), check_shape(2), pos(2)
5694 logical:: consist_shape(2)
5695 character(TOKEN):: pos_array(2)
5696 integer,
allocatable:: mask_array(:,:)
5697 logical,
allocatable:: judge(:,:)
5698 logical,
allocatable:: judge_rev(:,:)
5699 logical,
allocatable:: answer_negative(:,:)
5700 logical,
allocatable:: check_negative(:,:)
5701 logical,
allocatable:: both_negative(:,:)
5702 real,
allocatable:: answer_max(:,:)
5703 real,
allocatable:: answer_min(:,:)
5708 if ( significant_digits < 1 )
then 5709 write(*,*)
' *** Error [AssertEQ] *** ' 5710 write(*,*)
' Specify a number more than 1 to "significant_digits"' 5714 answer_shape = shape(answer)
5715 check_shape = shape(check)
5717 consist_shape = answer_shape == check_shape
5719 if (.not. all(consist_shape))
then 5720 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 5722 write(*,*)
' shape of check is (', check_shape,
')' 5723 write(*,*)
' is INCORRECT' 5724 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 5730 allocate( mask_array( &
5731 & answer_shape(1), &
5733 & answer_shape(2) ) &
5737 & answer_shape(1), &
5739 & answer_shape(2) ) &
5742 allocate( judge_rev( &
5743 & answer_shape(1), &
5745 & answer_shape(2) ) &
5748 allocate( answer_negative( &
5749 & answer_shape(1), &
5751 & answer_shape(2) ) &
5754 allocate( check_negative( &
5755 & answer_shape(1), &
5757 & answer_shape(2) ) &
5760 allocate( both_negative( &
5761 & answer_shape(1), &
5763 & answer_shape(2) ) &
5766 allocate( answer_max( &
5767 & answer_shape(1), &
5769 & answer_shape(2) ) &
5772 allocate( answer_min( &
5773 & answer_shape(1), &
5775 & answer_shape(2) ) &
5778 answer_negative = answer < 0.0
5779 check_negative = check < 0.0
5780 both_negative = answer_negative .and. check_negative
5782 where (both_negative)
5786 & - 0.1 ** significant_digits ) &
5787 & + 0.1 ** (- ignore_digits)
5792 & + 0.1 ** significant_digits ) &
5793 & - 0.1 ** (- ignore_digits)
5798 & + 0.1 ** significant_digits ) &
5799 & + 0.1 ** (- ignore_digits)
5804 & - 0.1 ** significant_digits ) &
5805 & - 0.1 ** (- ignore_digits)
5808 judge = answer_max > check .and. check > answer_min
5809 judge_rev = .not. judge
5810 err_flag = any(judge_rev)
5812 pos = maxloc(mask_array, judge_rev)
5821 right_max = answer_max( &
5826 right_min = answer_min( &
5831 if ( right_max < right_min )
then 5832 right_tmp = right_max
5833 right_max = right_min
5834 right_min = right_tmp
5837 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
5839 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
5843 & trim(adjustl(pos_array(1))) //
',' // &
5845 & trim(adjustl(pos_array(2))) //
')' 5848 deallocate(mask_array, judge, judge_rev)
5849 deallocate(answer_negative, check_negative, both_negative)
5850 deallocate(answer_max, answer_min)
5856 pos_str_len = len_trim(pos_str)
5858 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 5860 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
5861 write(*,*)
' is NOT EQUAL to' 5862 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
5863 & //
' ', right_min,
' < ' 5864 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
5868 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 5876 & message, answer, check, significant_digits, ignore_digits )
5879 character(*),
intent(in):: message
5880 real,
intent(in):: answer(:,:,:)
5881 real,
intent(in):: check(:,:,:)
5882 integer,
intent(in):: significant_digits
5883 integer,
intent(in):: ignore_digits
5885 character(STRING):: pos_str
5886 real:: wrong, right_max, right_min
5887 character(STRING):: pos_str_space
5888 integer:: pos_str_len
5891 integer:: answer_shape(3), check_shape(3), pos(3)
5892 logical:: consist_shape(3)
5893 character(TOKEN):: pos_array(3)
5894 integer,
allocatable:: mask_array(:,:,:)
5895 logical,
allocatable:: judge(:,:,:)
5896 logical,
allocatable:: judge_rev(:,:,:)
5897 logical,
allocatable:: answer_negative(:,:,:)
5898 logical,
allocatable:: check_negative(:,:,:)
5899 logical,
allocatable:: both_negative(:,:,:)
5900 real,
allocatable:: answer_max(:,:,:)
5901 real,
allocatable:: answer_min(:,:,:)
5906 if ( significant_digits < 1 )
then 5907 write(*,*)
' *** Error [AssertEQ] *** ' 5908 write(*,*)
' Specify a number more than 1 to "significant_digits"' 5912 answer_shape = shape(answer)
5913 check_shape = shape(check)
5915 consist_shape = answer_shape == check_shape
5917 if (.not. all(consist_shape))
then 5918 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 5920 write(*,*)
' shape of check is (', check_shape,
')' 5921 write(*,*)
' is INCORRECT' 5922 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 5928 allocate( mask_array( &
5929 & answer_shape(1), &
5931 & answer_shape(2), &
5933 & answer_shape(3) ) &
5937 & answer_shape(1), &
5939 & answer_shape(2), &
5941 & answer_shape(3) ) &
5944 allocate( judge_rev( &
5945 & answer_shape(1), &
5947 & answer_shape(2), &
5949 & answer_shape(3) ) &
5952 allocate( answer_negative( &
5953 & answer_shape(1), &
5955 & answer_shape(2), &
5957 & answer_shape(3) ) &
5960 allocate( check_negative( &
5961 & answer_shape(1), &
5963 & answer_shape(2), &
5965 & answer_shape(3) ) &
5968 allocate( both_negative( &
5969 & answer_shape(1), &
5971 & answer_shape(2), &
5973 & answer_shape(3) ) &
5976 allocate( answer_max( &
5977 & answer_shape(1), &
5979 & answer_shape(2), &
5981 & answer_shape(3) ) &
5984 allocate( answer_min( &
5985 & answer_shape(1), &
5987 & answer_shape(2), &
5989 & answer_shape(3) ) &
5992 answer_negative = answer < 0.0
5993 check_negative = check < 0.0
5994 both_negative = answer_negative .and. check_negative
5996 where (both_negative)
6000 & - 0.1 ** significant_digits ) &
6001 & + 0.1 ** (- ignore_digits)
6006 & + 0.1 ** significant_digits ) &
6007 & - 0.1 ** (- ignore_digits)
6012 & + 0.1 ** significant_digits ) &
6013 & + 0.1 ** (- ignore_digits)
6018 & - 0.1 ** significant_digits ) &
6019 & - 0.1 ** (- ignore_digits)
6022 judge = answer_max > check .and. check > answer_min
6023 judge_rev = .not. judge
6024 err_flag = any(judge_rev)
6026 pos = maxloc(mask_array, judge_rev)
6037 right_max = answer_max( &
6044 right_min = answer_min( &
6051 if ( right_max < right_min )
then 6052 right_tmp = right_max
6053 right_max = right_min
6054 right_min = right_tmp
6057 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
6059 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
6061 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
6065 & trim(adjustl(pos_array(1))) //
',' // &
6067 & trim(adjustl(pos_array(2))) //
',' // &
6069 & trim(adjustl(pos_array(3))) //
')' 6072 deallocate(mask_array, judge, judge_rev)
6073 deallocate(answer_negative, check_negative, both_negative)
6074 deallocate(answer_max, answer_min)
6080 pos_str_len = len_trim(pos_str)
6082 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 6084 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
6085 write(*,*)
' is NOT EQUAL to' 6086 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
6087 & //
' ', right_min,
' < ' 6088 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
6092 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 6100 & message, answer, check, significant_digits, ignore_digits )
6103 character(*),
intent(in):: message
6104 real,
intent(in):: answer(:,:,:,:)
6105 real,
intent(in):: check(:,:,:,:)
6106 integer,
intent(in):: significant_digits
6107 integer,
intent(in):: ignore_digits
6109 character(STRING):: pos_str
6110 real:: wrong, right_max, right_min
6111 character(STRING):: pos_str_space
6112 integer:: pos_str_len
6115 integer:: answer_shape(4), check_shape(4), pos(4)
6116 logical:: consist_shape(4)
6117 character(TOKEN):: pos_array(4)
6118 integer,
allocatable:: mask_array(:,:,:,:)
6119 logical,
allocatable:: judge(:,:,:,:)
6120 logical,
allocatable:: judge_rev(:,:,:,:)
6121 logical,
allocatable:: answer_negative(:,:,:,:)
6122 logical,
allocatable:: check_negative(:,:,:,:)
6123 logical,
allocatable:: both_negative(:,:,:,:)
6124 real,
allocatable:: answer_max(:,:,:,:)
6125 real,
allocatable:: answer_min(:,:,:,:)
6130 if ( significant_digits < 1 )
then 6131 write(*,*)
' *** Error [AssertEQ] *** ' 6132 write(*,*)
' Specify a number more than 1 to "significant_digits"' 6136 answer_shape = shape(answer)
6137 check_shape = shape(check)
6139 consist_shape = answer_shape == check_shape
6141 if (.not. all(consist_shape))
then 6142 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 6144 write(*,*)
' shape of check is (', check_shape,
')' 6145 write(*,*)
' is INCORRECT' 6146 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 6152 allocate( mask_array( &
6153 & answer_shape(1), &
6155 & answer_shape(2), &
6157 & answer_shape(3), &
6159 & answer_shape(4) ) &
6163 & answer_shape(1), &
6165 & answer_shape(2), &
6167 & answer_shape(3), &
6169 & answer_shape(4) ) &
6172 allocate( judge_rev( &
6173 & answer_shape(1), &
6175 & answer_shape(2), &
6177 & answer_shape(3), &
6179 & answer_shape(4) ) &
6182 allocate( answer_negative( &
6183 & answer_shape(1), &
6185 & answer_shape(2), &
6187 & answer_shape(3), &
6189 & answer_shape(4) ) &
6192 allocate( check_negative( &
6193 & answer_shape(1), &
6195 & answer_shape(2), &
6197 & answer_shape(3), &
6199 & answer_shape(4) ) &
6202 allocate( both_negative( &
6203 & answer_shape(1), &
6205 & answer_shape(2), &
6207 & answer_shape(3), &
6209 & answer_shape(4) ) &
6212 allocate( answer_max( &
6213 & answer_shape(1), &
6215 & answer_shape(2), &
6217 & answer_shape(3), &
6219 & answer_shape(4) ) &
6222 allocate( answer_min( &
6223 & answer_shape(1), &
6225 & answer_shape(2), &
6227 & answer_shape(3), &
6229 & answer_shape(4) ) &
6232 answer_negative = answer < 0.0
6233 check_negative = check < 0.0
6234 both_negative = answer_negative .and. check_negative
6236 where (both_negative)
6240 & - 0.1 ** significant_digits ) &
6241 & + 0.1 ** (- ignore_digits)
6246 & + 0.1 ** significant_digits ) &
6247 & - 0.1 ** (- ignore_digits)
6252 & + 0.1 ** significant_digits ) &
6253 & + 0.1 ** (- ignore_digits)
6258 & - 0.1 ** significant_digits ) &
6259 & - 0.1 ** (- ignore_digits)
6262 judge = answer_max > check .and. check > answer_min
6263 judge_rev = .not. judge
6264 err_flag = any(judge_rev)
6266 pos = maxloc(mask_array, judge_rev)
6279 right_max = answer_max( &
6288 right_min = answer_min( &
6297 if ( right_max < right_min )
then 6298 right_tmp = right_max
6299 right_max = right_min
6300 right_min = right_tmp
6303 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
6305 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
6307 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
6309 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
6313 & trim(adjustl(pos_array(1))) //
',' // &
6315 & trim(adjustl(pos_array(2))) //
',' // &
6317 & trim(adjustl(pos_array(3))) //
',' // &
6319 & trim(adjustl(pos_array(4))) //
')' 6322 deallocate(mask_array, judge, judge_rev)
6323 deallocate(answer_negative, check_negative, both_negative)
6324 deallocate(answer_max, answer_min)
6330 pos_str_len = len_trim(pos_str)
6332 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 6334 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
6335 write(*,*)
' is NOT EQUAL to' 6336 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
6337 & //
' ', right_min,
' < ' 6338 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
6342 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 6350 & message, answer, check, significant_digits, ignore_digits )
6353 character(*),
intent(in):: message
6354 real,
intent(in):: answer(:,:,:,:,:)
6355 real,
intent(in):: check(:,:,:,:,:)
6356 integer,
intent(in):: significant_digits
6357 integer,
intent(in):: ignore_digits
6359 character(STRING):: pos_str
6360 real:: wrong, right_max, right_min
6361 character(STRING):: pos_str_space
6362 integer:: pos_str_len
6365 integer:: answer_shape(5), check_shape(5), pos(5)
6366 logical:: consist_shape(5)
6367 character(TOKEN):: pos_array(5)
6368 integer,
allocatable:: mask_array(:,:,:,:,:)
6369 logical,
allocatable:: judge(:,:,:,:,:)
6370 logical,
allocatable:: judge_rev(:,:,:,:,:)
6371 logical,
allocatable:: answer_negative(:,:,:,:,:)
6372 logical,
allocatable:: check_negative(:,:,:,:,:)
6373 logical,
allocatable:: both_negative(:,:,:,:,:)
6374 real,
allocatable:: answer_max(:,:,:,:,:)
6375 real,
allocatable:: answer_min(:,:,:,:,:)
6380 if ( significant_digits < 1 )
then 6381 write(*,*)
' *** Error [AssertEQ] *** ' 6382 write(*,*)
' Specify a number more than 1 to "significant_digits"' 6386 answer_shape = shape(answer)
6387 check_shape = shape(check)
6389 consist_shape = answer_shape == check_shape
6391 if (.not. all(consist_shape))
then 6392 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 6394 write(*,*)
' shape of check is (', check_shape,
')' 6395 write(*,*)
' is INCORRECT' 6396 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 6402 allocate( mask_array( &
6403 & answer_shape(1), &
6405 & answer_shape(2), &
6407 & answer_shape(3), &
6409 & answer_shape(4), &
6411 & answer_shape(5) ) &
6415 & answer_shape(1), &
6417 & answer_shape(2), &
6419 & answer_shape(3), &
6421 & answer_shape(4), &
6423 & answer_shape(5) ) &
6426 allocate( judge_rev( &
6427 & answer_shape(1), &
6429 & answer_shape(2), &
6431 & answer_shape(3), &
6433 & answer_shape(4), &
6435 & answer_shape(5) ) &
6438 allocate( answer_negative( &
6439 & answer_shape(1), &
6441 & answer_shape(2), &
6443 & answer_shape(3), &
6445 & answer_shape(4), &
6447 & answer_shape(5) ) &
6450 allocate( check_negative( &
6451 & answer_shape(1), &
6453 & answer_shape(2), &
6455 & answer_shape(3), &
6457 & answer_shape(4), &
6459 & answer_shape(5) ) &
6462 allocate( both_negative( &
6463 & answer_shape(1), &
6465 & answer_shape(2), &
6467 & answer_shape(3), &
6469 & answer_shape(4), &
6471 & answer_shape(5) ) &
6474 allocate( answer_max( &
6475 & answer_shape(1), &
6477 & answer_shape(2), &
6479 & answer_shape(3), &
6481 & answer_shape(4), &
6483 & answer_shape(5) ) &
6486 allocate( answer_min( &
6487 & answer_shape(1), &
6489 & answer_shape(2), &
6491 & answer_shape(3), &
6493 & answer_shape(4), &
6495 & answer_shape(5) ) &
6498 answer_negative = answer < 0.0
6499 check_negative = check < 0.0
6500 both_negative = answer_negative .and. check_negative
6502 where (both_negative)
6506 & - 0.1 ** significant_digits ) &
6507 & + 0.1 ** (- ignore_digits)
6512 & + 0.1 ** significant_digits ) &
6513 & - 0.1 ** (- ignore_digits)
6518 & + 0.1 ** significant_digits ) &
6519 & + 0.1 ** (- ignore_digits)
6524 & - 0.1 ** significant_digits ) &
6525 & - 0.1 ** (- ignore_digits)
6528 judge = answer_max > check .and. check > answer_min
6529 judge_rev = .not. judge
6530 err_flag = any(judge_rev)
6532 pos = maxloc(mask_array, judge_rev)
6547 right_max = answer_max( &
6558 right_min = answer_min( &
6569 if ( right_max < right_min )
then 6570 right_tmp = right_max
6571 right_max = right_min
6572 right_min = right_tmp
6575 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
6577 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
6579 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
6581 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
6583 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
6587 & trim(adjustl(pos_array(1))) //
',' // &
6589 & trim(adjustl(pos_array(2))) //
',' // &
6591 & trim(adjustl(pos_array(3))) //
',' // &
6593 & trim(adjustl(pos_array(4))) //
',' // &
6595 & trim(adjustl(pos_array(5))) //
')' 6598 deallocate(mask_array, judge, judge_rev)
6599 deallocate(answer_negative, check_negative, both_negative)
6600 deallocate(answer_max, answer_min)
6606 pos_str_len = len_trim(pos_str)
6608 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 6610 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
6611 write(*,*)
' is NOT EQUAL to' 6612 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
6613 & //
' ', right_min,
' < ' 6614 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
6618 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 6626 & message, answer, check, significant_digits, ignore_digits )
6629 character(*),
intent(in):: message
6630 real,
intent(in):: answer(:,:,:,:,:,:)
6631 real,
intent(in):: check(:,:,:,:,:,:)
6632 integer,
intent(in):: significant_digits
6633 integer,
intent(in):: ignore_digits
6635 character(STRING):: pos_str
6636 real:: wrong, right_max, right_min
6637 character(STRING):: pos_str_space
6638 integer:: pos_str_len
6641 integer:: answer_shape(6), check_shape(6), pos(6)
6642 logical:: consist_shape(6)
6643 character(TOKEN):: pos_array(6)
6644 integer,
allocatable:: mask_array(:,:,:,:,:,:)
6645 logical,
allocatable:: judge(:,:,:,:,:,:)
6646 logical,
allocatable:: judge_rev(:,:,:,:,:,:)
6647 logical,
allocatable:: answer_negative(:,:,:,:,:,:)
6648 logical,
allocatable:: check_negative(:,:,:,:,:,:)
6649 logical,
allocatable:: both_negative(:,:,:,:,:,:)
6650 real,
allocatable:: answer_max(:,:,:,:,:,:)
6651 real,
allocatable:: answer_min(:,:,:,:,:,:)
6656 if ( significant_digits < 1 )
then 6657 write(*,*)
' *** Error [AssertEQ] *** ' 6658 write(*,*)
' Specify a number more than 1 to "significant_digits"' 6662 answer_shape = shape(answer)
6663 check_shape = shape(check)
6665 consist_shape = answer_shape == check_shape
6667 if (.not. all(consist_shape))
then 6668 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 6670 write(*,*)
' shape of check is (', check_shape,
')' 6671 write(*,*)
' is INCORRECT' 6672 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 6678 allocate( mask_array( &
6679 & answer_shape(1), &
6681 & answer_shape(2), &
6683 & answer_shape(3), &
6685 & answer_shape(4), &
6687 & answer_shape(5), &
6689 & answer_shape(6) ) &
6693 & answer_shape(1), &
6695 & answer_shape(2), &
6697 & answer_shape(3), &
6699 & answer_shape(4), &
6701 & answer_shape(5), &
6703 & answer_shape(6) ) &
6706 allocate( judge_rev( &
6707 & answer_shape(1), &
6709 & answer_shape(2), &
6711 & answer_shape(3), &
6713 & answer_shape(4), &
6715 & answer_shape(5), &
6717 & answer_shape(6) ) &
6720 allocate( answer_negative( &
6721 & answer_shape(1), &
6723 & answer_shape(2), &
6725 & answer_shape(3), &
6727 & answer_shape(4), &
6729 & answer_shape(5), &
6731 & answer_shape(6) ) &
6734 allocate( check_negative( &
6735 & answer_shape(1), &
6737 & answer_shape(2), &
6739 & answer_shape(3), &
6741 & answer_shape(4), &
6743 & answer_shape(5), &
6745 & answer_shape(6) ) &
6748 allocate( both_negative( &
6749 & answer_shape(1), &
6751 & answer_shape(2), &
6753 & answer_shape(3), &
6755 & answer_shape(4), &
6757 & answer_shape(5), &
6759 & answer_shape(6) ) &
6762 allocate( answer_max( &
6763 & answer_shape(1), &
6765 & answer_shape(2), &
6767 & answer_shape(3), &
6769 & answer_shape(4), &
6771 & answer_shape(5), &
6773 & answer_shape(6) ) &
6776 allocate( answer_min( &
6777 & answer_shape(1), &
6779 & answer_shape(2), &
6781 & answer_shape(3), &
6783 & answer_shape(4), &
6785 & answer_shape(5), &
6787 & answer_shape(6) ) &
6790 answer_negative = answer < 0.0
6791 check_negative = check < 0.0
6792 both_negative = answer_negative .and. check_negative
6794 where (both_negative)
6798 & - 0.1 ** significant_digits ) &
6799 & + 0.1 ** (- ignore_digits)
6804 & + 0.1 ** significant_digits ) &
6805 & - 0.1 ** (- ignore_digits)
6810 & + 0.1 ** significant_digits ) &
6811 & + 0.1 ** (- ignore_digits)
6816 & - 0.1 ** significant_digits ) &
6817 & - 0.1 ** (- ignore_digits)
6820 judge = answer_max > check .and. check > answer_min
6821 judge_rev = .not. judge
6822 err_flag = any(judge_rev)
6824 pos = maxloc(mask_array, judge_rev)
6841 right_max = answer_max( &
6854 right_min = answer_min( &
6867 if ( right_max < right_min )
then 6868 right_tmp = right_max
6869 right_max = right_min
6870 right_min = right_tmp
6873 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
6875 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
6877 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
6879 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
6881 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
6883 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
6887 & trim(adjustl(pos_array(1))) //
',' // &
6889 & trim(adjustl(pos_array(2))) //
',' // &
6891 & trim(adjustl(pos_array(3))) //
',' // &
6893 & trim(adjustl(pos_array(4))) //
',' // &
6895 & trim(adjustl(pos_array(5))) //
',' // &
6897 & trim(adjustl(pos_array(6))) //
')' 6900 deallocate(mask_array, judge, judge_rev)
6901 deallocate(answer_negative, check_negative, both_negative)
6902 deallocate(answer_max, answer_min)
6908 pos_str_len = len_trim(pos_str)
6910 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 6912 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
6913 write(*,*)
' is NOT EQUAL to' 6914 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
6915 & //
' ', right_min,
' < ' 6916 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
6920 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 6928 & message, answer, check, significant_digits, ignore_digits )
6931 character(*),
intent(in):: message
6932 real,
intent(in):: answer(:,:,:,:,:,:,:)
6933 real,
intent(in):: check(:,:,:,:,:,:,:)
6934 integer,
intent(in):: significant_digits
6935 integer,
intent(in):: ignore_digits
6937 character(STRING):: pos_str
6938 real:: wrong, right_max, right_min
6939 character(STRING):: pos_str_space
6940 integer:: pos_str_len
6943 integer:: answer_shape(7), check_shape(7), pos(7)
6944 logical:: consist_shape(7)
6945 character(TOKEN):: pos_array(7)
6946 integer,
allocatable:: mask_array(:,:,:,:,:,:,:)
6947 logical,
allocatable:: judge(:,:,:,:,:,:,:)
6948 logical,
allocatable:: judge_rev(:,:,:,:,:,:,:)
6949 logical,
allocatable:: answer_negative(:,:,:,:,:,:,:)
6950 logical,
allocatable:: check_negative(:,:,:,:,:,:,:)
6951 logical,
allocatable:: both_negative(:,:,:,:,:,:,:)
6952 real,
allocatable:: answer_max(:,:,:,:,:,:,:)
6953 real,
allocatable:: answer_min(:,:,:,:,:,:,:)
6958 if ( significant_digits < 1 )
then 6959 write(*,*)
' *** Error [AssertEQ] *** ' 6960 write(*,*)
' Specify a number more than 1 to "significant_digits"' 6964 answer_shape = shape(answer)
6965 check_shape = shape(check)
6967 consist_shape = answer_shape == check_shape
6969 if (.not. all(consist_shape))
then 6970 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 6972 write(*,*)
' shape of check is (', check_shape,
')' 6973 write(*,*)
' is INCORRECT' 6974 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 6980 allocate( mask_array( &
6981 & answer_shape(1), &
6983 & answer_shape(2), &
6985 & answer_shape(3), &
6987 & answer_shape(4), &
6989 & answer_shape(5), &
6991 & answer_shape(6), &
6993 & answer_shape(7) ) &
6997 & answer_shape(1), &
6999 & answer_shape(2), &
7001 & answer_shape(3), &
7003 & answer_shape(4), &
7005 & answer_shape(5), &
7007 & answer_shape(6), &
7009 & answer_shape(7) ) &
7012 allocate( judge_rev( &
7013 & answer_shape(1), &
7015 & answer_shape(2), &
7017 & answer_shape(3), &
7019 & answer_shape(4), &
7021 & answer_shape(5), &
7023 & answer_shape(6), &
7025 & answer_shape(7) ) &
7028 allocate( answer_negative( &
7029 & answer_shape(1), &
7031 & answer_shape(2), &
7033 & answer_shape(3), &
7035 & answer_shape(4), &
7037 & answer_shape(5), &
7039 & answer_shape(6), &
7041 & answer_shape(7) ) &
7044 allocate( check_negative( &
7045 & answer_shape(1), &
7047 & answer_shape(2), &
7049 & answer_shape(3), &
7051 & answer_shape(4), &
7053 & answer_shape(5), &
7055 & answer_shape(6), &
7057 & answer_shape(7) ) &
7060 allocate( both_negative( &
7061 & answer_shape(1), &
7063 & answer_shape(2), &
7065 & answer_shape(3), &
7067 & answer_shape(4), &
7069 & answer_shape(5), &
7071 & answer_shape(6), &
7073 & answer_shape(7) ) &
7076 allocate( answer_max( &
7077 & answer_shape(1), &
7079 & answer_shape(2), &
7081 & answer_shape(3), &
7083 & answer_shape(4), &
7085 & answer_shape(5), &
7087 & answer_shape(6), &
7089 & answer_shape(7) ) &
7092 allocate( answer_min( &
7093 & answer_shape(1), &
7095 & answer_shape(2), &
7097 & answer_shape(3), &
7099 & answer_shape(4), &
7101 & answer_shape(5), &
7103 & answer_shape(6), &
7105 & answer_shape(7) ) &
7108 answer_negative = answer < 0.0
7109 check_negative = check < 0.0
7110 both_negative = answer_negative .and. check_negative
7112 where (both_negative)
7116 & - 0.1 ** significant_digits ) &
7117 & + 0.1 ** (- ignore_digits)
7122 & + 0.1 ** significant_digits ) &
7123 & - 0.1 ** (- ignore_digits)
7128 & + 0.1 ** significant_digits ) &
7129 & + 0.1 ** (- ignore_digits)
7134 & - 0.1 ** significant_digits ) &
7135 & - 0.1 ** (- ignore_digits)
7138 judge = answer_max > check .and. check > answer_min
7139 judge_rev = .not. judge
7140 err_flag = any(judge_rev)
7142 pos = maxloc(mask_array, judge_rev)
7161 right_max = answer_max( &
7176 right_min = answer_min( &
7191 if ( right_max < right_min )
then 7192 right_tmp = right_max
7193 right_max = right_min
7194 right_min = right_tmp
7197 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
7199 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
7201 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
7203 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
7205 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
7207 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
7209 write(unit=pos_array(7), fmt=
"(i20)") pos(7)
7213 & trim(adjustl(pos_array(1))) //
',' // &
7215 & trim(adjustl(pos_array(2))) //
',' // &
7217 & trim(adjustl(pos_array(3))) //
',' // &
7219 & trim(adjustl(pos_array(4))) //
',' // &
7221 & trim(adjustl(pos_array(5))) //
',' // &
7223 & trim(adjustl(pos_array(6))) //
',' // &
7225 & trim(adjustl(pos_array(7))) //
')' 7228 deallocate(mask_array, judge, judge_rev)
7229 deallocate(answer_negative, check_negative, both_negative)
7230 deallocate(answer_max, answer_min)
7236 pos_str_len = len_trim(pos_str)
7238 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 7240 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
7241 write(*,*)
' is NOT EQUAL to' 7242 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
7243 & //
' ', right_min,
' < ' 7244 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
7248 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 7256 & message, answer, check, significant_digits, ignore_digits )
7259 character(*),
intent(in):: message
7260 real(DP),
intent(in):: answer
7261 real(DP),
intent(in):: check
7262 integer,
intent(in):: significant_digits
7263 integer,
intent(in):: ignore_digits
7265 character(STRING):: pos_str
7266 real(DP):: wrong, right_max, right_min
7267 character(STRING):: pos_str_space
7268 integer:: pos_str_len
7269 real(DP):: right_tmp
7271 real(DP):: answer_max
7272 real(DP):: answer_min
7277 if ( significant_digits < 1 )
then 7278 write(*,*)
' *** Error [AssertEQ] *** ' 7279 write(*,*)
' Specify a number more than 1 to "significant_digits"' 7283 if ( answer < 0.0_dp .and. check < 0.0_dp )
then 7287 & - 0.1_dp ** significant_digits ) &
7288 & + 0.1_dp ** (- ignore_digits)
7293 & + 0.1_dp ** significant_digits ) &
7294 & - 0.1_dp ** (- ignore_digits)
7300 & + 0.1_dp ** significant_digits ) &
7301 & + 0.1_dp ** (- ignore_digits)
7306 & - 0.1_dp ** significant_digits ) &
7307 & - 0.1_dp ** (- ignore_digits)
7311 right_max = answer_max
7312 right_min = answer_min
7313 if ( right_max < right_min )
then 7314 right_tmp = right_max
7315 right_max = right_min
7316 right_min = right_tmp
7319 err_flag = .not. (answer_max > check .and. check > answer_min)
7327 pos_str_len = len_trim(pos_str)
7329 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 7331 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
7332 write(*,*)
' is NOT EQUAL to' 7333 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
7334 & //
' ', right_min,
' < ' 7335 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
7339 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 7347 & message, answer, check, significant_digits, ignore_digits )
7350 character(*),
intent(in):: message
7351 real(DP),
intent(in):: answer(:)
7352 real(DP),
intent(in):: check(:)
7353 integer,
intent(in):: significant_digits
7354 integer,
intent(in):: ignore_digits
7356 character(STRING):: pos_str
7357 real(DP):: wrong, right_max, right_min
7358 character(STRING):: pos_str_space
7359 integer:: pos_str_len
7360 real(DP):: right_tmp
7362 integer:: answer_shape(1), check_shape(1), pos(1)
7363 logical:: consist_shape(1)
7364 character(TOKEN):: pos_array(1)
7365 integer,
allocatable:: mask_array(:)
7366 logical,
allocatable:: judge(:)
7367 logical,
allocatable:: judge_rev(:)
7368 logical,
allocatable:: answer_negative(:)
7369 logical,
allocatable:: check_negative(:)
7370 logical,
allocatable:: both_negative(:)
7371 real(DP),
allocatable:: answer_max(:)
7372 real(DP),
allocatable:: answer_min(:)
7377 if ( significant_digits < 1 )
then 7378 write(*,*)
' *** Error [AssertEQ] *** ' 7379 write(*,*)
' Specify a number more than 1 to "significant_digits"' 7383 answer_shape = shape(answer)
7384 check_shape = shape(check)
7386 consist_shape = answer_shape == check_shape
7388 if (.not. all(consist_shape))
then 7389 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 7391 write(*,*)
' shape of check is (', check_shape,
')' 7392 write(*,*)
' is INCORRECT' 7393 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 7399 allocate( mask_array( &
7401 & answer_shape(1) ) &
7406 & answer_shape(1) ) &
7409 allocate( judge_rev( &
7411 & answer_shape(1) ) &
7414 allocate( answer_negative( &
7416 & answer_shape(1) ) &
7419 allocate( check_negative( &
7421 & answer_shape(1) ) &
7424 allocate( both_negative( &
7426 & answer_shape(1) ) &
7429 allocate( answer_max( &
7431 & answer_shape(1) ) &
7434 allocate( answer_min( &
7436 & answer_shape(1) ) &
7439 answer_negative = answer < 0.0_dp
7440 check_negative = check < 0.0_dp
7441 both_negative = answer_negative .and. check_negative
7443 where (both_negative)
7447 & - 0.1_dp ** significant_digits ) &
7448 & + 0.1_dp ** (- ignore_digits)
7453 & + 0.1_dp ** significant_digits ) &
7454 & - 0.1_dp ** (- ignore_digits)
7459 & + 0.1_dp ** significant_digits ) &
7460 & + 0.1_dp ** (- ignore_digits)
7465 & - 0.1_dp ** significant_digits ) &
7466 & - 0.1_dp ** (- ignore_digits)
7469 judge = answer_max > check .and. check > answer_min
7470 judge_rev = .not. judge
7471 err_flag = any(judge_rev)
7473 pos = maxloc(mask_array, judge_rev)
7481 right_max = answer_max( &
7485 right_min = answer_min( &
7489 if ( right_max < right_min )
then 7490 right_tmp = right_max
7491 right_max = right_min
7492 right_min = right_tmp
7495 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
7500 & trim(adjustl(pos_array(1))) //
')' 7503 deallocate(mask_array, judge, judge_rev)
7504 deallocate(answer_negative, check_negative, both_negative)
7505 deallocate(answer_max, answer_min)
7511 pos_str_len = len_trim(pos_str)
7513 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 7515 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
7516 write(*,*)
' is NOT EQUAL to' 7517 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
7518 & //
' ', right_min,
' < ' 7519 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
7523 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 7531 & message, answer, check, significant_digits, ignore_digits )
7534 character(*),
intent(in):: message
7535 real(DP),
intent(in):: answer(:,:)
7536 real(DP),
intent(in):: check(:,:)
7537 integer,
intent(in):: significant_digits
7538 integer,
intent(in):: ignore_digits
7540 character(STRING):: pos_str
7541 real(DP):: wrong, right_max, right_min
7542 character(STRING):: pos_str_space
7543 integer:: pos_str_len
7544 real(DP):: right_tmp
7546 integer:: answer_shape(2), check_shape(2), pos(2)
7547 logical:: consist_shape(2)
7548 character(TOKEN):: pos_array(2)
7549 integer,
allocatable:: mask_array(:,:)
7550 logical,
allocatable:: judge(:,:)
7551 logical,
allocatable:: judge_rev(:,:)
7552 logical,
allocatable:: answer_negative(:,:)
7553 logical,
allocatable:: check_negative(:,:)
7554 logical,
allocatable:: both_negative(:,:)
7555 real(DP),
allocatable:: answer_max(:,:)
7556 real(DP),
allocatable:: answer_min(:,:)
7561 if ( significant_digits < 1 )
then 7562 write(*,*)
' *** Error [AssertEQ] *** ' 7563 write(*,*)
' Specify a number more than 1 to "significant_digits"' 7567 answer_shape = shape(answer)
7568 check_shape = shape(check)
7570 consist_shape = answer_shape == check_shape
7572 if (.not. all(consist_shape))
then 7573 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 7575 write(*,*)
' shape of check is (', check_shape,
')' 7576 write(*,*)
' is INCORRECT' 7577 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 7583 allocate( mask_array( &
7584 & answer_shape(1), &
7586 & answer_shape(2) ) &
7590 & answer_shape(1), &
7592 & answer_shape(2) ) &
7595 allocate( judge_rev( &
7596 & answer_shape(1), &
7598 & answer_shape(2) ) &
7601 allocate( answer_negative( &
7602 & answer_shape(1), &
7604 & answer_shape(2) ) &
7607 allocate( check_negative( &
7608 & answer_shape(1), &
7610 & answer_shape(2) ) &
7613 allocate( both_negative( &
7614 & answer_shape(1), &
7616 & answer_shape(2) ) &
7619 allocate( answer_max( &
7620 & answer_shape(1), &
7622 & answer_shape(2) ) &
7625 allocate( answer_min( &
7626 & answer_shape(1), &
7628 & answer_shape(2) ) &
7631 answer_negative = answer < 0.0_dp
7632 check_negative = check < 0.0_dp
7633 both_negative = answer_negative .and. check_negative
7635 where (both_negative)
7639 & - 0.1_dp ** significant_digits ) &
7640 & + 0.1_dp ** (- ignore_digits)
7645 & + 0.1_dp ** significant_digits ) &
7646 & - 0.1_dp ** (- ignore_digits)
7651 & + 0.1_dp ** significant_digits ) &
7652 & + 0.1_dp ** (- ignore_digits)
7657 & - 0.1_dp ** significant_digits ) &
7658 & - 0.1_dp ** (- ignore_digits)
7661 judge = answer_max > check .and. check > answer_min
7662 judge_rev = .not. judge
7663 err_flag = any(judge_rev)
7665 pos = maxloc(mask_array, judge_rev)
7674 right_max = answer_max( &
7679 right_min = answer_min( &
7684 if ( right_max < right_min )
then 7685 right_tmp = right_max
7686 right_max = right_min
7687 right_min = right_tmp
7690 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
7692 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
7696 & trim(adjustl(pos_array(1))) //
',' // &
7698 & trim(adjustl(pos_array(2))) //
')' 7701 deallocate(mask_array, judge, judge_rev)
7702 deallocate(answer_negative, check_negative, both_negative)
7703 deallocate(answer_max, answer_min)
7709 pos_str_len = len_trim(pos_str)
7711 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 7713 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
7714 write(*,*)
' is NOT EQUAL to' 7715 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
7716 & //
' ', right_min,
' < ' 7717 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
7721 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 7729 & message, answer, check, significant_digits, ignore_digits )
7732 character(*),
intent(in):: message
7733 real(DP),
intent(in):: answer(:,:,:)
7734 real(DP),
intent(in):: check(:,:,:)
7735 integer,
intent(in):: significant_digits
7736 integer,
intent(in):: ignore_digits
7738 character(STRING):: pos_str
7739 real(DP):: wrong, right_max, right_min
7740 character(STRING):: pos_str_space
7741 integer:: pos_str_len
7742 real(DP):: right_tmp
7744 integer:: answer_shape(3), check_shape(3), pos(3)
7745 logical:: consist_shape(3)
7746 character(TOKEN):: pos_array(3)
7747 integer,
allocatable:: mask_array(:,:,:)
7748 logical,
allocatable:: judge(:,:,:)
7749 logical,
allocatable:: judge_rev(:,:,:)
7750 logical,
allocatable:: answer_negative(:,:,:)
7751 logical,
allocatable:: check_negative(:,:,:)
7752 logical,
allocatable:: both_negative(:,:,:)
7753 real(DP),
allocatable:: answer_max(:,:,:)
7754 real(DP),
allocatable:: answer_min(:,:,:)
7759 if ( significant_digits < 1 )
then 7760 write(*,*)
' *** Error [AssertEQ] *** ' 7761 write(*,*)
' Specify a number more than 1 to "significant_digits"' 7765 answer_shape = shape(answer)
7766 check_shape = shape(check)
7768 consist_shape = answer_shape == check_shape
7770 if (.not. all(consist_shape))
then 7771 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 7773 write(*,*)
' shape of check is (', check_shape,
')' 7774 write(*,*)
' is INCORRECT' 7775 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 7781 allocate( mask_array( &
7782 & answer_shape(1), &
7784 & answer_shape(2), &
7786 & answer_shape(3) ) &
7790 & answer_shape(1), &
7792 & answer_shape(2), &
7794 & answer_shape(3) ) &
7797 allocate( judge_rev( &
7798 & answer_shape(1), &
7800 & answer_shape(2), &
7802 & answer_shape(3) ) &
7805 allocate( answer_negative( &
7806 & answer_shape(1), &
7808 & answer_shape(2), &
7810 & answer_shape(3) ) &
7813 allocate( check_negative( &
7814 & answer_shape(1), &
7816 & answer_shape(2), &
7818 & answer_shape(3) ) &
7821 allocate( both_negative( &
7822 & answer_shape(1), &
7824 & answer_shape(2), &
7826 & answer_shape(3) ) &
7829 allocate( answer_max( &
7830 & answer_shape(1), &
7832 & answer_shape(2), &
7834 & answer_shape(3) ) &
7837 allocate( answer_min( &
7838 & answer_shape(1), &
7840 & answer_shape(2), &
7842 & answer_shape(3) ) &
7845 answer_negative = answer < 0.0_dp
7846 check_negative = check < 0.0_dp
7847 both_negative = answer_negative .and. check_negative
7849 where (both_negative)
7853 & - 0.1_dp ** significant_digits ) &
7854 & + 0.1_dp ** (- ignore_digits)
7859 & + 0.1_dp ** significant_digits ) &
7860 & - 0.1_dp ** (- ignore_digits)
7865 & + 0.1_dp ** significant_digits ) &
7866 & + 0.1_dp ** (- ignore_digits)
7871 & - 0.1_dp ** significant_digits ) &
7872 & - 0.1_dp ** (- ignore_digits)
7875 judge = answer_max > check .and. check > answer_min
7876 judge_rev = .not. judge
7877 err_flag = any(judge_rev)
7879 pos = maxloc(mask_array, judge_rev)
7890 right_max = answer_max( &
7897 right_min = answer_min( &
7904 if ( right_max < right_min )
then 7905 right_tmp = right_max
7906 right_max = right_min
7907 right_min = right_tmp
7910 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
7912 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
7914 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
7918 & trim(adjustl(pos_array(1))) //
',' // &
7920 & trim(adjustl(pos_array(2))) //
',' // &
7922 & trim(adjustl(pos_array(3))) //
')' 7925 deallocate(mask_array, judge, judge_rev)
7926 deallocate(answer_negative, check_negative, both_negative)
7927 deallocate(answer_max, answer_min)
7933 pos_str_len = len_trim(pos_str)
7935 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 7937 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
7938 write(*,*)
' is NOT EQUAL to' 7939 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
7940 & //
' ', right_min,
' < ' 7941 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
7945 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 7953 & message, answer, check, significant_digits, ignore_digits )
7956 character(*),
intent(in):: message
7957 real(DP),
intent(in):: answer(:,:,:,:)
7958 real(DP),
intent(in):: check(:,:,:,:)
7959 integer,
intent(in):: significant_digits
7960 integer,
intent(in):: ignore_digits
7962 character(STRING):: pos_str
7963 real(DP):: wrong, right_max, right_min
7964 character(STRING):: pos_str_space
7965 integer:: pos_str_len
7966 real(DP):: right_tmp
7968 integer:: answer_shape(4), check_shape(4), pos(4)
7969 logical:: consist_shape(4)
7970 character(TOKEN):: pos_array(4)
7971 integer,
allocatable:: mask_array(:,:,:,:)
7972 logical,
allocatable:: judge(:,:,:,:)
7973 logical,
allocatable:: judge_rev(:,:,:,:)
7974 logical,
allocatable:: answer_negative(:,:,:,:)
7975 logical,
allocatable:: check_negative(:,:,:,:)
7976 logical,
allocatable:: both_negative(:,:,:,:)
7977 real(DP),
allocatable:: answer_max(:,:,:,:)
7978 real(DP),
allocatable:: answer_min(:,:,:,:)
7983 if ( significant_digits < 1 )
then 7984 write(*,*)
' *** Error [AssertEQ] *** ' 7985 write(*,*)
' Specify a number more than 1 to "significant_digits"' 7989 answer_shape = shape(answer)
7990 check_shape = shape(check)
7992 consist_shape = answer_shape == check_shape
7994 if (.not. all(consist_shape))
then 7995 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 7997 write(*,*)
' shape of check is (', check_shape,
')' 7998 write(*,*)
' is INCORRECT' 7999 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 8005 allocate( mask_array( &
8006 & answer_shape(1), &
8008 & answer_shape(2), &
8010 & answer_shape(3), &
8012 & answer_shape(4) ) &
8016 & answer_shape(1), &
8018 & answer_shape(2), &
8020 & answer_shape(3), &
8022 & answer_shape(4) ) &
8025 allocate( judge_rev( &
8026 & answer_shape(1), &
8028 & answer_shape(2), &
8030 & answer_shape(3), &
8032 & answer_shape(4) ) &
8035 allocate( answer_negative( &
8036 & answer_shape(1), &
8038 & answer_shape(2), &
8040 & answer_shape(3), &
8042 & answer_shape(4) ) &
8045 allocate( check_negative( &
8046 & answer_shape(1), &
8048 & answer_shape(2), &
8050 & answer_shape(3), &
8052 & answer_shape(4) ) &
8055 allocate( both_negative( &
8056 & answer_shape(1), &
8058 & answer_shape(2), &
8060 & answer_shape(3), &
8062 & answer_shape(4) ) &
8065 allocate( answer_max( &
8066 & answer_shape(1), &
8068 & answer_shape(2), &
8070 & answer_shape(3), &
8072 & answer_shape(4) ) &
8075 allocate( answer_min( &
8076 & answer_shape(1), &
8078 & answer_shape(2), &
8080 & answer_shape(3), &
8082 & answer_shape(4) ) &
8085 answer_negative = answer < 0.0_dp
8086 check_negative = check < 0.0_dp
8087 both_negative = answer_negative .and. check_negative
8089 where (both_negative)
8093 & - 0.1_dp ** significant_digits ) &
8094 & + 0.1_dp ** (- ignore_digits)
8099 & + 0.1_dp ** significant_digits ) &
8100 & - 0.1_dp ** (- ignore_digits)
8105 & + 0.1_dp ** significant_digits ) &
8106 & + 0.1_dp ** (- ignore_digits)
8111 & - 0.1_dp ** significant_digits ) &
8112 & - 0.1_dp ** (- ignore_digits)
8115 judge = answer_max > check .and. check > answer_min
8116 judge_rev = .not. judge
8117 err_flag = any(judge_rev)
8119 pos = maxloc(mask_array, judge_rev)
8132 right_max = answer_max( &
8141 right_min = answer_min( &
8150 if ( right_max < right_min )
then 8151 right_tmp = right_max
8152 right_max = right_min
8153 right_min = right_tmp
8156 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
8158 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
8160 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
8162 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
8166 & trim(adjustl(pos_array(1))) //
',' // &
8168 & trim(adjustl(pos_array(2))) //
',' // &
8170 & trim(adjustl(pos_array(3))) //
',' // &
8172 & trim(adjustl(pos_array(4))) //
')' 8175 deallocate(mask_array, judge, judge_rev)
8176 deallocate(answer_negative, check_negative, both_negative)
8177 deallocate(answer_max, answer_min)
8183 pos_str_len = len_trim(pos_str)
8185 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 8187 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
8188 write(*,*)
' is NOT EQUAL to' 8189 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
8190 & //
' ', right_min,
' < ' 8191 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
8195 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 8203 & message, answer, check, significant_digits, ignore_digits )
8206 character(*),
intent(in):: message
8207 real(DP),
intent(in):: answer(:,:,:,:,:)
8208 real(DP),
intent(in):: check(:,:,:,:,:)
8209 integer,
intent(in):: significant_digits
8210 integer,
intent(in):: ignore_digits
8212 character(STRING):: pos_str
8213 real(DP):: wrong, right_max, right_min
8214 character(STRING):: pos_str_space
8215 integer:: pos_str_len
8216 real(DP):: right_tmp
8218 integer:: answer_shape(5), check_shape(5), pos(5)
8219 logical:: consist_shape(5)
8220 character(TOKEN):: pos_array(5)
8221 integer,
allocatable:: mask_array(:,:,:,:,:)
8222 logical,
allocatable:: judge(:,:,:,:,:)
8223 logical,
allocatable:: judge_rev(:,:,:,:,:)
8224 logical,
allocatable:: answer_negative(:,:,:,:,:)
8225 logical,
allocatable:: check_negative(:,:,:,:,:)
8226 logical,
allocatable:: both_negative(:,:,:,:,:)
8227 real(DP),
allocatable:: answer_max(:,:,:,:,:)
8228 real(DP),
allocatable:: answer_min(:,:,:,:,:)
8233 if ( significant_digits < 1 )
then 8234 write(*,*)
' *** Error [AssertEQ] *** ' 8235 write(*,*)
' Specify a number more than 1 to "significant_digits"' 8239 answer_shape = shape(answer)
8240 check_shape = shape(check)
8242 consist_shape = answer_shape == check_shape
8244 if (.not. all(consist_shape))
then 8245 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 8247 write(*,*)
' shape of check is (', check_shape,
')' 8248 write(*,*)
' is INCORRECT' 8249 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 8255 allocate( mask_array( &
8256 & answer_shape(1), &
8258 & answer_shape(2), &
8260 & answer_shape(3), &
8262 & answer_shape(4), &
8264 & answer_shape(5) ) &
8268 & answer_shape(1), &
8270 & answer_shape(2), &
8272 & answer_shape(3), &
8274 & answer_shape(4), &
8276 & answer_shape(5) ) &
8279 allocate( judge_rev( &
8280 & answer_shape(1), &
8282 & answer_shape(2), &
8284 & answer_shape(3), &
8286 & answer_shape(4), &
8288 & answer_shape(5) ) &
8291 allocate( answer_negative( &
8292 & answer_shape(1), &
8294 & answer_shape(2), &
8296 & answer_shape(3), &
8298 & answer_shape(4), &
8300 & answer_shape(5) ) &
8303 allocate( check_negative( &
8304 & answer_shape(1), &
8306 & answer_shape(2), &
8308 & answer_shape(3), &
8310 & answer_shape(4), &
8312 & answer_shape(5) ) &
8315 allocate( both_negative( &
8316 & answer_shape(1), &
8318 & answer_shape(2), &
8320 & answer_shape(3), &
8322 & answer_shape(4), &
8324 & answer_shape(5) ) &
8327 allocate( answer_max( &
8328 & answer_shape(1), &
8330 & answer_shape(2), &
8332 & answer_shape(3), &
8334 & answer_shape(4), &
8336 & answer_shape(5) ) &
8339 allocate( answer_min( &
8340 & answer_shape(1), &
8342 & answer_shape(2), &
8344 & answer_shape(3), &
8346 & answer_shape(4), &
8348 & answer_shape(5) ) &
8351 answer_negative = answer < 0.0_dp
8352 check_negative = check < 0.0_dp
8353 both_negative = answer_negative .and. check_negative
8355 where (both_negative)
8359 & - 0.1_dp ** significant_digits ) &
8360 & + 0.1_dp ** (- ignore_digits)
8365 & + 0.1_dp ** significant_digits ) &
8366 & - 0.1_dp ** (- ignore_digits)
8371 & + 0.1_dp ** significant_digits ) &
8372 & + 0.1_dp ** (- ignore_digits)
8377 & - 0.1_dp ** significant_digits ) &
8378 & - 0.1_dp ** (- ignore_digits)
8381 judge = answer_max > check .and. check > answer_min
8382 judge_rev = .not. judge
8383 err_flag = any(judge_rev)
8385 pos = maxloc(mask_array, judge_rev)
8400 right_max = answer_max( &
8411 right_min = answer_min( &
8422 if ( right_max < right_min )
then 8423 right_tmp = right_max
8424 right_max = right_min
8425 right_min = right_tmp
8428 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
8430 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
8432 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
8434 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
8436 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
8440 & trim(adjustl(pos_array(1))) //
',' // &
8442 & trim(adjustl(pos_array(2))) //
',' // &
8444 & trim(adjustl(pos_array(3))) //
',' // &
8446 & trim(adjustl(pos_array(4))) //
',' // &
8448 & trim(adjustl(pos_array(5))) //
')' 8451 deallocate(mask_array, judge, judge_rev)
8452 deallocate(answer_negative, check_negative, both_negative)
8453 deallocate(answer_max, answer_min)
8459 pos_str_len = len_trim(pos_str)
8461 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 8463 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
8464 write(*,*)
' is NOT EQUAL to' 8465 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
8466 & //
' ', right_min,
' < ' 8467 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
8471 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 8479 & message, answer, check, significant_digits, ignore_digits )
8482 character(*),
intent(in):: message
8483 real(DP),
intent(in):: answer(:,:,:,:,:,:)
8484 real(DP),
intent(in):: check(:,:,:,:,:,:)
8485 integer,
intent(in):: significant_digits
8486 integer,
intent(in):: ignore_digits
8488 character(STRING):: pos_str
8489 real(DP):: wrong, right_max, right_min
8490 character(STRING):: pos_str_space
8491 integer:: pos_str_len
8492 real(DP):: right_tmp
8494 integer:: answer_shape(6), check_shape(6), pos(6)
8495 logical:: consist_shape(6)
8496 character(TOKEN):: pos_array(6)
8497 integer,
allocatable:: mask_array(:,:,:,:,:,:)
8498 logical,
allocatable:: judge(:,:,:,:,:,:)
8499 logical,
allocatable:: judge_rev(:,:,:,:,:,:)
8500 logical,
allocatable:: answer_negative(:,:,:,:,:,:)
8501 logical,
allocatable:: check_negative(:,:,:,:,:,:)
8502 logical,
allocatable:: both_negative(:,:,:,:,:,:)
8503 real(DP),
allocatable:: answer_max(:,:,:,:,:,:)
8504 real(DP),
allocatable:: answer_min(:,:,:,:,:,:)
8509 if ( significant_digits < 1 )
then 8510 write(*,*)
' *** Error [AssertEQ] *** ' 8511 write(*,*)
' Specify a number more than 1 to "significant_digits"' 8515 answer_shape = shape(answer)
8516 check_shape = shape(check)
8518 consist_shape = answer_shape == check_shape
8520 if (.not. all(consist_shape))
then 8521 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 8523 write(*,*)
' shape of check is (', check_shape,
')' 8524 write(*,*)
' is INCORRECT' 8525 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 8531 allocate( mask_array( &
8532 & answer_shape(1), &
8534 & answer_shape(2), &
8536 & answer_shape(3), &
8538 & answer_shape(4), &
8540 & answer_shape(5), &
8542 & answer_shape(6) ) &
8546 & answer_shape(1), &
8548 & answer_shape(2), &
8550 & answer_shape(3), &
8552 & answer_shape(4), &
8554 & answer_shape(5), &
8556 & answer_shape(6) ) &
8559 allocate( judge_rev( &
8560 & answer_shape(1), &
8562 & answer_shape(2), &
8564 & answer_shape(3), &
8566 & answer_shape(4), &
8568 & answer_shape(5), &
8570 & answer_shape(6) ) &
8573 allocate( answer_negative( &
8574 & answer_shape(1), &
8576 & answer_shape(2), &
8578 & answer_shape(3), &
8580 & answer_shape(4), &
8582 & answer_shape(5), &
8584 & answer_shape(6) ) &
8587 allocate( check_negative( &
8588 & answer_shape(1), &
8590 & answer_shape(2), &
8592 & answer_shape(3), &
8594 & answer_shape(4), &
8596 & answer_shape(5), &
8598 & answer_shape(6) ) &
8601 allocate( both_negative( &
8602 & answer_shape(1), &
8604 & answer_shape(2), &
8606 & answer_shape(3), &
8608 & answer_shape(4), &
8610 & answer_shape(5), &
8612 & answer_shape(6) ) &
8615 allocate( answer_max( &
8616 & answer_shape(1), &
8618 & answer_shape(2), &
8620 & answer_shape(3), &
8622 & answer_shape(4), &
8624 & answer_shape(5), &
8626 & answer_shape(6) ) &
8629 allocate( answer_min( &
8630 & answer_shape(1), &
8632 & answer_shape(2), &
8634 & answer_shape(3), &
8636 & answer_shape(4), &
8638 & answer_shape(5), &
8640 & answer_shape(6) ) &
8643 answer_negative = answer < 0.0_dp
8644 check_negative = check < 0.0_dp
8645 both_negative = answer_negative .and. check_negative
8647 where (both_negative)
8651 & - 0.1_dp ** significant_digits ) &
8652 & + 0.1_dp ** (- ignore_digits)
8657 & + 0.1_dp ** significant_digits ) &
8658 & - 0.1_dp ** (- ignore_digits)
8663 & + 0.1_dp ** significant_digits ) &
8664 & + 0.1_dp ** (- ignore_digits)
8669 & - 0.1_dp ** significant_digits ) &
8670 & - 0.1_dp ** (- ignore_digits)
8673 judge = answer_max > check .and. check > answer_min
8674 judge_rev = .not. judge
8675 err_flag = any(judge_rev)
8677 pos = maxloc(mask_array, judge_rev)
8694 right_max = answer_max( &
8707 right_min = answer_min( &
8720 if ( right_max < right_min )
then 8721 right_tmp = right_max
8722 right_max = right_min
8723 right_min = right_tmp
8726 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
8728 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
8730 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
8732 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
8734 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
8736 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
8740 & trim(adjustl(pos_array(1))) //
',' // &
8742 & trim(adjustl(pos_array(2))) //
',' // &
8744 & trim(adjustl(pos_array(3))) //
',' // &
8746 & trim(adjustl(pos_array(4))) //
',' // &
8748 & trim(adjustl(pos_array(5))) //
',' // &
8750 & trim(adjustl(pos_array(6))) //
')' 8753 deallocate(mask_array, judge, judge_rev)
8754 deallocate(answer_negative, check_negative, both_negative)
8755 deallocate(answer_max, answer_min)
8761 pos_str_len = len_trim(pos_str)
8763 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 8765 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
8766 write(*,*)
' is NOT EQUAL to' 8767 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
8768 & //
' ', right_min,
' < ' 8769 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
8773 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 8781 & message, answer, check, significant_digits, ignore_digits )
8784 character(*),
intent(in):: message
8785 real(DP),
intent(in):: answer(:,:,:,:,:,:,:)
8786 real(DP),
intent(in):: check(:,:,:,:,:,:,:)
8787 integer,
intent(in):: significant_digits
8788 integer,
intent(in):: ignore_digits
8790 character(STRING):: pos_str
8791 real(DP):: wrong, right_max, right_min
8792 character(STRING):: pos_str_space
8793 integer:: pos_str_len
8794 real(DP):: right_tmp
8796 integer:: answer_shape(7), check_shape(7), pos(7)
8797 logical:: consist_shape(7)
8798 character(TOKEN):: pos_array(7)
8799 integer,
allocatable:: mask_array(:,:,:,:,:,:,:)
8800 logical,
allocatable:: judge(:,:,:,:,:,:,:)
8801 logical,
allocatable:: judge_rev(:,:,:,:,:,:,:)
8802 logical,
allocatable:: answer_negative(:,:,:,:,:,:,:)
8803 logical,
allocatable:: check_negative(:,:,:,:,:,:,:)
8804 logical,
allocatable:: both_negative(:,:,:,:,:,:,:)
8805 real(DP),
allocatable:: answer_max(:,:,:,:,:,:,:)
8806 real(DP),
allocatable:: answer_min(:,:,:,:,:,:,:)
8811 if ( significant_digits < 1 )
then 8812 write(*,*)
' *** Error [AssertEQ] *** ' 8813 write(*,*)
' Specify a number more than 1 to "significant_digits"' 8817 answer_shape = shape(answer)
8818 check_shape = shape(check)
8820 consist_shape = answer_shape == check_shape
8822 if (.not. all(consist_shape))
then 8823 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 8825 write(*,*)
' shape of check is (', check_shape,
')' 8826 write(*,*)
' is INCORRECT' 8827 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 8833 allocate( mask_array( &
8834 & answer_shape(1), &
8836 & answer_shape(2), &
8838 & answer_shape(3), &
8840 & answer_shape(4), &
8842 & answer_shape(5), &
8844 & answer_shape(6), &
8846 & answer_shape(7) ) &
8850 & answer_shape(1), &
8852 & answer_shape(2), &
8854 & answer_shape(3), &
8856 & answer_shape(4), &
8858 & answer_shape(5), &
8860 & answer_shape(6), &
8862 & answer_shape(7) ) &
8865 allocate( judge_rev( &
8866 & answer_shape(1), &
8868 & answer_shape(2), &
8870 & answer_shape(3), &
8872 & answer_shape(4), &
8874 & answer_shape(5), &
8876 & answer_shape(6), &
8878 & answer_shape(7) ) &
8881 allocate( answer_negative( &
8882 & answer_shape(1), &
8884 & answer_shape(2), &
8886 & answer_shape(3), &
8888 & answer_shape(4), &
8890 & answer_shape(5), &
8892 & answer_shape(6), &
8894 & answer_shape(7) ) &
8897 allocate( check_negative( &
8898 & answer_shape(1), &
8900 & answer_shape(2), &
8902 & answer_shape(3), &
8904 & answer_shape(4), &
8906 & answer_shape(5), &
8908 & answer_shape(6), &
8910 & answer_shape(7) ) &
8913 allocate( both_negative( &
8914 & answer_shape(1), &
8916 & answer_shape(2), &
8918 & answer_shape(3), &
8920 & answer_shape(4), &
8922 & answer_shape(5), &
8924 & answer_shape(6), &
8926 & answer_shape(7) ) &
8929 allocate( answer_max( &
8930 & answer_shape(1), &
8932 & answer_shape(2), &
8934 & answer_shape(3), &
8936 & answer_shape(4), &
8938 & answer_shape(5), &
8940 & answer_shape(6), &
8942 & answer_shape(7) ) &
8945 allocate( answer_min( &
8946 & answer_shape(1), &
8948 & answer_shape(2), &
8950 & answer_shape(3), &
8952 & answer_shape(4), &
8954 & answer_shape(5), &
8956 & answer_shape(6), &
8958 & answer_shape(7) ) &
8961 answer_negative = answer < 0.0_dp
8962 check_negative = check < 0.0_dp
8963 both_negative = answer_negative .and. check_negative
8965 where (both_negative)
8969 & - 0.1_dp ** significant_digits ) &
8970 & + 0.1_dp ** (- ignore_digits)
8975 & + 0.1_dp ** significant_digits ) &
8976 & - 0.1_dp ** (- ignore_digits)
8981 & + 0.1_dp ** significant_digits ) &
8982 & + 0.1_dp ** (- ignore_digits)
8987 & - 0.1_dp ** significant_digits ) &
8988 & - 0.1_dp ** (- ignore_digits)
8991 judge = answer_max > check .and. check > answer_min
8992 judge_rev = .not. judge
8993 err_flag = any(judge_rev)
8995 pos = maxloc(mask_array, judge_rev)
9014 right_max = answer_max( &
9029 right_min = answer_min( &
9044 if ( right_max < right_min )
then 9045 right_tmp = right_max
9046 right_max = right_min
9047 right_min = right_tmp
9050 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
9052 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
9054 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
9056 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
9058 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
9060 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
9062 write(unit=pos_array(7), fmt=
"(i20)") pos(7)
9066 & trim(adjustl(pos_array(1))) //
',' // &
9068 & trim(adjustl(pos_array(2))) //
',' // &
9070 & trim(adjustl(pos_array(3))) //
',' // &
9072 & trim(adjustl(pos_array(4))) //
',' // &
9074 & trim(adjustl(pos_array(5))) //
',' // &
9076 & trim(adjustl(pos_array(6))) //
',' // &
9078 & trim(adjustl(pos_array(7))) //
')' 9081 deallocate(mask_array, judge, judge_rev)
9082 deallocate(answer_negative, check_negative, both_negative)
9083 deallocate(answer_max, answer_min)
9089 pos_str_len = len_trim(pos_str)
9091 write(*,*)
' *** Error [AssertEQ] *** Checking ' // trim(message) //
' FAILURE' 9093 write(*,*)
' check' // trim(pos_str) //
' = ', wrong
9094 write(*,*)
' is NOT EQUAL to' 9095 write(*,*)
' ' // pos_str_space(1:pos_str_len) &
9096 & //
' ', right_min,
' < ' 9097 write(*,*)
' answer' // trim(pos_str) //
' < ', right_max
9101 write(*,*)
' *** MESSAGE [AssertEQ] *** Checking ' // trim(message) //
' OK' 9109 & message, answer, check, negative_support)
9112 character(*),
intent(in):: message
9113 integer,
intent(in):: answer
9114 integer,
intent(in):: check
9115 logical,
intent(in),
optional:: negative_support
9117 logical:: negative_support_on
9118 character(STRING):: pos_str
9119 character(TOKEN):: abs_mes
9120 integer:: wrong, right
9125 if (
present(negative_support))
then 9126 negative_support_on = negative_support
9128 negative_support_on = .true.
9134 err_flag = .not. answer < check
9139 & .and. negative_support_on )
then 9141 err_flag = .not. err_flag
9142 abs_mes =
'ABSOLUTE value of' 9153 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 9155 write(*,*)
' ' // trim(abs_mes) // &
9156 &
' check' // trim(pos_str) //
' = ', wrong
9157 write(*,*)
' is NOT GREATER THAN' 9158 write(*,*)
' ' // trim(abs_mes) // &
9159 &
' answer' // trim(pos_str) //
' = ', right
9163 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 9171 & message, answer, check, negative_support)
9174 character(*),
intent(in):: message
9175 integer,
intent(in):: answer(:)
9176 integer,
intent(in):: check(:)
9177 logical,
intent(in),
optional:: negative_support
9179 logical:: negative_support_on
9180 character(STRING):: pos_str
9181 character(TOKEN):: abs_mes
9182 integer:: wrong, right
9184 integer:: answer_shape(1), check_shape(1), pos(1)
9185 logical:: consist_shape(1)
9186 character(TOKEN):: pos_array(1)
9187 integer,
allocatable:: mask_array(:)
9188 logical,
allocatable:: judge(:)
9189 logical,
allocatable:: judge_rev(:)
9190 logical,
allocatable:: answer_negative(:)
9191 logical,
allocatable:: check_negative(:)
9192 logical,
allocatable:: both_negative(:)
9196 if (
present(negative_support))
then 9197 negative_support_on = negative_support
9199 negative_support_on = .true.
9205 answer_shape = shape(answer)
9206 check_shape = shape(check)
9208 consist_shape = answer_shape == check_shape
9210 if (.not. all(consist_shape))
then 9211 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 9213 write(*,*)
' shape of check is (', check_shape,
')' 9214 write(*,*)
' is INCORRECT' 9215 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 9221 allocate( mask_array( &
9223 & answer_shape(1) ) &
9228 & answer_shape(1) ) &
9231 allocate( judge_rev( &
9233 & answer_shape(1) ) &
9236 allocate( answer_negative( &
9238 & answer_shape(1) ) &
9241 allocate( check_negative( &
9243 & answer_shape(1) ) &
9246 allocate( both_negative( &
9248 & answer_shape(1) ) &
9251 answer_negative = answer < 0
9252 check_negative = check < 0
9253 both_negative = answer_negative .and. check_negative
9254 if (.not. negative_support_on) both_negative = .false.
9256 judge = answer < check
9257 where (both_negative) judge = .not. judge
9259 judge_rev = .not. judge
9260 err_flag = any(judge_rev)
9262 pos = maxloc(mask_array, judge_rev)
9274 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
9279 & trim(adjustl(pos_array(1))) //
')' 9281 if ( both_negative( &
9285 abs_mes =
'ABSOLUTE value of' 9292 deallocate(mask_array, judge, judge_rev)
9293 deallocate(answer_negative, check_negative, both_negative)
9299 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 9301 write(*,*)
' ' // trim(abs_mes) // &
9302 &
' check' // trim(pos_str) //
' = ', wrong
9303 write(*,*)
' is NOT GREATER THAN' 9304 write(*,*)
' ' // trim(abs_mes) // &
9305 &
' answer' // trim(pos_str) //
' = ', right
9309 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 9317 & message, answer, check, negative_support)
9320 character(*),
intent(in):: message
9321 integer,
intent(in):: answer(:,:)
9322 integer,
intent(in):: check(:,:)
9323 logical,
intent(in),
optional:: negative_support
9325 logical:: negative_support_on
9326 character(STRING):: pos_str
9327 character(TOKEN):: abs_mes
9328 integer:: wrong, right
9330 integer:: answer_shape(2), check_shape(2), pos(2)
9331 logical:: consist_shape(2)
9332 character(TOKEN):: pos_array(2)
9333 integer,
allocatable:: mask_array(:,:)
9334 logical,
allocatable:: judge(:,:)
9335 logical,
allocatable:: judge_rev(:,:)
9336 logical,
allocatable:: answer_negative(:,:)
9337 logical,
allocatable:: check_negative(:,:)
9338 logical,
allocatable:: both_negative(:,:)
9342 if (
present(negative_support))
then 9343 negative_support_on = negative_support
9345 negative_support_on = .true.
9351 answer_shape = shape(answer)
9352 check_shape = shape(check)
9354 consist_shape = answer_shape == check_shape
9356 if (.not. all(consist_shape))
then 9357 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 9359 write(*,*)
' shape of check is (', check_shape,
')' 9360 write(*,*)
' is INCORRECT' 9361 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 9367 allocate( mask_array( &
9368 & answer_shape(1), &
9370 & answer_shape(2) ) &
9374 & answer_shape(1), &
9376 & answer_shape(2) ) &
9379 allocate( judge_rev( &
9380 & answer_shape(1), &
9382 & answer_shape(2) ) &
9385 allocate( answer_negative( &
9386 & answer_shape(1), &
9388 & answer_shape(2) ) &
9391 allocate( check_negative( &
9392 & answer_shape(1), &
9394 & answer_shape(2) ) &
9397 allocate( both_negative( &
9398 & answer_shape(1), &
9400 & answer_shape(2) ) &
9403 answer_negative = answer < 0
9404 check_negative = check < 0
9405 both_negative = answer_negative .and. check_negative
9406 if (.not. negative_support_on) both_negative = .false.
9408 judge = answer < check
9409 where (both_negative) judge = .not. judge
9411 judge_rev = .not. judge
9412 err_flag = any(judge_rev)
9414 pos = maxloc(mask_array, judge_rev)
9428 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
9430 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
9434 & trim(adjustl(pos_array(1))) //
',' // &
9436 & trim(adjustl(pos_array(2))) //
')' 9438 if ( both_negative( &
9443 abs_mes =
'ABSOLUTE value of' 9450 deallocate(mask_array, judge, judge_rev)
9451 deallocate(answer_negative, check_negative, both_negative)
9457 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 9459 write(*,*)
' ' // trim(abs_mes) // &
9460 &
' check' // trim(pos_str) //
' = ', wrong
9461 write(*,*)
' is NOT GREATER THAN' 9462 write(*,*)
' ' // trim(abs_mes) // &
9463 &
' answer' // trim(pos_str) //
' = ', right
9467 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 9475 & message, answer, check, negative_support)
9478 character(*),
intent(in):: message
9479 integer,
intent(in):: answer(:,:,:)
9480 integer,
intent(in):: check(:,:,:)
9481 logical,
intent(in),
optional:: negative_support
9483 logical:: negative_support_on
9484 character(STRING):: pos_str
9485 character(TOKEN):: abs_mes
9486 integer:: wrong, right
9488 integer:: answer_shape(3), check_shape(3), pos(3)
9489 logical:: consist_shape(3)
9490 character(TOKEN):: pos_array(3)
9491 integer,
allocatable:: mask_array(:,:,:)
9492 logical,
allocatable:: judge(:,:,:)
9493 logical,
allocatable:: judge_rev(:,:,:)
9494 logical,
allocatable:: answer_negative(:,:,:)
9495 logical,
allocatable:: check_negative(:,:,:)
9496 logical,
allocatable:: both_negative(:,:,:)
9500 if (
present(negative_support))
then 9501 negative_support_on = negative_support
9503 negative_support_on = .true.
9509 answer_shape = shape(answer)
9510 check_shape = shape(check)
9512 consist_shape = answer_shape == check_shape
9514 if (.not. all(consist_shape))
then 9515 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 9517 write(*,*)
' shape of check is (', check_shape,
')' 9518 write(*,*)
' is INCORRECT' 9519 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 9525 allocate( mask_array( &
9526 & answer_shape(1), &
9528 & answer_shape(2), &
9530 & answer_shape(3) ) &
9534 & answer_shape(1), &
9536 & answer_shape(2), &
9538 & answer_shape(3) ) &
9541 allocate( judge_rev( &
9542 & answer_shape(1), &
9544 & answer_shape(2), &
9546 & answer_shape(3) ) &
9549 allocate( answer_negative( &
9550 & answer_shape(1), &
9552 & answer_shape(2), &
9554 & answer_shape(3) ) &
9557 allocate( check_negative( &
9558 & answer_shape(1), &
9560 & answer_shape(2), &
9562 & answer_shape(3) ) &
9565 allocate( both_negative( &
9566 & answer_shape(1), &
9568 & answer_shape(2), &
9570 & answer_shape(3) ) &
9573 answer_negative = answer < 0
9574 check_negative = check < 0
9575 both_negative = answer_negative .and. check_negative
9576 if (.not. negative_support_on) both_negative = .false.
9578 judge = answer < check
9579 where (both_negative) judge = .not. judge
9581 judge_rev = .not. judge
9582 err_flag = any(judge_rev)
9584 pos = maxloc(mask_array, judge_rev)
9602 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
9604 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
9606 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
9610 & trim(adjustl(pos_array(1))) //
',' // &
9612 & trim(adjustl(pos_array(2))) //
',' // &
9614 & trim(adjustl(pos_array(3))) //
')' 9616 if ( both_negative( &
9623 abs_mes =
'ABSOLUTE value of' 9630 deallocate(mask_array, judge, judge_rev)
9631 deallocate(answer_negative, check_negative, both_negative)
9637 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 9639 write(*,*)
' ' // trim(abs_mes) // &
9640 &
' check' // trim(pos_str) //
' = ', wrong
9641 write(*,*)
' is NOT GREATER THAN' 9642 write(*,*)
' ' // trim(abs_mes) // &
9643 &
' answer' // trim(pos_str) //
' = ', right
9647 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 9655 & message, answer, check, negative_support)
9658 character(*),
intent(in):: message
9659 integer,
intent(in):: answer(:,:,:,:)
9660 integer,
intent(in):: check(:,:,:,:)
9661 logical,
intent(in),
optional:: negative_support
9663 logical:: negative_support_on
9664 character(STRING):: pos_str
9665 character(TOKEN):: abs_mes
9666 integer:: wrong, right
9668 integer:: answer_shape(4), check_shape(4), pos(4)
9669 logical:: consist_shape(4)
9670 character(TOKEN):: pos_array(4)
9671 integer,
allocatable:: mask_array(:,:,:,:)
9672 logical,
allocatable:: judge(:,:,:,:)
9673 logical,
allocatable:: judge_rev(:,:,:,:)
9674 logical,
allocatable:: answer_negative(:,:,:,:)
9675 logical,
allocatable:: check_negative(:,:,:,:)
9676 logical,
allocatable:: both_negative(:,:,:,:)
9680 if (
present(negative_support))
then 9681 negative_support_on = negative_support
9683 negative_support_on = .true.
9689 answer_shape = shape(answer)
9690 check_shape = shape(check)
9692 consist_shape = answer_shape == check_shape
9694 if (.not. all(consist_shape))
then 9695 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 9697 write(*,*)
' shape of check is (', check_shape,
')' 9698 write(*,*)
' is INCORRECT' 9699 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 9705 allocate( mask_array( &
9706 & answer_shape(1), &
9708 & answer_shape(2), &
9710 & answer_shape(3), &
9712 & answer_shape(4) ) &
9716 & answer_shape(1), &
9718 & answer_shape(2), &
9720 & answer_shape(3), &
9722 & answer_shape(4) ) &
9725 allocate( judge_rev( &
9726 & answer_shape(1), &
9728 & answer_shape(2), &
9730 & answer_shape(3), &
9732 & answer_shape(4) ) &
9735 allocate( answer_negative( &
9736 & answer_shape(1), &
9738 & answer_shape(2), &
9740 & answer_shape(3), &
9742 & answer_shape(4) ) &
9745 allocate( check_negative( &
9746 & answer_shape(1), &
9748 & answer_shape(2), &
9750 & answer_shape(3), &
9752 & answer_shape(4) ) &
9755 allocate( both_negative( &
9756 & answer_shape(1), &
9758 & answer_shape(2), &
9760 & answer_shape(3), &
9762 & answer_shape(4) ) &
9765 answer_negative = answer < 0
9766 check_negative = check < 0
9767 both_negative = answer_negative .and. check_negative
9768 if (.not. negative_support_on) both_negative = .false.
9770 judge = answer < check
9771 where (both_negative) judge = .not. judge
9773 judge_rev = .not. judge
9774 err_flag = any(judge_rev)
9776 pos = maxloc(mask_array, judge_rev)
9798 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
9800 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
9802 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
9804 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
9808 & trim(adjustl(pos_array(1))) //
',' // &
9810 & trim(adjustl(pos_array(2))) //
',' // &
9812 & trim(adjustl(pos_array(3))) //
',' // &
9814 & trim(adjustl(pos_array(4))) //
')' 9816 if ( both_negative( &
9825 abs_mes =
'ABSOLUTE value of' 9832 deallocate(mask_array, judge, judge_rev)
9833 deallocate(answer_negative, check_negative, both_negative)
9839 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 9841 write(*,*)
' ' // trim(abs_mes) // &
9842 &
' check' // trim(pos_str) //
' = ', wrong
9843 write(*,*)
' is NOT GREATER THAN' 9844 write(*,*)
' ' // trim(abs_mes) // &
9845 &
' answer' // trim(pos_str) //
' = ', right
9849 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 9857 & message, answer, check, negative_support)
9860 character(*),
intent(in):: message
9861 integer,
intent(in):: answer(:,:,:,:,:)
9862 integer,
intent(in):: check(:,:,:,:,:)
9863 logical,
intent(in),
optional:: negative_support
9865 logical:: negative_support_on
9866 character(STRING):: pos_str
9867 character(TOKEN):: abs_mes
9868 integer:: wrong, right
9870 integer:: answer_shape(5), check_shape(5), pos(5)
9871 logical:: consist_shape(5)
9872 character(TOKEN):: pos_array(5)
9873 integer,
allocatable:: mask_array(:,:,:,:,:)
9874 logical,
allocatable:: judge(:,:,:,:,:)
9875 logical,
allocatable:: judge_rev(:,:,:,:,:)
9876 logical,
allocatable:: answer_negative(:,:,:,:,:)
9877 logical,
allocatable:: check_negative(:,:,:,:,:)
9878 logical,
allocatable:: both_negative(:,:,:,:,:)
9882 if (
present(negative_support))
then 9883 negative_support_on = negative_support
9885 negative_support_on = .true.
9891 answer_shape = shape(answer)
9892 check_shape = shape(check)
9894 consist_shape = answer_shape == check_shape
9896 if (.not. all(consist_shape))
then 9897 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 9899 write(*,*)
' shape of check is (', check_shape,
')' 9900 write(*,*)
' is INCORRECT' 9901 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 9907 allocate( mask_array( &
9908 & answer_shape(1), &
9910 & answer_shape(2), &
9912 & answer_shape(3), &
9914 & answer_shape(4), &
9916 & answer_shape(5) ) &
9920 & answer_shape(1), &
9922 & answer_shape(2), &
9924 & answer_shape(3), &
9926 & answer_shape(4), &
9928 & answer_shape(5) ) &
9931 allocate( judge_rev( &
9932 & answer_shape(1), &
9934 & answer_shape(2), &
9936 & answer_shape(3), &
9938 & answer_shape(4), &
9940 & answer_shape(5) ) &
9943 allocate( answer_negative( &
9944 & answer_shape(1), &
9946 & answer_shape(2), &
9948 & answer_shape(3), &
9950 & answer_shape(4), &
9952 & answer_shape(5) ) &
9955 allocate( check_negative( &
9956 & answer_shape(1), &
9958 & answer_shape(2), &
9960 & answer_shape(3), &
9962 & answer_shape(4), &
9964 & answer_shape(5) ) &
9967 allocate( both_negative( &
9968 & answer_shape(1), &
9970 & answer_shape(2), &
9972 & answer_shape(3), &
9974 & answer_shape(4), &
9976 & answer_shape(5) ) &
9979 answer_negative = answer < 0
9980 check_negative = check < 0
9981 both_negative = answer_negative .and. check_negative
9982 if (.not. negative_support_on) both_negative = .false.
9984 judge = answer < check
9985 where (both_negative) judge = .not. judge
9987 judge_rev = .not. judge
9988 err_flag = any(judge_rev)
9990 pos = maxloc(mask_array, judge_rev)
10016 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
10018 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
10020 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
10022 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
10024 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
10028 & trim(adjustl(pos_array(1))) //
',' // &
10030 & trim(adjustl(pos_array(2))) //
',' // &
10032 & trim(adjustl(pos_array(3))) //
',' // &
10034 & trim(adjustl(pos_array(4))) //
',' // &
10036 & trim(adjustl(pos_array(5))) //
')' 10038 if ( both_negative( &
10049 abs_mes =
'ABSOLUTE value of' 10056 deallocate(mask_array, judge, judge_rev)
10057 deallocate(answer_negative, check_negative, both_negative)
10063 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 10065 write(*,*)
' ' // trim(abs_mes) // &
10066 &
' check' // trim(pos_str) //
' = ', wrong
10067 write(*,*)
' is NOT GREATER THAN' 10068 write(*,*)
' ' // trim(abs_mes) // &
10069 &
' answer' // trim(pos_str) //
' = ', right
10073 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 10081 & message, answer, check, negative_support)
10084 character(*),
intent(in):: message
10085 integer,
intent(in):: answer(:,:,:,:,:,:)
10086 integer,
intent(in):: check(:,:,:,:,:,:)
10087 logical,
intent(in),
optional:: negative_support
10089 logical:: negative_support_on
10090 character(STRING):: pos_str
10091 character(TOKEN):: abs_mes
10092 integer:: wrong, right
10094 integer:: answer_shape(6), check_shape(6), pos(6)
10095 logical:: consist_shape(6)
10096 character(TOKEN):: pos_array(6)
10097 integer,
allocatable:: mask_array(:,:,:,:,:,:)
10098 logical,
allocatable:: judge(:,:,:,:,:,:)
10099 logical,
allocatable:: judge_rev(:,:,:,:,:,:)
10100 logical,
allocatable:: answer_negative(:,:,:,:,:,:)
10101 logical,
allocatable:: check_negative(:,:,:,:,:,:)
10102 logical,
allocatable:: both_negative(:,:,:,:,:,:)
10106 if (
present(negative_support))
then 10107 negative_support_on = negative_support
10109 negative_support_on = .true.
10115 answer_shape = shape(answer)
10116 check_shape = shape(check)
10118 consist_shape = answer_shape == check_shape
10120 if (.not. all(consist_shape))
then 10121 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 10123 write(*,*)
' shape of check is (', check_shape,
')' 10124 write(*,*)
' is INCORRECT' 10125 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 10131 allocate( mask_array( &
10132 & answer_shape(1), &
10134 & answer_shape(2), &
10136 & answer_shape(3), &
10138 & answer_shape(4), &
10140 & answer_shape(5), &
10142 & answer_shape(6) ) &
10146 & answer_shape(1), &
10148 & answer_shape(2), &
10150 & answer_shape(3), &
10152 & answer_shape(4), &
10154 & answer_shape(5), &
10156 & answer_shape(6) ) &
10159 allocate( judge_rev( &
10160 & answer_shape(1), &
10162 & answer_shape(2), &
10164 & answer_shape(3), &
10166 & answer_shape(4), &
10168 & answer_shape(5), &
10170 & answer_shape(6) ) &
10173 allocate( answer_negative( &
10174 & answer_shape(1), &
10176 & answer_shape(2), &
10178 & answer_shape(3), &
10180 & answer_shape(4), &
10182 & answer_shape(5), &
10184 & answer_shape(6) ) &
10187 allocate( check_negative( &
10188 & answer_shape(1), &
10190 & answer_shape(2), &
10192 & answer_shape(3), &
10194 & answer_shape(4), &
10196 & answer_shape(5), &
10198 & answer_shape(6) ) &
10201 allocate( both_negative( &
10202 & answer_shape(1), &
10204 & answer_shape(2), &
10206 & answer_shape(3), &
10208 & answer_shape(4), &
10210 & answer_shape(5), &
10212 & answer_shape(6) ) &
10215 answer_negative = answer < 0
10216 check_negative = check < 0
10217 both_negative = answer_negative .and. check_negative
10218 if (.not. negative_support_on) both_negative = .false.
10220 judge = answer < check
10221 where (both_negative) judge = .not. judge
10223 judge_rev = .not. judge
10224 err_flag = any(judge_rev)
10226 pos = maxloc(mask_array, judge_rev)
10256 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
10258 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
10260 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
10262 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
10264 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
10266 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
10270 & trim(adjustl(pos_array(1))) //
',' // &
10272 & trim(adjustl(pos_array(2))) //
',' // &
10274 & trim(adjustl(pos_array(3))) //
',' // &
10276 & trim(adjustl(pos_array(4))) //
',' // &
10278 & trim(adjustl(pos_array(5))) //
',' // &
10280 & trim(adjustl(pos_array(6))) //
')' 10282 if ( both_negative( &
10295 abs_mes =
'ABSOLUTE value of' 10302 deallocate(mask_array, judge, judge_rev)
10303 deallocate(answer_negative, check_negative, both_negative)
10309 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 10311 write(*,*)
' ' // trim(abs_mes) // &
10312 &
' check' // trim(pos_str) //
' = ', wrong
10313 write(*,*)
' is NOT GREATER THAN' 10314 write(*,*)
' ' // trim(abs_mes) // &
10315 &
' answer' // trim(pos_str) //
' = ', right
10319 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 10327 & message, answer, check, negative_support)
10330 character(*),
intent(in):: message
10331 integer,
intent(in):: answer(:,:,:,:,:,:,:)
10332 integer,
intent(in):: check(:,:,:,:,:,:,:)
10333 logical,
intent(in),
optional:: negative_support
10335 logical:: negative_support_on
10336 character(STRING):: pos_str
10337 character(TOKEN):: abs_mes
10338 integer:: wrong, right
10340 integer:: answer_shape(7), check_shape(7), pos(7)
10341 logical:: consist_shape(7)
10342 character(TOKEN):: pos_array(7)
10343 integer,
allocatable:: mask_array(:,:,:,:,:,:,:)
10344 logical,
allocatable:: judge(:,:,:,:,:,:,:)
10345 logical,
allocatable:: judge_rev(:,:,:,:,:,:,:)
10346 logical,
allocatable:: answer_negative(:,:,:,:,:,:,:)
10347 logical,
allocatable:: check_negative(:,:,:,:,:,:,:)
10348 logical,
allocatable:: both_negative(:,:,:,:,:,:,:)
10352 if (
present(negative_support))
then 10353 negative_support_on = negative_support
10355 negative_support_on = .true.
10361 answer_shape = shape(answer)
10362 check_shape = shape(check)
10364 consist_shape = answer_shape == check_shape
10366 if (.not. all(consist_shape))
then 10367 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 10369 write(*,*)
' shape of check is (', check_shape,
')' 10370 write(*,*)
' is INCORRECT' 10371 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 10377 allocate( mask_array( &
10378 & answer_shape(1), &
10380 & answer_shape(2), &
10382 & answer_shape(3), &
10384 & answer_shape(4), &
10386 & answer_shape(5), &
10388 & answer_shape(6), &
10390 & answer_shape(7) ) &
10394 & answer_shape(1), &
10396 & answer_shape(2), &
10398 & answer_shape(3), &
10400 & answer_shape(4), &
10402 & answer_shape(5), &
10404 & answer_shape(6), &
10406 & answer_shape(7) ) &
10409 allocate( judge_rev( &
10410 & answer_shape(1), &
10412 & answer_shape(2), &
10414 & answer_shape(3), &
10416 & answer_shape(4), &
10418 & answer_shape(5), &
10420 & answer_shape(6), &
10422 & answer_shape(7) ) &
10425 allocate( answer_negative( &
10426 & answer_shape(1), &
10428 & answer_shape(2), &
10430 & answer_shape(3), &
10432 & answer_shape(4), &
10434 & answer_shape(5), &
10436 & answer_shape(6), &
10438 & answer_shape(7) ) &
10441 allocate( check_negative( &
10442 & answer_shape(1), &
10444 & answer_shape(2), &
10446 & answer_shape(3), &
10448 & answer_shape(4), &
10450 & answer_shape(5), &
10452 & answer_shape(6), &
10454 & answer_shape(7) ) &
10457 allocate( both_negative( &
10458 & answer_shape(1), &
10460 & answer_shape(2), &
10462 & answer_shape(3), &
10464 & answer_shape(4), &
10466 & answer_shape(5), &
10468 & answer_shape(6), &
10470 & answer_shape(7) ) &
10473 answer_negative = answer < 0
10474 check_negative = check < 0
10475 both_negative = answer_negative .and. check_negative
10476 if (.not. negative_support_on) both_negative = .false.
10478 judge = answer < check
10479 where (both_negative) judge = .not. judge
10481 judge_rev = .not. judge
10482 err_flag = any(judge_rev)
10484 pos = maxloc(mask_array, judge_rev)
10518 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
10520 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
10522 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
10524 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
10526 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
10528 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
10530 write(unit=pos_array(7), fmt=
"(i20)") pos(7)
10534 & trim(adjustl(pos_array(1))) //
',' // &
10536 & trim(adjustl(pos_array(2))) //
',' // &
10538 & trim(adjustl(pos_array(3))) //
',' // &
10540 & trim(adjustl(pos_array(4))) //
',' // &
10542 & trim(adjustl(pos_array(5))) //
',' // &
10544 & trim(adjustl(pos_array(6))) //
',' // &
10546 & trim(adjustl(pos_array(7))) //
')' 10548 if ( both_negative( &
10563 abs_mes =
'ABSOLUTE value of' 10570 deallocate(mask_array, judge, judge_rev)
10571 deallocate(answer_negative, check_negative, both_negative)
10577 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 10579 write(*,*)
' ' // trim(abs_mes) // &
10580 &
' check' // trim(pos_str) //
' = ', wrong
10581 write(*,*)
' is NOT GREATER THAN' 10582 write(*,*)
' ' // trim(abs_mes) // &
10583 &
' answer' // trim(pos_str) //
' = ', right
10587 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 10595 & message, answer, check, negative_support)
10598 character(*),
intent(in):: message
10599 real,
intent(in):: answer
10600 real,
intent(in):: check
10601 logical,
intent(in),
optional:: negative_support
10603 logical:: negative_support_on
10604 character(STRING):: pos_str
10605 character(TOKEN):: abs_mes
10606 real:: wrong, right
10611 if (
present(negative_support))
then 10612 negative_support_on = negative_support
10614 negative_support_on = .true.
10620 err_flag = .not. answer < check
10623 if ( answer < 0.0 &
10624 & .and. check < 0.0 &
10625 & .and. negative_support_on )
then 10627 err_flag = .not. err_flag
10628 abs_mes =
'ABSOLUTE value of' 10639 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 10641 write(*,*)
' ' // trim(abs_mes) // &
10642 &
' check' // trim(pos_str) //
' = ', wrong
10643 write(*,*)
' is NOT GREATER THAN' 10644 write(*,*)
' ' // trim(abs_mes) // &
10645 &
' answer' // trim(pos_str) //
' = ', right
10649 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 10657 & message, answer, check, negative_support)
10660 character(*),
intent(in):: message
10661 real,
intent(in):: answer(:)
10662 real,
intent(in):: check(:)
10663 logical,
intent(in),
optional:: negative_support
10665 logical:: negative_support_on
10666 character(STRING):: pos_str
10667 character(TOKEN):: abs_mes
10668 real:: wrong, right
10670 integer:: answer_shape(1), check_shape(1), pos(1)
10671 logical:: consist_shape(1)
10672 character(TOKEN):: pos_array(1)
10673 integer,
allocatable:: mask_array(:)
10674 logical,
allocatable:: judge(:)
10675 logical,
allocatable:: judge_rev(:)
10676 logical,
allocatable:: answer_negative(:)
10677 logical,
allocatable:: check_negative(:)
10678 logical,
allocatable:: both_negative(:)
10682 if (
present(negative_support))
then 10683 negative_support_on = negative_support
10685 negative_support_on = .true.
10691 answer_shape = shape(answer)
10692 check_shape = shape(check)
10694 consist_shape = answer_shape == check_shape
10696 if (.not. all(consist_shape))
then 10697 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 10699 write(*,*)
' shape of check is (', check_shape,
')' 10700 write(*,*)
' is INCORRECT' 10701 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 10707 allocate( mask_array( &
10709 & answer_shape(1) ) &
10714 & answer_shape(1) ) &
10717 allocate( judge_rev( &
10719 & answer_shape(1) ) &
10722 allocate( answer_negative( &
10724 & answer_shape(1) ) &
10727 allocate( check_negative( &
10729 & answer_shape(1) ) &
10732 allocate( both_negative( &
10734 & answer_shape(1) ) &
10737 answer_negative = answer < 0.0
10738 check_negative = check < 0.0
10739 both_negative = answer_negative .and. check_negative
10740 if (.not. negative_support_on) both_negative = .false.
10742 judge = answer < check
10743 where (both_negative) judge = .not. judge
10745 judge_rev = .not. judge
10746 err_flag = any(judge_rev)
10748 pos = maxloc(mask_array, judge_rev)
10760 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
10765 & trim(adjustl(pos_array(1))) //
')' 10767 if ( both_negative( &
10771 abs_mes =
'ABSOLUTE value of' 10778 deallocate(mask_array, judge, judge_rev)
10779 deallocate(answer_negative, check_negative, both_negative)
10785 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 10787 write(*,*)
' ' // trim(abs_mes) // &
10788 &
' check' // trim(pos_str) //
' = ', wrong
10789 write(*,*)
' is NOT GREATER THAN' 10790 write(*,*)
' ' // trim(abs_mes) // &
10791 &
' answer' // trim(pos_str) //
' = ', right
10795 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 10803 & message, answer, check, negative_support)
10806 character(*),
intent(in):: message
10807 real,
intent(in):: answer(:,:)
10808 real,
intent(in):: check(:,:)
10809 logical,
intent(in),
optional:: negative_support
10811 logical:: negative_support_on
10812 character(STRING):: pos_str
10813 character(TOKEN):: abs_mes
10814 real:: wrong, right
10816 integer:: answer_shape(2), check_shape(2), pos(2)
10817 logical:: consist_shape(2)
10818 character(TOKEN):: pos_array(2)
10819 integer,
allocatable:: mask_array(:,:)
10820 logical,
allocatable:: judge(:,:)
10821 logical,
allocatable:: judge_rev(:,:)
10822 logical,
allocatable:: answer_negative(:,:)
10823 logical,
allocatable:: check_negative(:,:)
10824 logical,
allocatable:: both_negative(:,:)
10828 if (
present(negative_support))
then 10829 negative_support_on = negative_support
10831 negative_support_on = .true.
10837 answer_shape = shape(answer)
10838 check_shape = shape(check)
10840 consist_shape = answer_shape == check_shape
10842 if (.not. all(consist_shape))
then 10843 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 10845 write(*,*)
' shape of check is (', check_shape,
')' 10846 write(*,*)
' is INCORRECT' 10847 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 10853 allocate( mask_array( &
10854 & answer_shape(1), &
10856 & answer_shape(2) ) &
10860 & answer_shape(1), &
10862 & answer_shape(2) ) &
10865 allocate( judge_rev( &
10866 & answer_shape(1), &
10868 & answer_shape(2) ) &
10871 allocate( answer_negative( &
10872 & answer_shape(1), &
10874 & answer_shape(2) ) &
10877 allocate( check_negative( &
10878 & answer_shape(1), &
10880 & answer_shape(2) ) &
10883 allocate( both_negative( &
10884 & answer_shape(1), &
10886 & answer_shape(2) ) &
10889 answer_negative = answer < 0.0
10890 check_negative = check < 0.0
10891 both_negative = answer_negative .and. check_negative
10892 if (.not. negative_support_on) both_negative = .false.
10894 judge = answer < check
10895 where (both_negative) judge = .not. judge
10897 judge_rev = .not. judge
10898 err_flag = any(judge_rev)
10900 pos = maxloc(mask_array, judge_rev)
10914 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
10916 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
10920 & trim(adjustl(pos_array(1))) //
',' // &
10922 & trim(adjustl(pos_array(2))) //
')' 10924 if ( both_negative( &
10929 abs_mes =
'ABSOLUTE value of' 10936 deallocate(mask_array, judge, judge_rev)
10937 deallocate(answer_negative, check_negative, both_negative)
10943 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 10945 write(*,*)
' ' // trim(abs_mes) // &
10946 &
' check' // trim(pos_str) //
' = ', wrong
10947 write(*,*)
' is NOT GREATER THAN' 10948 write(*,*)
' ' // trim(abs_mes) // &
10949 &
' answer' // trim(pos_str) //
' = ', right
10953 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 10961 & message, answer, check, negative_support)
10964 character(*),
intent(in):: message
10965 real,
intent(in):: answer(:,:,:)
10966 real,
intent(in):: check(:,:,:)
10967 logical,
intent(in),
optional:: negative_support
10969 logical:: negative_support_on
10970 character(STRING):: pos_str
10971 character(TOKEN):: abs_mes
10972 real:: wrong, right
10974 integer:: answer_shape(3), check_shape(3), pos(3)
10975 logical:: consist_shape(3)
10976 character(TOKEN):: pos_array(3)
10977 integer,
allocatable:: mask_array(:,:,:)
10978 logical,
allocatable:: judge(:,:,:)
10979 logical,
allocatable:: judge_rev(:,:,:)
10980 logical,
allocatable:: answer_negative(:,:,:)
10981 logical,
allocatable:: check_negative(:,:,:)
10982 logical,
allocatable:: both_negative(:,:,:)
10986 if (
present(negative_support))
then 10987 negative_support_on = negative_support
10989 negative_support_on = .true.
10995 answer_shape = shape(answer)
10996 check_shape = shape(check)
10998 consist_shape = answer_shape == check_shape
11000 if (.not. all(consist_shape))
then 11001 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 11003 write(*,*)
' shape of check is (', check_shape,
')' 11004 write(*,*)
' is INCORRECT' 11005 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 11011 allocate( mask_array( &
11012 & answer_shape(1), &
11014 & answer_shape(2), &
11016 & answer_shape(3) ) &
11020 & answer_shape(1), &
11022 & answer_shape(2), &
11024 & answer_shape(3) ) &
11027 allocate( judge_rev( &
11028 & answer_shape(1), &
11030 & answer_shape(2), &
11032 & answer_shape(3) ) &
11035 allocate( answer_negative( &
11036 & answer_shape(1), &
11038 & answer_shape(2), &
11040 & answer_shape(3) ) &
11043 allocate( check_negative( &
11044 & answer_shape(1), &
11046 & answer_shape(2), &
11048 & answer_shape(3) ) &
11051 allocate( both_negative( &
11052 & answer_shape(1), &
11054 & answer_shape(2), &
11056 & answer_shape(3) ) &
11059 answer_negative = answer < 0.0
11060 check_negative = check < 0.0
11061 both_negative = answer_negative .and. check_negative
11062 if (.not. negative_support_on) both_negative = .false.
11064 judge = answer < check
11065 where (both_negative) judge = .not. judge
11067 judge_rev = .not. judge
11068 err_flag = any(judge_rev)
11070 pos = maxloc(mask_array, judge_rev)
11088 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
11090 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
11092 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
11096 & trim(adjustl(pos_array(1))) //
',' // &
11098 & trim(adjustl(pos_array(2))) //
',' // &
11100 & trim(adjustl(pos_array(3))) //
')' 11102 if ( both_negative( &
11109 abs_mes =
'ABSOLUTE value of' 11116 deallocate(mask_array, judge, judge_rev)
11117 deallocate(answer_negative, check_negative, both_negative)
11123 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 11125 write(*,*)
' ' // trim(abs_mes) // &
11126 &
' check' // trim(pos_str) //
' = ', wrong
11127 write(*,*)
' is NOT GREATER THAN' 11128 write(*,*)
' ' // trim(abs_mes) // &
11129 &
' answer' // trim(pos_str) //
' = ', right
11133 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 11141 & message, answer, check, negative_support)
11144 character(*),
intent(in):: message
11145 real,
intent(in):: answer(:,:,:,:)
11146 real,
intent(in):: check(:,:,:,:)
11147 logical,
intent(in),
optional:: negative_support
11149 logical:: negative_support_on
11150 character(STRING):: pos_str
11151 character(TOKEN):: abs_mes
11152 real:: wrong, right
11154 integer:: answer_shape(4), check_shape(4), pos(4)
11155 logical:: consist_shape(4)
11156 character(TOKEN):: pos_array(4)
11157 integer,
allocatable:: mask_array(:,:,:,:)
11158 logical,
allocatable:: judge(:,:,:,:)
11159 logical,
allocatable:: judge_rev(:,:,:,:)
11160 logical,
allocatable:: answer_negative(:,:,:,:)
11161 logical,
allocatable:: check_negative(:,:,:,:)
11162 logical,
allocatable:: both_negative(:,:,:,:)
11166 if (
present(negative_support))
then 11167 negative_support_on = negative_support
11169 negative_support_on = .true.
11175 answer_shape = shape(answer)
11176 check_shape = shape(check)
11178 consist_shape = answer_shape == check_shape
11180 if (.not. all(consist_shape))
then 11181 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 11183 write(*,*)
' shape of check is (', check_shape,
')' 11184 write(*,*)
' is INCORRECT' 11185 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 11191 allocate( mask_array( &
11192 & answer_shape(1), &
11194 & answer_shape(2), &
11196 & answer_shape(3), &
11198 & answer_shape(4) ) &
11202 & answer_shape(1), &
11204 & answer_shape(2), &
11206 & answer_shape(3), &
11208 & answer_shape(4) ) &
11211 allocate( judge_rev( &
11212 & answer_shape(1), &
11214 & answer_shape(2), &
11216 & answer_shape(3), &
11218 & answer_shape(4) ) &
11221 allocate( answer_negative( &
11222 & answer_shape(1), &
11224 & answer_shape(2), &
11226 & answer_shape(3), &
11228 & answer_shape(4) ) &
11231 allocate( check_negative( &
11232 & answer_shape(1), &
11234 & answer_shape(2), &
11236 & answer_shape(3), &
11238 & answer_shape(4) ) &
11241 allocate( both_negative( &
11242 & answer_shape(1), &
11244 & answer_shape(2), &
11246 & answer_shape(3), &
11248 & answer_shape(4) ) &
11251 answer_negative = answer < 0.0
11252 check_negative = check < 0.0
11253 both_negative = answer_negative .and. check_negative
11254 if (.not. negative_support_on) both_negative = .false.
11256 judge = answer < check
11257 where (both_negative) judge = .not. judge
11259 judge_rev = .not. judge
11260 err_flag = any(judge_rev)
11262 pos = maxloc(mask_array, judge_rev)
11284 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
11286 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
11288 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
11290 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
11294 & trim(adjustl(pos_array(1))) //
',' // &
11296 & trim(adjustl(pos_array(2))) //
',' // &
11298 & trim(adjustl(pos_array(3))) //
',' // &
11300 & trim(adjustl(pos_array(4))) //
')' 11302 if ( both_negative( &
11311 abs_mes =
'ABSOLUTE value of' 11318 deallocate(mask_array, judge, judge_rev)
11319 deallocate(answer_negative, check_negative, both_negative)
11325 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 11327 write(*,*)
' ' // trim(abs_mes) // &
11328 &
' check' // trim(pos_str) //
' = ', wrong
11329 write(*,*)
' is NOT GREATER THAN' 11330 write(*,*)
' ' // trim(abs_mes) // &
11331 &
' answer' // trim(pos_str) //
' = ', right
11335 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 11343 & message, answer, check, negative_support)
11346 character(*),
intent(in):: message
11347 real,
intent(in):: answer(:,:,:,:,:)
11348 real,
intent(in):: check(:,:,:,:,:)
11349 logical,
intent(in),
optional:: negative_support
11351 logical:: negative_support_on
11352 character(STRING):: pos_str
11353 character(TOKEN):: abs_mes
11354 real:: wrong, right
11356 integer:: answer_shape(5), check_shape(5), pos(5)
11357 logical:: consist_shape(5)
11358 character(TOKEN):: pos_array(5)
11359 integer,
allocatable:: mask_array(:,:,:,:,:)
11360 logical,
allocatable:: judge(:,:,:,:,:)
11361 logical,
allocatable:: judge_rev(:,:,:,:,:)
11362 logical,
allocatable:: answer_negative(:,:,:,:,:)
11363 logical,
allocatable:: check_negative(:,:,:,:,:)
11364 logical,
allocatable:: both_negative(:,:,:,:,:)
11368 if (
present(negative_support))
then 11369 negative_support_on = negative_support
11371 negative_support_on = .true.
11377 answer_shape = shape(answer)
11378 check_shape = shape(check)
11380 consist_shape = answer_shape == check_shape
11382 if (.not. all(consist_shape))
then 11383 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 11385 write(*,*)
' shape of check is (', check_shape,
')' 11386 write(*,*)
' is INCORRECT' 11387 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 11393 allocate( mask_array( &
11394 & answer_shape(1), &
11396 & answer_shape(2), &
11398 & answer_shape(3), &
11400 & answer_shape(4), &
11402 & answer_shape(5) ) &
11406 & answer_shape(1), &
11408 & answer_shape(2), &
11410 & answer_shape(3), &
11412 & answer_shape(4), &
11414 & answer_shape(5) ) &
11417 allocate( judge_rev( &
11418 & answer_shape(1), &
11420 & answer_shape(2), &
11422 & answer_shape(3), &
11424 & answer_shape(4), &
11426 & answer_shape(5) ) &
11429 allocate( answer_negative( &
11430 & answer_shape(1), &
11432 & answer_shape(2), &
11434 & answer_shape(3), &
11436 & answer_shape(4), &
11438 & answer_shape(5) ) &
11441 allocate( check_negative( &
11442 & answer_shape(1), &
11444 & answer_shape(2), &
11446 & answer_shape(3), &
11448 & answer_shape(4), &
11450 & answer_shape(5) ) &
11453 allocate( both_negative( &
11454 & answer_shape(1), &
11456 & answer_shape(2), &
11458 & answer_shape(3), &
11460 & answer_shape(4), &
11462 & answer_shape(5) ) &
11465 answer_negative = answer < 0.0
11466 check_negative = check < 0.0
11467 both_negative = answer_negative .and. check_negative
11468 if (.not. negative_support_on) both_negative = .false.
11470 judge = answer < check
11471 where (both_negative) judge = .not. judge
11473 judge_rev = .not. judge
11474 err_flag = any(judge_rev)
11476 pos = maxloc(mask_array, judge_rev)
11502 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
11504 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
11506 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
11508 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
11510 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
11514 & trim(adjustl(pos_array(1))) //
',' // &
11516 & trim(adjustl(pos_array(2))) //
',' // &
11518 & trim(adjustl(pos_array(3))) //
',' // &
11520 & trim(adjustl(pos_array(4))) //
',' // &
11522 & trim(adjustl(pos_array(5))) //
')' 11524 if ( both_negative( &
11535 abs_mes =
'ABSOLUTE value of' 11542 deallocate(mask_array, judge, judge_rev)
11543 deallocate(answer_negative, check_negative, both_negative)
11549 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 11551 write(*,*)
' ' // trim(abs_mes) // &
11552 &
' check' // trim(pos_str) //
' = ', wrong
11553 write(*,*)
' is NOT GREATER THAN' 11554 write(*,*)
' ' // trim(abs_mes) // &
11555 &
' answer' // trim(pos_str) //
' = ', right
11559 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 11567 & message, answer, check, negative_support)
11570 character(*),
intent(in):: message
11571 real,
intent(in):: answer(:,:,:,:,:,:)
11572 real,
intent(in):: check(:,:,:,:,:,:)
11573 logical,
intent(in),
optional:: negative_support
11575 logical:: negative_support_on
11576 character(STRING):: pos_str
11577 character(TOKEN):: abs_mes
11578 real:: wrong, right
11580 integer:: answer_shape(6), check_shape(6), pos(6)
11581 logical:: consist_shape(6)
11582 character(TOKEN):: pos_array(6)
11583 integer,
allocatable:: mask_array(:,:,:,:,:,:)
11584 logical,
allocatable:: judge(:,:,:,:,:,:)
11585 logical,
allocatable:: judge_rev(:,:,:,:,:,:)
11586 logical,
allocatable:: answer_negative(:,:,:,:,:,:)
11587 logical,
allocatable:: check_negative(:,:,:,:,:,:)
11588 logical,
allocatable:: both_negative(:,:,:,:,:,:)
11592 if (
present(negative_support))
then 11593 negative_support_on = negative_support
11595 negative_support_on = .true.
11601 answer_shape = shape(answer)
11602 check_shape = shape(check)
11604 consist_shape = answer_shape == check_shape
11606 if (.not. all(consist_shape))
then 11607 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 11609 write(*,*)
' shape of check is (', check_shape,
')' 11610 write(*,*)
' is INCORRECT' 11611 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 11617 allocate( mask_array( &
11618 & answer_shape(1), &
11620 & answer_shape(2), &
11622 & answer_shape(3), &
11624 & answer_shape(4), &
11626 & answer_shape(5), &
11628 & answer_shape(6) ) &
11632 & answer_shape(1), &
11634 & answer_shape(2), &
11636 & answer_shape(3), &
11638 & answer_shape(4), &
11640 & answer_shape(5), &
11642 & answer_shape(6) ) &
11645 allocate( judge_rev( &
11646 & answer_shape(1), &
11648 & answer_shape(2), &
11650 & answer_shape(3), &
11652 & answer_shape(4), &
11654 & answer_shape(5), &
11656 & answer_shape(6) ) &
11659 allocate( answer_negative( &
11660 & answer_shape(1), &
11662 & answer_shape(2), &
11664 & answer_shape(3), &
11666 & answer_shape(4), &
11668 & answer_shape(5), &
11670 & answer_shape(6) ) &
11673 allocate( check_negative( &
11674 & answer_shape(1), &
11676 & answer_shape(2), &
11678 & answer_shape(3), &
11680 & answer_shape(4), &
11682 & answer_shape(5), &
11684 & answer_shape(6) ) &
11687 allocate( both_negative( &
11688 & answer_shape(1), &
11690 & answer_shape(2), &
11692 & answer_shape(3), &
11694 & answer_shape(4), &
11696 & answer_shape(5), &
11698 & answer_shape(6) ) &
11701 answer_negative = answer < 0.0
11702 check_negative = check < 0.0
11703 both_negative = answer_negative .and. check_negative
11704 if (.not. negative_support_on) both_negative = .false.
11706 judge = answer < check
11707 where (both_negative) judge = .not. judge
11709 judge_rev = .not. judge
11710 err_flag = any(judge_rev)
11712 pos = maxloc(mask_array, judge_rev)
11742 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
11744 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
11746 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
11748 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
11750 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
11752 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
11756 & trim(adjustl(pos_array(1))) //
',' // &
11758 & trim(adjustl(pos_array(2))) //
',' // &
11760 & trim(adjustl(pos_array(3))) //
',' // &
11762 & trim(adjustl(pos_array(4))) //
',' // &
11764 & trim(adjustl(pos_array(5))) //
',' // &
11766 & trim(adjustl(pos_array(6))) //
')' 11768 if ( both_negative( &
11781 abs_mes =
'ABSOLUTE value of' 11788 deallocate(mask_array, judge, judge_rev)
11789 deallocate(answer_negative, check_negative, both_negative)
11795 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 11797 write(*,*)
' ' // trim(abs_mes) // &
11798 &
' check' // trim(pos_str) //
' = ', wrong
11799 write(*,*)
' is NOT GREATER THAN' 11800 write(*,*)
' ' // trim(abs_mes) // &
11801 &
' answer' // trim(pos_str) //
' = ', right
11805 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 11813 & message, answer, check, negative_support)
11816 character(*),
intent(in):: message
11817 real,
intent(in):: answer(:,:,:,:,:,:,:)
11818 real,
intent(in):: check(:,:,:,:,:,:,:)
11819 logical,
intent(in),
optional:: negative_support
11821 logical:: negative_support_on
11822 character(STRING):: pos_str
11823 character(TOKEN):: abs_mes
11824 real:: wrong, right
11826 integer:: answer_shape(7), check_shape(7), pos(7)
11827 logical:: consist_shape(7)
11828 character(TOKEN):: pos_array(7)
11829 integer,
allocatable:: mask_array(:,:,:,:,:,:,:)
11830 logical,
allocatable:: judge(:,:,:,:,:,:,:)
11831 logical,
allocatable:: judge_rev(:,:,:,:,:,:,:)
11832 logical,
allocatable:: answer_negative(:,:,:,:,:,:,:)
11833 logical,
allocatable:: check_negative(:,:,:,:,:,:,:)
11834 logical,
allocatable:: both_negative(:,:,:,:,:,:,:)
11838 if (
present(negative_support))
then 11839 negative_support_on = negative_support
11841 negative_support_on = .true.
11847 answer_shape = shape(answer)
11848 check_shape = shape(check)
11850 consist_shape = answer_shape == check_shape
11852 if (.not. all(consist_shape))
then 11853 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 11855 write(*,*)
' shape of check is (', check_shape,
')' 11856 write(*,*)
' is INCORRECT' 11857 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 11863 allocate( mask_array( &
11864 & answer_shape(1), &
11866 & answer_shape(2), &
11868 & answer_shape(3), &
11870 & answer_shape(4), &
11872 & answer_shape(5), &
11874 & answer_shape(6), &
11876 & answer_shape(7) ) &
11880 & answer_shape(1), &
11882 & answer_shape(2), &
11884 & answer_shape(3), &
11886 & answer_shape(4), &
11888 & answer_shape(5), &
11890 & answer_shape(6), &
11892 & answer_shape(7) ) &
11895 allocate( judge_rev( &
11896 & answer_shape(1), &
11898 & answer_shape(2), &
11900 & answer_shape(3), &
11902 & answer_shape(4), &
11904 & answer_shape(5), &
11906 & answer_shape(6), &
11908 & answer_shape(7) ) &
11911 allocate( answer_negative( &
11912 & answer_shape(1), &
11914 & answer_shape(2), &
11916 & answer_shape(3), &
11918 & answer_shape(4), &
11920 & answer_shape(5), &
11922 & answer_shape(6), &
11924 & answer_shape(7) ) &
11927 allocate( check_negative( &
11928 & answer_shape(1), &
11930 & answer_shape(2), &
11932 & answer_shape(3), &
11934 & answer_shape(4), &
11936 & answer_shape(5), &
11938 & answer_shape(6), &
11940 & answer_shape(7) ) &
11943 allocate( both_negative( &
11944 & answer_shape(1), &
11946 & answer_shape(2), &
11948 & answer_shape(3), &
11950 & answer_shape(4), &
11952 & answer_shape(5), &
11954 & answer_shape(6), &
11956 & answer_shape(7) ) &
11959 answer_negative = answer < 0.0
11960 check_negative = check < 0.0
11961 both_negative = answer_negative .and. check_negative
11962 if (.not. negative_support_on) both_negative = .false.
11964 judge = answer < check
11965 where (both_negative) judge = .not. judge
11967 judge_rev = .not. judge
11968 err_flag = any(judge_rev)
11970 pos = maxloc(mask_array, judge_rev)
12004 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
12006 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
12008 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
12010 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
12012 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
12014 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
12016 write(unit=pos_array(7), fmt=
"(i20)") pos(7)
12020 & trim(adjustl(pos_array(1))) //
',' // &
12022 & trim(adjustl(pos_array(2))) //
',' // &
12024 & trim(adjustl(pos_array(3))) //
',' // &
12026 & trim(adjustl(pos_array(4))) //
',' // &
12028 & trim(adjustl(pos_array(5))) //
',' // &
12030 & trim(adjustl(pos_array(6))) //
',' // &
12032 & trim(adjustl(pos_array(7))) //
')' 12034 if ( both_negative( &
12049 abs_mes =
'ABSOLUTE value of' 12056 deallocate(mask_array, judge, judge_rev)
12057 deallocate(answer_negative, check_negative, both_negative)
12063 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 12065 write(*,*)
' ' // trim(abs_mes) // &
12066 &
' check' // trim(pos_str) //
' = ', wrong
12067 write(*,*)
' is NOT GREATER THAN' 12068 write(*,*)
' ' // trim(abs_mes) // &
12069 &
' answer' // trim(pos_str) //
' = ', right
12073 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 12081 & message, answer, check, negative_support)
12084 character(*),
intent(in):: message
12085 real(DP),
intent(in):: answer
12086 real(DP),
intent(in):: check
12087 logical,
intent(in),
optional:: negative_support
12089 logical:: negative_support_on
12090 character(STRING):: pos_str
12091 character(TOKEN):: abs_mes
12092 real(DP):: wrong, right
12097 if (
present(negative_support))
then 12098 negative_support_on = negative_support
12100 negative_support_on = .true.
12106 err_flag = .not. answer < check
12109 if ( answer < 0.0_dp &
12110 & .and. check < 0.0_dp &
12111 & .and. negative_support_on )
then 12113 err_flag = .not. err_flag
12114 abs_mes =
'ABSOLUTE value of' 12125 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 12127 write(*,*)
' ' // trim(abs_mes) // &
12128 &
' check' // trim(pos_str) //
' = ', wrong
12129 write(*,*)
' is NOT GREATER THAN' 12130 write(*,*)
' ' // trim(abs_mes) // &
12131 &
' answer' // trim(pos_str) //
' = ', right
12135 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 12143 & message, answer, check, negative_support)
12146 character(*),
intent(in):: message
12147 real(DP),
intent(in):: answer(:)
12148 real(DP),
intent(in):: check(:)
12149 logical,
intent(in),
optional:: negative_support
12151 logical:: negative_support_on
12152 character(STRING):: pos_str
12153 character(TOKEN):: abs_mes
12154 real(DP):: wrong, right
12156 integer:: answer_shape(1), check_shape(1), pos(1)
12157 logical:: consist_shape(1)
12158 character(TOKEN):: pos_array(1)
12159 integer,
allocatable:: mask_array(:)
12160 logical,
allocatable:: judge(:)
12161 logical,
allocatable:: judge_rev(:)
12162 logical,
allocatable:: answer_negative(:)
12163 logical,
allocatable:: check_negative(:)
12164 logical,
allocatable:: both_negative(:)
12168 if (
present(negative_support))
then 12169 negative_support_on = negative_support
12171 negative_support_on = .true.
12177 answer_shape = shape(answer)
12178 check_shape = shape(check)
12180 consist_shape = answer_shape == check_shape
12182 if (.not. all(consist_shape))
then 12183 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 12185 write(*,*)
' shape of check is (', check_shape,
')' 12186 write(*,*)
' is INCORRECT' 12187 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 12193 allocate( mask_array( &
12195 & answer_shape(1) ) &
12200 & answer_shape(1) ) &
12203 allocate( judge_rev( &
12205 & answer_shape(1) ) &
12208 allocate( answer_negative( &
12210 & answer_shape(1) ) &
12213 allocate( check_negative( &
12215 & answer_shape(1) ) &
12218 allocate( both_negative( &
12220 & answer_shape(1) ) &
12223 answer_negative = answer < 0.0_dp
12224 check_negative = check < 0.0_dp
12225 both_negative = answer_negative .and. check_negative
12226 if (.not. negative_support_on) both_negative = .false.
12228 judge = answer < check
12229 where (both_negative) judge = .not. judge
12231 judge_rev = .not. judge
12232 err_flag = any(judge_rev)
12234 pos = maxloc(mask_array, judge_rev)
12246 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
12251 & trim(adjustl(pos_array(1))) //
')' 12253 if ( both_negative( &
12257 abs_mes =
'ABSOLUTE value of' 12264 deallocate(mask_array, judge, judge_rev)
12265 deallocate(answer_negative, check_negative, both_negative)
12271 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 12273 write(*,*)
' ' // trim(abs_mes) // &
12274 &
' check' // trim(pos_str) //
' = ', wrong
12275 write(*,*)
' is NOT GREATER THAN' 12276 write(*,*)
' ' // trim(abs_mes) // &
12277 &
' answer' // trim(pos_str) //
' = ', right
12281 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 12289 & message, answer, check, negative_support)
12292 character(*),
intent(in):: message
12293 real(DP),
intent(in):: answer(:,:)
12294 real(DP),
intent(in):: check(:,:)
12295 logical,
intent(in),
optional:: negative_support
12297 logical:: negative_support_on
12298 character(STRING):: pos_str
12299 character(TOKEN):: abs_mes
12300 real(DP):: wrong, right
12302 integer:: answer_shape(2), check_shape(2), pos(2)
12303 logical:: consist_shape(2)
12304 character(TOKEN):: pos_array(2)
12305 integer,
allocatable:: mask_array(:,:)
12306 logical,
allocatable:: judge(:,:)
12307 logical,
allocatable:: judge_rev(:,:)
12308 logical,
allocatable:: answer_negative(:,:)
12309 logical,
allocatable:: check_negative(:,:)
12310 logical,
allocatable:: both_negative(:,:)
12314 if (
present(negative_support))
then 12315 negative_support_on = negative_support
12317 negative_support_on = .true.
12323 answer_shape = shape(answer)
12324 check_shape = shape(check)
12326 consist_shape = answer_shape == check_shape
12328 if (.not. all(consist_shape))
then 12329 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 12331 write(*,*)
' shape of check is (', check_shape,
')' 12332 write(*,*)
' is INCORRECT' 12333 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 12339 allocate( mask_array( &
12340 & answer_shape(1), &
12342 & answer_shape(2) ) &
12346 & answer_shape(1), &
12348 & answer_shape(2) ) &
12351 allocate( judge_rev( &
12352 & answer_shape(1), &
12354 & answer_shape(2) ) &
12357 allocate( answer_negative( &
12358 & answer_shape(1), &
12360 & answer_shape(2) ) &
12363 allocate( check_negative( &
12364 & answer_shape(1), &
12366 & answer_shape(2) ) &
12369 allocate( both_negative( &
12370 & answer_shape(1), &
12372 & answer_shape(2) ) &
12375 answer_negative = answer < 0.0_dp
12376 check_negative = check < 0.0_dp
12377 both_negative = answer_negative .and. check_negative
12378 if (.not. negative_support_on) both_negative = .false.
12380 judge = answer < check
12381 where (both_negative) judge = .not. judge
12383 judge_rev = .not. judge
12384 err_flag = any(judge_rev)
12386 pos = maxloc(mask_array, judge_rev)
12400 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
12402 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
12406 & trim(adjustl(pos_array(1))) //
',' // &
12408 & trim(adjustl(pos_array(2))) //
')' 12410 if ( both_negative( &
12415 abs_mes =
'ABSOLUTE value of' 12422 deallocate(mask_array, judge, judge_rev)
12423 deallocate(answer_negative, check_negative, both_negative)
12429 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 12431 write(*,*)
' ' // trim(abs_mes) // &
12432 &
' check' // trim(pos_str) //
' = ', wrong
12433 write(*,*)
' is NOT GREATER THAN' 12434 write(*,*)
' ' // trim(abs_mes) // &
12435 &
' answer' // trim(pos_str) //
' = ', right
12439 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 12447 & message, answer, check, negative_support)
12450 character(*),
intent(in):: message
12451 real(DP),
intent(in):: answer(:,:,:)
12452 real(DP),
intent(in):: check(:,:,:)
12453 logical,
intent(in),
optional:: negative_support
12455 logical:: negative_support_on
12456 character(STRING):: pos_str
12457 character(TOKEN):: abs_mes
12458 real(DP):: wrong, right
12460 integer:: answer_shape(3), check_shape(3), pos(3)
12461 logical:: consist_shape(3)
12462 character(TOKEN):: pos_array(3)
12463 integer,
allocatable:: mask_array(:,:,:)
12464 logical,
allocatable:: judge(:,:,:)
12465 logical,
allocatable:: judge_rev(:,:,:)
12466 logical,
allocatable:: answer_negative(:,:,:)
12467 logical,
allocatable:: check_negative(:,:,:)
12468 logical,
allocatable:: both_negative(:,:,:)
12472 if (
present(negative_support))
then 12473 negative_support_on = negative_support
12475 negative_support_on = .true.
12481 answer_shape = shape(answer)
12482 check_shape = shape(check)
12484 consist_shape = answer_shape == check_shape
12486 if (.not. all(consist_shape))
then 12487 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 12489 write(*,*)
' shape of check is (', check_shape,
')' 12490 write(*,*)
' is INCORRECT' 12491 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 12497 allocate( mask_array( &
12498 & answer_shape(1), &
12500 & answer_shape(2), &
12502 & answer_shape(3) ) &
12506 & answer_shape(1), &
12508 & answer_shape(2), &
12510 & answer_shape(3) ) &
12513 allocate( judge_rev( &
12514 & answer_shape(1), &
12516 & answer_shape(2), &
12518 & answer_shape(3) ) &
12521 allocate( answer_negative( &
12522 & answer_shape(1), &
12524 & answer_shape(2), &
12526 & answer_shape(3) ) &
12529 allocate( check_negative( &
12530 & answer_shape(1), &
12532 & answer_shape(2), &
12534 & answer_shape(3) ) &
12537 allocate( both_negative( &
12538 & answer_shape(1), &
12540 & answer_shape(2), &
12542 & answer_shape(3) ) &
12545 answer_negative = answer < 0.0_dp
12546 check_negative = check < 0.0_dp
12547 both_negative = answer_negative .and. check_negative
12548 if (.not. negative_support_on) both_negative = .false.
12550 judge = answer < check
12551 where (both_negative) judge = .not. judge
12553 judge_rev = .not. judge
12554 err_flag = any(judge_rev)
12556 pos = maxloc(mask_array, judge_rev)
12574 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
12576 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
12578 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
12582 & trim(adjustl(pos_array(1))) //
',' // &
12584 & trim(adjustl(pos_array(2))) //
',' // &
12586 & trim(adjustl(pos_array(3))) //
')' 12588 if ( both_negative( &
12595 abs_mes =
'ABSOLUTE value of' 12602 deallocate(mask_array, judge, judge_rev)
12603 deallocate(answer_negative, check_negative, both_negative)
12609 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 12611 write(*,*)
' ' // trim(abs_mes) // &
12612 &
' check' // trim(pos_str) //
' = ', wrong
12613 write(*,*)
' is NOT GREATER THAN' 12614 write(*,*)
' ' // trim(abs_mes) // &
12615 &
' answer' // trim(pos_str) //
' = ', right
12619 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 12627 & message, answer, check, negative_support)
12630 character(*),
intent(in):: message
12631 real(DP),
intent(in):: answer(:,:,:,:)
12632 real(DP),
intent(in):: check(:,:,:,:)
12633 logical,
intent(in),
optional:: negative_support
12635 logical:: negative_support_on
12636 character(STRING):: pos_str
12637 character(TOKEN):: abs_mes
12638 real(DP):: wrong, right
12640 integer:: answer_shape(4), check_shape(4), pos(4)
12641 logical:: consist_shape(4)
12642 character(TOKEN):: pos_array(4)
12643 integer,
allocatable:: mask_array(:,:,:,:)
12644 logical,
allocatable:: judge(:,:,:,:)
12645 logical,
allocatable:: judge_rev(:,:,:,:)
12646 logical,
allocatable:: answer_negative(:,:,:,:)
12647 logical,
allocatable:: check_negative(:,:,:,:)
12648 logical,
allocatable:: both_negative(:,:,:,:)
12652 if (
present(negative_support))
then 12653 negative_support_on = negative_support
12655 negative_support_on = .true.
12661 answer_shape = shape(answer)
12662 check_shape = shape(check)
12664 consist_shape = answer_shape == check_shape
12666 if (.not. all(consist_shape))
then 12667 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 12669 write(*,*)
' shape of check is (', check_shape,
')' 12670 write(*,*)
' is INCORRECT' 12671 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 12677 allocate( mask_array( &
12678 & answer_shape(1), &
12680 & answer_shape(2), &
12682 & answer_shape(3), &
12684 & answer_shape(4) ) &
12688 & answer_shape(1), &
12690 & answer_shape(2), &
12692 & answer_shape(3), &
12694 & answer_shape(4) ) &
12697 allocate( judge_rev( &
12698 & answer_shape(1), &
12700 & answer_shape(2), &
12702 & answer_shape(3), &
12704 & answer_shape(4) ) &
12707 allocate( answer_negative( &
12708 & answer_shape(1), &
12710 & answer_shape(2), &
12712 & answer_shape(3), &
12714 & answer_shape(4) ) &
12717 allocate( check_negative( &
12718 & answer_shape(1), &
12720 & answer_shape(2), &
12722 & answer_shape(3), &
12724 & answer_shape(4) ) &
12727 allocate( both_negative( &
12728 & answer_shape(1), &
12730 & answer_shape(2), &
12732 & answer_shape(3), &
12734 & answer_shape(4) ) &
12737 answer_negative = answer < 0.0_dp
12738 check_negative = check < 0.0_dp
12739 both_negative = answer_negative .and. check_negative
12740 if (.not. negative_support_on) both_negative = .false.
12742 judge = answer < check
12743 where (both_negative) judge = .not. judge
12745 judge_rev = .not. judge
12746 err_flag = any(judge_rev)
12748 pos = maxloc(mask_array, judge_rev)
12770 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
12772 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
12774 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
12776 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
12780 & trim(adjustl(pos_array(1))) //
',' // &
12782 & trim(adjustl(pos_array(2))) //
',' // &
12784 & trim(adjustl(pos_array(3))) //
',' // &
12786 & trim(adjustl(pos_array(4))) //
')' 12788 if ( both_negative( &
12797 abs_mes =
'ABSOLUTE value of' 12804 deallocate(mask_array, judge, judge_rev)
12805 deallocate(answer_negative, check_negative, both_negative)
12811 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 12813 write(*,*)
' ' // trim(abs_mes) // &
12814 &
' check' // trim(pos_str) //
' = ', wrong
12815 write(*,*)
' is NOT GREATER THAN' 12816 write(*,*)
' ' // trim(abs_mes) // &
12817 &
' answer' // trim(pos_str) //
' = ', right
12821 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 12829 & message, answer, check, negative_support)
12832 character(*),
intent(in):: message
12833 real(DP),
intent(in):: answer(:,:,:,:,:)
12834 real(DP),
intent(in):: check(:,:,:,:,:)
12835 logical,
intent(in),
optional:: negative_support
12837 logical:: negative_support_on
12838 character(STRING):: pos_str
12839 character(TOKEN):: abs_mes
12840 real(DP):: wrong, right
12842 integer:: answer_shape(5), check_shape(5), pos(5)
12843 logical:: consist_shape(5)
12844 character(TOKEN):: pos_array(5)
12845 integer,
allocatable:: mask_array(:,:,:,:,:)
12846 logical,
allocatable:: judge(:,:,:,:,:)
12847 logical,
allocatable:: judge_rev(:,:,:,:,:)
12848 logical,
allocatable:: answer_negative(:,:,:,:,:)
12849 logical,
allocatable:: check_negative(:,:,:,:,:)
12850 logical,
allocatable:: both_negative(:,:,:,:,:)
12854 if (
present(negative_support))
then 12855 negative_support_on = negative_support
12857 negative_support_on = .true.
12863 answer_shape = shape(answer)
12864 check_shape = shape(check)
12866 consist_shape = answer_shape == check_shape
12868 if (.not. all(consist_shape))
then 12869 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 12871 write(*,*)
' shape of check is (', check_shape,
')' 12872 write(*,*)
' is INCORRECT' 12873 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 12879 allocate( mask_array( &
12880 & answer_shape(1), &
12882 & answer_shape(2), &
12884 & answer_shape(3), &
12886 & answer_shape(4), &
12888 & answer_shape(5) ) &
12892 & answer_shape(1), &
12894 & answer_shape(2), &
12896 & answer_shape(3), &
12898 & answer_shape(4), &
12900 & answer_shape(5) ) &
12903 allocate( judge_rev( &
12904 & answer_shape(1), &
12906 & answer_shape(2), &
12908 & answer_shape(3), &
12910 & answer_shape(4), &
12912 & answer_shape(5) ) &
12915 allocate( answer_negative( &
12916 & answer_shape(1), &
12918 & answer_shape(2), &
12920 & answer_shape(3), &
12922 & answer_shape(4), &
12924 & answer_shape(5) ) &
12927 allocate( check_negative( &
12928 & answer_shape(1), &
12930 & answer_shape(2), &
12932 & answer_shape(3), &
12934 & answer_shape(4), &
12936 & answer_shape(5) ) &
12939 allocate( both_negative( &
12940 & answer_shape(1), &
12942 & answer_shape(2), &
12944 & answer_shape(3), &
12946 & answer_shape(4), &
12948 & answer_shape(5) ) &
12951 answer_negative = answer < 0.0_dp
12952 check_negative = check < 0.0_dp
12953 both_negative = answer_negative .and. check_negative
12954 if (.not. negative_support_on) both_negative = .false.
12956 judge = answer < check
12957 where (both_negative) judge = .not. judge
12959 judge_rev = .not. judge
12960 err_flag = any(judge_rev)
12962 pos = maxloc(mask_array, judge_rev)
12988 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
12990 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
12992 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
12994 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
12996 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
13000 & trim(adjustl(pos_array(1))) //
',' // &
13002 & trim(adjustl(pos_array(2))) //
',' // &
13004 & trim(adjustl(pos_array(3))) //
',' // &
13006 & trim(adjustl(pos_array(4))) //
',' // &
13008 & trim(adjustl(pos_array(5))) //
')' 13010 if ( both_negative( &
13021 abs_mes =
'ABSOLUTE value of' 13028 deallocate(mask_array, judge, judge_rev)
13029 deallocate(answer_negative, check_negative, both_negative)
13035 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 13037 write(*,*)
' ' // trim(abs_mes) // &
13038 &
' check' // trim(pos_str) //
' = ', wrong
13039 write(*,*)
' is NOT GREATER THAN' 13040 write(*,*)
' ' // trim(abs_mes) // &
13041 &
' answer' // trim(pos_str) //
' = ', right
13045 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 13053 & message, answer, check, negative_support)
13056 character(*),
intent(in):: message
13057 real(DP),
intent(in):: answer(:,:,:,:,:,:)
13058 real(DP),
intent(in):: check(:,:,:,:,:,:)
13059 logical,
intent(in),
optional:: negative_support
13061 logical:: negative_support_on
13062 character(STRING):: pos_str
13063 character(TOKEN):: abs_mes
13064 real(DP):: wrong, right
13066 integer:: answer_shape(6), check_shape(6), pos(6)
13067 logical:: consist_shape(6)
13068 character(TOKEN):: pos_array(6)
13069 integer,
allocatable:: mask_array(:,:,:,:,:,:)
13070 logical,
allocatable:: judge(:,:,:,:,:,:)
13071 logical,
allocatable:: judge_rev(:,:,:,:,:,:)
13072 logical,
allocatable:: answer_negative(:,:,:,:,:,:)
13073 logical,
allocatable:: check_negative(:,:,:,:,:,:)
13074 logical,
allocatable:: both_negative(:,:,:,:,:,:)
13078 if (
present(negative_support))
then 13079 negative_support_on = negative_support
13081 negative_support_on = .true.
13087 answer_shape = shape(answer)
13088 check_shape = shape(check)
13090 consist_shape = answer_shape == check_shape
13092 if (.not. all(consist_shape))
then 13093 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 13095 write(*,*)
' shape of check is (', check_shape,
')' 13096 write(*,*)
' is INCORRECT' 13097 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 13103 allocate( mask_array( &
13104 & answer_shape(1), &
13106 & answer_shape(2), &
13108 & answer_shape(3), &
13110 & answer_shape(4), &
13112 & answer_shape(5), &
13114 & answer_shape(6) ) &
13118 & answer_shape(1), &
13120 & answer_shape(2), &
13122 & answer_shape(3), &
13124 & answer_shape(4), &
13126 & answer_shape(5), &
13128 & answer_shape(6) ) &
13131 allocate( judge_rev( &
13132 & answer_shape(1), &
13134 & answer_shape(2), &
13136 & answer_shape(3), &
13138 & answer_shape(4), &
13140 & answer_shape(5), &
13142 & answer_shape(6) ) &
13145 allocate( answer_negative( &
13146 & answer_shape(1), &
13148 & answer_shape(2), &
13150 & answer_shape(3), &
13152 & answer_shape(4), &
13154 & answer_shape(5), &
13156 & answer_shape(6) ) &
13159 allocate( check_negative( &
13160 & answer_shape(1), &
13162 & answer_shape(2), &
13164 & answer_shape(3), &
13166 & answer_shape(4), &
13168 & answer_shape(5), &
13170 & answer_shape(6) ) &
13173 allocate( both_negative( &
13174 & answer_shape(1), &
13176 & answer_shape(2), &
13178 & answer_shape(3), &
13180 & answer_shape(4), &
13182 & answer_shape(5), &
13184 & answer_shape(6) ) &
13187 answer_negative = answer < 0.0_dp
13188 check_negative = check < 0.0_dp
13189 both_negative = answer_negative .and. check_negative
13190 if (.not. negative_support_on) both_negative = .false.
13192 judge = answer < check
13193 where (both_negative) judge = .not. judge
13195 judge_rev = .not. judge
13196 err_flag = any(judge_rev)
13198 pos = maxloc(mask_array, judge_rev)
13228 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
13230 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
13232 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
13234 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
13236 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
13238 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
13242 & trim(adjustl(pos_array(1))) //
',' // &
13244 & trim(adjustl(pos_array(2))) //
',' // &
13246 & trim(adjustl(pos_array(3))) //
',' // &
13248 & trim(adjustl(pos_array(4))) //
',' // &
13250 & trim(adjustl(pos_array(5))) //
',' // &
13252 & trim(adjustl(pos_array(6))) //
')' 13254 if ( both_negative( &
13267 abs_mes =
'ABSOLUTE value of' 13274 deallocate(mask_array, judge, judge_rev)
13275 deallocate(answer_negative, check_negative, both_negative)
13281 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 13283 write(*,*)
' ' // trim(abs_mes) // &
13284 &
' check' // trim(pos_str) //
' = ', wrong
13285 write(*,*)
' is NOT GREATER THAN' 13286 write(*,*)
' ' // trim(abs_mes) // &
13287 &
' answer' // trim(pos_str) //
' = ', right
13291 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 13299 & message, answer, check, negative_support)
13302 character(*),
intent(in):: message
13303 real(DP),
intent(in):: answer(:,:,:,:,:,:,:)
13304 real(DP),
intent(in):: check(:,:,:,:,:,:,:)
13305 logical,
intent(in),
optional:: negative_support
13307 logical:: negative_support_on
13308 character(STRING):: pos_str
13309 character(TOKEN):: abs_mes
13310 real(DP):: wrong, right
13312 integer:: answer_shape(7), check_shape(7), pos(7)
13313 logical:: consist_shape(7)
13314 character(TOKEN):: pos_array(7)
13315 integer,
allocatable:: mask_array(:,:,:,:,:,:,:)
13316 logical,
allocatable:: judge(:,:,:,:,:,:,:)
13317 logical,
allocatable:: judge_rev(:,:,:,:,:,:,:)
13318 logical,
allocatable:: answer_negative(:,:,:,:,:,:,:)
13319 logical,
allocatable:: check_negative(:,:,:,:,:,:,:)
13320 logical,
allocatable:: both_negative(:,:,:,:,:,:,:)
13324 if (
present(negative_support))
then 13325 negative_support_on = negative_support
13327 negative_support_on = .true.
13333 answer_shape = shape(answer)
13334 check_shape = shape(check)
13336 consist_shape = answer_shape == check_shape
13338 if (.not. all(consist_shape))
then 13339 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 13341 write(*,*)
' shape of check is (', check_shape,
')' 13342 write(*,*)
' is INCORRECT' 13343 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 13349 allocate( mask_array( &
13350 & answer_shape(1), &
13352 & answer_shape(2), &
13354 & answer_shape(3), &
13356 & answer_shape(4), &
13358 & answer_shape(5), &
13360 & answer_shape(6), &
13362 & answer_shape(7) ) &
13366 & answer_shape(1), &
13368 & answer_shape(2), &
13370 & answer_shape(3), &
13372 & answer_shape(4), &
13374 & answer_shape(5), &
13376 & answer_shape(6), &
13378 & answer_shape(7) ) &
13381 allocate( judge_rev( &
13382 & answer_shape(1), &
13384 & answer_shape(2), &
13386 & answer_shape(3), &
13388 & answer_shape(4), &
13390 & answer_shape(5), &
13392 & answer_shape(6), &
13394 & answer_shape(7) ) &
13397 allocate( answer_negative( &
13398 & answer_shape(1), &
13400 & answer_shape(2), &
13402 & answer_shape(3), &
13404 & answer_shape(4), &
13406 & answer_shape(5), &
13408 & answer_shape(6), &
13410 & answer_shape(7) ) &
13413 allocate( check_negative( &
13414 & answer_shape(1), &
13416 & answer_shape(2), &
13418 & answer_shape(3), &
13420 & answer_shape(4), &
13422 & answer_shape(5), &
13424 & answer_shape(6), &
13426 & answer_shape(7) ) &
13429 allocate( both_negative( &
13430 & answer_shape(1), &
13432 & answer_shape(2), &
13434 & answer_shape(3), &
13436 & answer_shape(4), &
13438 & answer_shape(5), &
13440 & answer_shape(6), &
13442 & answer_shape(7) ) &
13445 answer_negative = answer < 0.0_dp
13446 check_negative = check < 0.0_dp
13447 both_negative = answer_negative .and. check_negative
13448 if (.not. negative_support_on) both_negative = .false.
13450 judge = answer < check
13451 where (both_negative) judge = .not. judge
13453 judge_rev = .not. judge
13454 err_flag = any(judge_rev)
13456 pos = maxloc(mask_array, judge_rev)
13490 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
13492 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
13494 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
13496 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
13498 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
13500 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
13502 write(unit=pos_array(7), fmt=
"(i20)") pos(7)
13506 & trim(adjustl(pos_array(1))) //
',' // &
13508 & trim(adjustl(pos_array(2))) //
',' // &
13510 & trim(adjustl(pos_array(3))) //
',' // &
13512 & trim(adjustl(pos_array(4))) //
',' // &
13514 & trim(adjustl(pos_array(5))) //
',' // &
13516 & trim(adjustl(pos_array(6))) //
',' // &
13518 & trim(adjustl(pos_array(7))) //
')' 13520 if ( both_negative( &
13535 abs_mes =
'ABSOLUTE value of' 13542 deallocate(mask_array, judge, judge_rev)
13543 deallocate(answer_negative, check_negative, both_negative)
13549 write(*,*)
' *** Error [AssertGT] *** Checking ' // trim(message) //
' FAILURE' 13551 write(*,*)
' ' // trim(abs_mes) // &
13552 &
' check' // trim(pos_str) //
' = ', wrong
13553 write(*,*)
' is NOT GREATER THAN' 13554 write(*,*)
' ' // trim(abs_mes) // &
13555 &
' answer' // trim(pos_str) //
' = ', right
13559 write(*,*)
' *** MESSAGE [AssertGT] *** Checking ' // trim(message) //
' OK' 13567 & message, answer, check, negative_support)
13570 character(*),
intent(in):: message
13571 integer,
intent(in):: answer
13572 integer,
intent(in):: check
13573 logical,
intent(in),
optional:: negative_support
13575 logical:: negative_support_on
13576 character(STRING):: pos_str
13577 character(TOKEN):: abs_mes
13578 integer:: wrong, right
13583 if (
present(negative_support))
then 13584 negative_support_on = negative_support
13586 negative_support_on = .true.
13594 err_flag = .not. answer > check
13598 & .and. check < 0 &
13599 & .and. negative_support_on )
then 13601 err_flag = .not. err_flag
13602 abs_mes =
'ABSOLUTE value of' 13613 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 13615 write(*,*)
' ' // trim(abs_mes) // &
13616 &
' check' // trim(pos_str) //
' = ', wrong
13617 write(*,*)
' is NOT LESS THAN' 13618 write(*,*)
' ' // trim(abs_mes) // &
13619 &
' answer' // trim(pos_str) //
' = ', right
13623 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 13631 & message, answer, check, negative_support)
13634 character(*),
intent(in):: message
13635 integer,
intent(in):: answer(:)
13636 integer,
intent(in):: check(:)
13637 logical,
intent(in),
optional:: negative_support
13639 logical:: negative_support_on
13640 character(STRING):: pos_str
13641 character(TOKEN):: abs_mes
13642 integer:: wrong, right
13644 integer:: answer_shape(1), check_shape(1), pos(1)
13645 logical:: consist_shape(1)
13646 character(TOKEN):: pos_array(1)
13647 integer,
allocatable:: mask_array(:)
13648 logical,
allocatable:: judge(:)
13649 logical,
allocatable:: judge_rev(:)
13650 logical,
allocatable:: answer_negative(:)
13651 logical,
allocatable:: check_negative(:)
13652 logical,
allocatable:: both_negative(:)
13656 if (
present(negative_support))
then 13657 negative_support_on = negative_support
13659 negative_support_on = .true.
13665 answer_shape = shape(answer)
13666 check_shape = shape(check)
13668 consist_shape = answer_shape == check_shape
13670 if (.not. all(consist_shape))
then 13671 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 13673 write(*,*)
' shape of check is (', check_shape,
')' 13674 write(*,*)
' is INCORRECT' 13675 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 13681 allocate( mask_array( &
13683 & answer_shape(1) ) &
13688 & answer_shape(1) ) &
13691 allocate( judge_rev( &
13693 & answer_shape(1) ) &
13696 allocate( answer_negative( &
13698 & answer_shape(1) ) &
13701 allocate( check_negative( &
13703 & answer_shape(1) ) &
13706 allocate( both_negative( &
13708 & answer_shape(1) ) &
13711 answer_negative = answer < 0
13712 check_negative = check < 0
13713 both_negative = answer_negative .and. check_negative
13714 if (.not. negative_support_on) both_negative = .false.
13716 judge = answer > check
13717 where (both_negative) judge = .not. judge
13719 judge_rev = .not. judge
13720 err_flag = any(judge_rev)
13722 pos = maxloc(mask_array, judge_rev)
13734 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
13739 & trim(adjustl(pos_array(1))) //
')' 13741 if ( both_negative( &
13745 abs_mes =
'ABSOLUTE value of' 13752 deallocate(mask_array, judge, judge_rev)
13753 deallocate(answer_negative, check_negative, both_negative)
13759 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 13761 write(*,*)
' ' // trim(abs_mes) // &
13762 &
' check' // trim(pos_str) //
' = ', wrong
13763 write(*,*)
' is NOT LESS THAN' 13764 write(*,*)
' ' // trim(abs_mes) // &
13765 &
' answer' // trim(pos_str) //
' = ', right
13769 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 13777 & message, answer, check, negative_support)
13780 character(*),
intent(in):: message
13781 integer,
intent(in):: answer(:,:)
13782 integer,
intent(in):: check(:,:)
13783 logical,
intent(in),
optional:: negative_support
13785 logical:: negative_support_on
13786 character(STRING):: pos_str
13787 character(TOKEN):: abs_mes
13788 integer:: wrong, right
13790 integer:: answer_shape(2), check_shape(2), pos(2)
13791 logical:: consist_shape(2)
13792 character(TOKEN):: pos_array(2)
13793 integer,
allocatable:: mask_array(:,:)
13794 logical,
allocatable:: judge(:,:)
13795 logical,
allocatable:: judge_rev(:,:)
13796 logical,
allocatable:: answer_negative(:,:)
13797 logical,
allocatable:: check_negative(:,:)
13798 logical,
allocatable:: both_negative(:,:)
13802 if (
present(negative_support))
then 13803 negative_support_on = negative_support
13805 negative_support_on = .true.
13811 answer_shape = shape(answer)
13812 check_shape = shape(check)
13814 consist_shape = answer_shape == check_shape
13816 if (.not. all(consist_shape))
then 13817 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 13819 write(*,*)
' shape of check is (', check_shape,
')' 13820 write(*,*)
' is INCORRECT' 13821 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 13827 allocate( mask_array( &
13828 & answer_shape(1), &
13830 & answer_shape(2) ) &
13834 & answer_shape(1), &
13836 & answer_shape(2) ) &
13839 allocate( judge_rev( &
13840 & answer_shape(1), &
13842 & answer_shape(2) ) &
13845 allocate( answer_negative( &
13846 & answer_shape(1), &
13848 & answer_shape(2) ) &
13851 allocate( check_negative( &
13852 & answer_shape(1), &
13854 & answer_shape(2) ) &
13857 allocate( both_negative( &
13858 & answer_shape(1), &
13860 & answer_shape(2) ) &
13863 answer_negative = answer < 0
13864 check_negative = check < 0
13865 both_negative = answer_negative .and. check_negative
13866 if (.not. negative_support_on) both_negative = .false.
13868 judge = answer > check
13869 where (both_negative) judge = .not. judge
13871 judge_rev = .not. judge
13872 err_flag = any(judge_rev)
13874 pos = maxloc(mask_array, judge_rev)
13888 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
13890 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
13894 & trim(adjustl(pos_array(1))) //
',' // &
13896 & trim(adjustl(pos_array(2))) //
')' 13898 if ( both_negative( &
13903 abs_mes =
'ABSOLUTE value of' 13910 deallocate(mask_array, judge, judge_rev)
13911 deallocate(answer_negative, check_negative, both_negative)
13917 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 13919 write(*,*)
' ' // trim(abs_mes) // &
13920 &
' check' // trim(pos_str) //
' = ', wrong
13921 write(*,*)
' is NOT LESS THAN' 13922 write(*,*)
' ' // trim(abs_mes) // &
13923 &
' answer' // trim(pos_str) //
' = ', right
13927 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 13935 & message, answer, check, negative_support)
13938 character(*),
intent(in):: message
13939 integer,
intent(in):: answer(:,:,:)
13940 integer,
intent(in):: check(:,:,:)
13941 logical,
intent(in),
optional:: negative_support
13943 logical:: negative_support_on
13944 character(STRING):: pos_str
13945 character(TOKEN):: abs_mes
13946 integer:: wrong, right
13948 integer:: answer_shape(3), check_shape(3), pos(3)
13949 logical:: consist_shape(3)
13950 character(TOKEN):: pos_array(3)
13951 integer,
allocatable:: mask_array(:,:,:)
13952 logical,
allocatable:: judge(:,:,:)
13953 logical,
allocatable:: judge_rev(:,:,:)
13954 logical,
allocatable:: answer_negative(:,:,:)
13955 logical,
allocatable:: check_negative(:,:,:)
13956 logical,
allocatable:: both_negative(:,:,:)
13960 if (
present(negative_support))
then 13961 negative_support_on = negative_support
13963 negative_support_on = .true.
13969 answer_shape = shape(answer)
13970 check_shape = shape(check)
13972 consist_shape = answer_shape == check_shape
13974 if (.not. all(consist_shape))
then 13975 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 13977 write(*,*)
' shape of check is (', check_shape,
')' 13978 write(*,*)
' is INCORRECT' 13979 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 13985 allocate( mask_array( &
13986 & answer_shape(1), &
13988 & answer_shape(2), &
13990 & answer_shape(3) ) &
13994 & answer_shape(1), &
13996 & answer_shape(2), &
13998 & answer_shape(3) ) &
14001 allocate( judge_rev( &
14002 & answer_shape(1), &
14004 & answer_shape(2), &
14006 & answer_shape(3) ) &
14009 allocate( answer_negative( &
14010 & answer_shape(1), &
14012 & answer_shape(2), &
14014 & answer_shape(3) ) &
14017 allocate( check_negative( &
14018 & answer_shape(1), &
14020 & answer_shape(2), &
14022 & answer_shape(3) ) &
14025 allocate( both_negative( &
14026 & answer_shape(1), &
14028 & answer_shape(2), &
14030 & answer_shape(3) ) &
14033 answer_negative = answer < 0
14034 check_negative = check < 0
14035 both_negative = answer_negative .and. check_negative
14036 if (.not. negative_support_on) both_negative = .false.
14038 judge = answer > check
14039 where (both_negative) judge = .not. judge
14041 judge_rev = .not. judge
14042 err_flag = any(judge_rev)
14044 pos = maxloc(mask_array, judge_rev)
14062 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
14064 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
14066 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
14070 & trim(adjustl(pos_array(1))) //
',' // &
14072 & trim(adjustl(pos_array(2))) //
',' // &
14074 & trim(adjustl(pos_array(3))) //
')' 14076 if ( both_negative( &
14083 abs_mes =
'ABSOLUTE value of' 14090 deallocate(mask_array, judge, judge_rev)
14091 deallocate(answer_negative, check_negative, both_negative)
14097 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 14099 write(*,*)
' ' // trim(abs_mes) // &
14100 &
' check' // trim(pos_str) //
' = ', wrong
14101 write(*,*)
' is NOT LESS THAN' 14102 write(*,*)
' ' // trim(abs_mes) // &
14103 &
' answer' // trim(pos_str) //
' = ', right
14107 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 14115 & message, answer, check, negative_support)
14118 character(*),
intent(in):: message
14119 integer,
intent(in):: answer(:,:,:,:)
14120 integer,
intent(in):: check(:,:,:,:)
14121 logical,
intent(in),
optional:: negative_support
14123 logical:: negative_support_on
14124 character(STRING):: pos_str
14125 character(TOKEN):: abs_mes
14126 integer:: wrong, right
14128 integer:: answer_shape(4), check_shape(4), pos(4)
14129 logical:: consist_shape(4)
14130 character(TOKEN):: pos_array(4)
14131 integer,
allocatable:: mask_array(:,:,:,:)
14132 logical,
allocatable:: judge(:,:,:,:)
14133 logical,
allocatable:: judge_rev(:,:,:,:)
14134 logical,
allocatable:: answer_negative(:,:,:,:)
14135 logical,
allocatable:: check_negative(:,:,:,:)
14136 logical,
allocatable:: both_negative(:,:,:,:)
14140 if (
present(negative_support))
then 14141 negative_support_on = negative_support
14143 negative_support_on = .true.
14149 answer_shape = shape(answer)
14150 check_shape = shape(check)
14152 consist_shape = answer_shape == check_shape
14154 if (.not. all(consist_shape))
then 14155 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 14157 write(*,*)
' shape of check is (', check_shape,
')' 14158 write(*,*)
' is INCORRECT' 14159 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 14165 allocate( mask_array( &
14166 & answer_shape(1), &
14168 & answer_shape(2), &
14170 & answer_shape(3), &
14172 & answer_shape(4) ) &
14176 & answer_shape(1), &
14178 & answer_shape(2), &
14180 & answer_shape(3), &
14182 & answer_shape(4) ) &
14185 allocate( judge_rev( &
14186 & answer_shape(1), &
14188 & answer_shape(2), &
14190 & answer_shape(3), &
14192 & answer_shape(4) ) &
14195 allocate( answer_negative( &
14196 & answer_shape(1), &
14198 & answer_shape(2), &
14200 & answer_shape(3), &
14202 & answer_shape(4) ) &
14205 allocate( check_negative( &
14206 & answer_shape(1), &
14208 & answer_shape(2), &
14210 & answer_shape(3), &
14212 & answer_shape(4) ) &
14215 allocate( both_negative( &
14216 & answer_shape(1), &
14218 & answer_shape(2), &
14220 & answer_shape(3), &
14222 & answer_shape(4) ) &
14225 answer_negative = answer < 0
14226 check_negative = check < 0
14227 both_negative = answer_negative .and. check_negative
14228 if (.not. negative_support_on) both_negative = .false.
14230 judge = answer > check
14231 where (both_negative) judge = .not. judge
14233 judge_rev = .not. judge
14234 err_flag = any(judge_rev)
14236 pos = maxloc(mask_array, judge_rev)
14258 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
14260 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
14262 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
14264 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
14268 & trim(adjustl(pos_array(1))) //
',' // &
14270 & trim(adjustl(pos_array(2))) //
',' // &
14272 & trim(adjustl(pos_array(3))) //
',' // &
14274 & trim(adjustl(pos_array(4))) //
')' 14276 if ( both_negative( &
14285 abs_mes =
'ABSOLUTE value of' 14292 deallocate(mask_array, judge, judge_rev)
14293 deallocate(answer_negative, check_negative, both_negative)
14299 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 14301 write(*,*)
' ' // trim(abs_mes) // &
14302 &
' check' // trim(pos_str) //
' = ', wrong
14303 write(*,*)
' is NOT LESS THAN' 14304 write(*,*)
' ' // trim(abs_mes) // &
14305 &
' answer' // trim(pos_str) //
' = ', right
14309 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 14317 & message, answer, check, negative_support)
14320 character(*),
intent(in):: message
14321 integer,
intent(in):: answer(:,:,:,:,:)
14322 integer,
intent(in):: check(:,:,:,:,:)
14323 logical,
intent(in),
optional:: negative_support
14325 logical:: negative_support_on
14326 character(STRING):: pos_str
14327 character(TOKEN):: abs_mes
14328 integer:: wrong, right
14330 integer:: answer_shape(5), check_shape(5), pos(5)
14331 logical:: consist_shape(5)
14332 character(TOKEN):: pos_array(5)
14333 integer,
allocatable:: mask_array(:,:,:,:,:)
14334 logical,
allocatable:: judge(:,:,:,:,:)
14335 logical,
allocatable:: judge_rev(:,:,:,:,:)
14336 logical,
allocatable:: answer_negative(:,:,:,:,:)
14337 logical,
allocatable:: check_negative(:,:,:,:,:)
14338 logical,
allocatable:: both_negative(:,:,:,:,:)
14342 if (
present(negative_support))
then 14343 negative_support_on = negative_support
14345 negative_support_on = .true.
14351 answer_shape = shape(answer)
14352 check_shape = shape(check)
14354 consist_shape = answer_shape == check_shape
14356 if (.not. all(consist_shape))
then 14357 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 14359 write(*,*)
' shape of check is (', check_shape,
')' 14360 write(*,*)
' is INCORRECT' 14361 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 14367 allocate( mask_array( &
14368 & answer_shape(1), &
14370 & answer_shape(2), &
14372 & answer_shape(3), &
14374 & answer_shape(4), &
14376 & answer_shape(5) ) &
14380 & answer_shape(1), &
14382 & answer_shape(2), &
14384 & answer_shape(3), &
14386 & answer_shape(4), &
14388 & answer_shape(5) ) &
14391 allocate( judge_rev( &
14392 & answer_shape(1), &
14394 & answer_shape(2), &
14396 & answer_shape(3), &
14398 & answer_shape(4), &
14400 & answer_shape(5) ) &
14403 allocate( answer_negative( &
14404 & answer_shape(1), &
14406 & answer_shape(2), &
14408 & answer_shape(3), &
14410 & answer_shape(4), &
14412 & answer_shape(5) ) &
14415 allocate( check_negative( &
14416 & answer_shape(1), &
14418 & answer_shape(2), &
14420 & answer_shape(3), &
14422 & answer_shape(4), &
14424 & answer_shape(5) ) &
14427 allocate( both_negative( &
14428 & answer_shape(1), &
14430 & answer_shape(2), &
14432 & answer_shape(3), &
14434 & answer_shape(4), &
14436 & answer_shape(5) ) &
14439 answer_negative = answer < 0
14440 check_negative = check < 0
14441 both_negative = answer_negative .and. check_negative
14442 if (.not. negative_support_on) both_negative = .false.
14444 judge = answer > check
14445 where (both_negative) judge = .not. judge
14447 judge_rev = .not. judge
14448 err_flag = any(judge_rev)
14450 pos = maxloc(mask_array, judge_rev)
14476 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
14478 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
14480 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
14482 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
14484 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
14488 & trim(adjustl(pos_array(1))) //
',' // &
14490 & trim(adjustl(pos_array(2))) //
',' // &
14492 & trim(adjustl(pos_array(3))) //
',' // &
14494 & trim(adjustl(pos_array(4))) //
',' // &
14496 & trim(adjustl(pos_array(5))) //
')' 14498 if ( both_negative( &
14509 abs_mes =
'ABSOLUTE value of' 14516 deallocate(mask_array, judge, judge_rev)
14517 deallocate(answer_negative, check_negative, both_negative)
14523 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 14525 write(*,*)
' ' // trim(abs_mes) // &
14526 &
' check' // trim(pos_str) //
' = ', wrong
14527 write(*,*)
' is NOT LESS THAN' 14528 write(*,*)
' ' // trim(abs_mes) // &
14529 &
' answer' // trim(pos_str) //
' = ', right
14533 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 14541 & message, answer, check, negative_support)
14544 character(*),
intent(in):: message
14545 integer,
intent(in):: answer(:,:,:,:,:,:)
14546 integer,
intent(in):: check(:,:,:,:,:,:)
14547 logical,
intent(in),
optional:: negative_support
14549 logical:: negative_support_on
14550 character(STRING):: pos_str
14551 character(TOKEN):: abs_mes
14552 integer:: wrong, right
14554 integer:: answer_shape(6), check_shape(6), pos(6)
14555 logical:: consist_shape(6)
14556 character(TOKEN):: pos_array(6)
14557 integer,
allocatable:: mask_array(:,:,:,:,:,:)
14558 logical,
allocatable:: judge(:,:,:,:,:,:)
14559 logical,
allocatable:: judge_rev(:,:,:,:,:,:)
14560 logical,
allocatable:: answer_negative(:,:,:,:,:,:)
14561 logical,
allocatable:: check_negative(:,:,:,:,:,:)
14562 logical,
allocatable:: both_negative(:,:,:,:,:,:)
14566 if (
present(negative_support))
then 14567 negative_support_on = negative_support
14569 negative_support_on = .true.
14575 answer_shape = shape(answer)
14576 check_shape = shape(check)
14578 consist_shape = answer_shape == check_shape
14580 if (.not. all(consist_shape))
then 14581 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 14583 write(*,*)
' shape of check is (', check_shape,
')' 14584 write(*,*)
' is INCORRECT' 14585 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 14591 allocate( mask_array( &
14592 & answer_shape(1), &
14594 & answer_shape(2), &
14596 & answer_shape(3), &
14598 & answer_shape(4), &
14600 & answer_shape(5), &
14602 & answer_shape(6) ) &
14606 & answer_shape(1), &
14608 & answer_shape(2), &
14610 & answer_shape(3), &
14612 & answer_shape(4), &
14614 & answer_shape(5), &
14616 & answer_shape(6) ) &
14619 allocate( judge_rev( &
14620 & answer_shape(1), &
14622 & answer_shape(2), &
14624 & answer_shape(3), &
14626 & answer_shape(4), &
14628 & answer_shape(5), &
14630 & answer_shape(6) ) &
14633 allocate( answer_negative( &
14634 & answer_shape(1), &
14636 & answer_shape(2), &
14638 & answer_shape(3), &
14640 & answer_shape(4), &
14642 & answer_shape(5), &
14644 & answer_shape(6) ) &
14647 allocate( check_negative( &
14648 & answer_shape(1), &
14650 & answer_shape(2), &
14652 & answer_shape(3), &
14654 & answer_shape(4), &
14656 & answer_shape(5), &
14658 & answer_shape(6) ) &
14661 allocate( both_negative( &
14662 & answer_shape(1), &
14664 & answer_shape(2), &
14666 & answer_shape(3), &
14668 & answer_shape(4), &
14670 & answer_shape(5), &
14672 & answer_shape(6) ) &
14675 answer_negative = answer < 0
14676 check_negative = check < 0
14677 both_negative = answer_negative .and. check_negative
14678 if (.not. negative_support_on) both_negative = .false.
14680 judge = answer > check
14681 where (both_negative) judge = .not. judge
14683 judge_rev = .not. judge
14684 err_flag = any(judge_rev)
14686 pos = maxloc(mask_array, judge_rev)
14716 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
14718 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
14720 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
14722 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
14724 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
14726 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
14730 & trim(adjustl(pos_array(1))) //
',' // &
14732 & trim(adjustl(pos_array(2))) //
',' // &
14734 & trim(adjustl(pos_array(3))) //
',' // &
14736 & trim(adjustl(pos_array(4))) //
',' // &
14738 & trim(adjustl(pos_array(5))) //
',' // &
14740 & trim(adjustl(pos_array(6))) //
')' 14742 if ( both_negative( &
14755 abs_mes =
'ABSOLUTE value of' 14762 deallocate(mask_array, judge, judge_rev)
14763 deallocate(answer_negative, check_negative, both_negative)
14769 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 14771 write(*,*)
' ' // trim(abs_mes) // &
14772 &
' check' // trim(pos_str) //
' = ', wrong
14773 write(*,*)
' is NOT LESS THAN' 14774 write(*,*)
' ' // trim(abs_mes) // &
14775 &
' answer' // trim(pos_str) //
' = ', right
14779 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 14787 & message, answer, check, negative_support)
14790 character(*),
intent(in):: message
14791 integer,
intent(in):: answer(:,:,:,:,:,:,:)
14792 integer,
intent(in):: check(:,:,:,:,:,:,:)
14793 logical,
intent(in),
optional:: negative_support
14795 logical:: negative_support_on
14796 character(STRING):: pos_str
14797 character(TOKEN):: abs_mes
14798 integer:: wrong, right
14800 integer:: answer_shape(7), check_shape(7), pos(7)
14801 logical:: consist_shape(7)
14802 character(TOKEN):: pos_array(7)
14803 integer,
allocatable:: mask_array(:,:,:,:,:,:,:)
14804 logical,
allocatable:: judge(:,:,:,:,:,:,:)
14805 logical,
allocatable:: judge_rev(:,:,:,:,:,:,:)
14806 logical,
allocatable:: answer_negative(:,:,:,:,:,:,:)
14807 logical,
allocatable:: check_negative(:,:,:,:,:,:,:)
14808 logical,
allocatable:: both_negative(:,:,:,:,:,:,:)
14812 if (
present(negative_support))
then 14813 negative_support_on = negative_support
14815 negative_support_on = .true.
14821 answer_shape = shape(answer)
14822 check_shape = shape(check)
14824 consist_shape = answer_shape == check_shape
14826 if (.not. all(consist_shape))
then 14827 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 14829 write(*,*)
' shape of check is (', check_shape,
')' 14830 write(*,*)
' is INCORRECT' 14831 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 14837 allocate( mask_array( &
14838 & answer_shape(1), &
14840 & answer_shape(2), &
14842 & answer_shape(3), &
14844 & answer_shape(4), &
14846 & answer_shape(5), &
14848 & answer_shape(6), &
14850 & answer_shape(7) ) &
14854 & answer_shape(1), &
14856 & answer_shape(2), &
14858 & answer_shape(3), &
14860 & answer_shape(4), &
14862 & answer_shape(5), &
14864 & answer_shape(6), &
14866 & answer_shape(7) ) &
14869 allocate( judge_rev( &
14870 & answer_shape(1), &
14872 & answer_shape(2), &
14874 & answer_shape(3), &
14876 & answer_shape(4), &
14878 & answer_shape(5), &
14880 & answer_shape(6), &
14882 & answer_shape(7) ) &
14885 allocate( answer_negative( &
14886 & answer_shape(1), &
14888 & answer_shape(2), &
14890 & answer_shape(3), &
14892 & answer_shape(4), &
14894 & answer_shape(5), &
14896 & answer_shape(6), &
14898 & answer_shape(7) ) &
14901 allocate( check_negative( &
14902 & answer_shape(1), &
14904 & answer_shape(2), &
14906 & answer_shape(3), &
14908 & answer_shape(4), &
14910 & answer_shape(5), &
14912 & answer_shape(6), &
14914 & answer_shape(7) ) &
14917 allocate( both_negative( &
14918 & answer_shape(1), &
14920 & answer_shape(2), &
14922 & answer_shape(3), &
14924 & answer_shape(4), &
14926 & answer_shape(5), &
14928 & answer_shape(6), &
14930 & answer_shape(7) ) &
14933 answer_negative = answer < 0
14934 check_negative = check < 0
14935 both_negative = answer_negative .and. check_negative
14936 if (.not. negative_support_on) both_negative = .false.
14938 judge = answer > check
14939 where (both_negative) judge = .not. judge
14941 judge_rev = .not. judge
14942 err_flag = any(judge_rev)
14944 pos = maxloc(mask_array, judge_rev)
14978 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
14980 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
14982 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
14984 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
14986 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
14988 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
14990 write(unit=pos_array(7), fmt=
"(i20)") pos(7)
14994 & trim(adjustl(pos_array(1))) //
',' // &
14996 & trim(adjustl(pos_array(2))) //
',' // &
14998 & trim(adjustl(pos_array(3))) //
',' // &
15000 & trim(adjustl(pos_array(4))) //
',' // &
15002 & trim(adjustl(pos_array(5))) //
',' // &
15004 & trim(adjustl(pos_array(6))) //
',' // &
15006 & trim(adjustl(pos_array(7))) //
')' 15008 if ( both_negative( &
15023 abs_mes =
'ABSOLUTE value of' 15030 deallocate(mask_array, judge, judge_rev)
15031 deallocate(answer_negative, check_negative, both_negative)
15037 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 15039 write(*,*)
' ' // trim(abs_mes) // &
15040 &
' check' // trim(pos_str) //
' = ', wrong
15041 write(*,*)
' is NOT LESS THAN' 15042 write(*,*)
' ' // trim(abs_mes) // &
15043 &
' answer' // trim(pos_str) //
' = ', right
15047 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 15055 & message, answer, check, negative_support)
15058 character(*),
intent(in):: message
15059 real,
intent(in):: answer
15060 real,
intent(in):: check
15061 logical,
intent(in),
optional:: negative_support
15063 logical:: negative_support_on
15064 character(STRING):: pos_str
15065 character(TOKEN):: abs_mes
15066 real:: wrong, right
15071 if (
present(negative_support))
then 15072 negative_support_on = negative_support
15074 negative_support_on = .true.
15082 err_flag = .not. answer > check
15085 if ( answer < 0.0 &
15086 & .and. check < 0.0 &
15087 & .and. negative_support_on )
then 15089 err_flag = .not. err_flag
15090 abs_mes =
'ABSOLUTE value of' 15101 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 15103 write(*,*)
' ' // trim(abs_mes) // &
15104 &
' check' // trim(pos_str) //
' = ', wrong
15105 write(*,*)
' is NOT LESS THAN' 15106 write(*,*)
' ' // trim(abs_mes) // &
15107 &
' answer' // trim(pos_str) //
' = ', right
15111 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 15119 & message, answer, check, negative_support)
15122 character(*),
intent(in):: message
15123 real,
intent(in):: answer(:)
15124 real,
intent(in):: check(:)
15125 logical,
intent(in),
optional:: negative_support
15127 logical:: negative_support_on
15128 character(STRING):: pos_str
15129 character(TOKEN):: abs_mes
15130 real:: wrong, right
15132 integer:: answer_shape(1), check_shape(1), pos(1)
15133 logical:: consist_shape(1)
15134 character(TOKEN):: pos_array(1)
15135 integer,
allocatable:: mask_array(:)
15136 logical,
allocatable:: judge(:)
15137 logical,
allocatable:: judge_rev(:)
15138 logical,
allocatable:: answer_negative(:)
15139 logical,
allocatable:: check_negative(:)
15140 logical,
allocatable:: both_negative(:)
15144 if (
present(negative_support))
then 15145 negative_support_on = negative_support
15147 negative_support_on = .true.
15153 answer_shape = shape(answer)
15154 check_shape = shape(check)
15156 consist_shape = answer_shape == check_shape
15158 if (.not. all(consist_shape))
then 15159 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 15161 write(*,*)
' shape of check is (', check_shape,
')' 15162 write(*,*)
' is INCORRECT' 15163 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 15169 allocate( mask_array( &
15171 & answer_shape(1) ) &
15176 & answer_shape(1) ) &
15179 allocate( judge_rev( &
15181 & answer_shape(1) ) &
15184 allocate( answer_negative( &
15186 & answer_shape(1) ) &
15189 allocate( check_negative( &
15191 & answer_shape(1) ) &
15194 allocate( both_negative( &
15196 & answer_shape(1) ) &
15199 answer_negative = answer < 0.0
15200 check_negative = check < 0.0
15201 both_negative = answer_negative .and. check_negative
15202 if (.not. negative_support_on) both_negative = .false.
15204 judge = answer > check
15205 where (both_negative) judge = .not. judge
15207 judge_rev = .not. judge
15208 err_flag = any(judge_rev)
15210 pos = maxloc(mask_array, judge_rev)
15222 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
15227 & trim(adjustl(pos_array(1))) //
')' 15229 if ( both_negative( &
15233 abs_mes =
'ABSOLUTE value of' 15240 deallocate(mask_array, judge, judge_rev)
15241 deallocate(answer_negative, check_negative, both_negative)
15247 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 15249 write(*,*)
' ' // trim(abs_mes) // &
15250 &
' check' // trim(pos_str) //
' = ', wrong
15251 write(*,*)
' is NOT LESS THAN' 15252 write(*,*)
' ' // trim(abs_mes) // &
15253 &
' answer' // trim(pos_str) //
' = ', right
15257 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 15265 & message, answer, check, negative_support)
15268 character(*),
intent(in):: message
15269 real,
intent(in):: answer(:,:)
15270 real,
intent(in):: check(:,:)
15271 logical,
intent(in),
optional:: negative_support
15273 logical:: negative_support_on
15274 character(STRING):: pos_str
15275 character(TOKEN):: abs_mes
15276 real:: wrong, right
15278 integer:: answer_shape(2), check_shape(2), pos(2)
15279 logical:: consist_shape(2)
15280 character(TOKEN):: pos_array(2)
15281 integer,
allocatable:: mask_array(:,:)
15282 logical,
allocatable:: judge(:,:)
15283 logical,
allocatable:: judge_rev(:,:)
15284 logical,
allocatable:: answer_negative(:,:)
15285 logical,
allocatable:: check_negative(:,:)
15286 logical,
allocatable:: both_negative(:,:)
15290 if (
present(negative_support))
then 15291 negative_support_on = negative_support
15293 negative_support_on = .true.
15299 answer_shape = shape(answer)
15300 check_shape = shape(check)
15302 consist_shape = answer_shape == check_shape
15304 if (.not. all(consist_shape))
then 15305 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 15307 write(*,*)
' shape of check is (', check_shape,
')' 15308 write(*,*)
' is INCORRECT' 15309 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 15315 allocate( mask_array( &
15316 & answer_shape(1), &
15318 & answer_shape(2) ) &
15322 & answer_shape(1), &
15324 & answer_shape(2) ) &
15327 allocate( judge_rev( &
15328 & answer_shape(1), &
15330 & answer_shape(2) ) &
15333 allocate( answer_negative( &
15334 & answer_shape(1), &
15336 & answer_shape(2) ) &
15339 allocate( check_negative( &
15340 & answer_shape(1), &
15342 & answer_shape(2) ) &
15345 allocate( both_negative( &
15346 & answer_shape(1), &
15348 & answer_shape(2) ) &
15351 answer_negative = answer < 0.0
15352 check_negative = check < 0.0
15353 both_negative = answer_negative .and. check_negative
15354 if (.not. negative_support_on) both_negative = .false.
15356 judge = answer > check
15357 where (both_negative) judge = .not. judge
15359 judge_rev = .not. judge
15360 err_flag = any(judge_rev)
15362 pos = maxloc(mask_array, judge_rev)
15376 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
15378 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
15382 & trim(adjustl(pos_array(1))) //
',' // &
15384 & trim(adjustl(pos_array(2))) //
')' 15386 if ( both_negative( &
15391 abs_mes =
'ABSOLUTE value of' 15398 deallocate(mask_array, judge, judge_rev)
15399 deallocate(answer_negative, check_negative, both_negative)
15405 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 15407 write(*,*)
' ' // trim(abs_mes) // &
15408 &
' check' // trim(pos_str) //
' = ', wrong
15409 write(*,*)
' is NOT LESS THAN' 15410 write(*,*)
' ' // trim(abs_mes) // &
15411 &
' answer' // trim(pos_str) //
' = ', right
15415 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 15423 & message, answer, check, negative_support)
15426 character(*),
intent(in):: message
15427 real,
intent(in):: answer(:,:,:)
15428 real,
intent(in):: check(:,:,:)
15429 logical,
intent(in),
optional:: negative_support
15431 logical:: negative_support_on
15432 character(STRING):: pos_str
15433 character(TOKEN):: abs_mes
15434 real:: wrong, right
15436 integer:: answer_shape(3), check_shape(3), pos(3)
15437 logical:: consist_shape(3)
15438 character(TOKEN):: pos_array(3)
15439 integer,
allocatable:: mask_array(:,:,:)
15440 logical,
allocatable:: judge(:,:,:)
15441 logical,
allocatable:: judge_rev(:,:,:)
15442 logical,
allocatable:: answer_negative(:,:,:)
15443 logical,
allocatable:: check_negative(:,:,:)
15444 logical,
allocatable:: both_negative(:,:,:)
15448 if (
present(negative_support))
then 15449 negative_support_on = negative_support
15451 negative_support_on = .true.
15457 answer_shape = shape(answer)
15458 check_shape = shape(check)
15460 consist_shape = answer_shape == check_shape
15462 if (.not. all(consist_shape))
then 15463 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 15465 write(*,*)
' shape of check is (', check_shape,
')' 15466 write(*,*)
' is INCORRECT' 15467 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 15473 allocate( mask_array( &
15474 & answer_shape(1), &
15476 & answer_shape(2), &
15478 & answer_shape(3) ) &
15482 & answer_shape(1), &
15484 & answer_shape(2), &
15486 & answer_shape(3) ) &
15489 allocate( judge_rev( &
15490 & answer_shape(1), &
15492 & answer_shape(2), &
15494 & answer_shape(3) ) &
15497 allocate( answer_negative( &
15498 & answer_shape(1), &
15500 & answer_shape(2), &
15502 & answer_shape(3) ) &
15505 allocate( check_negative( &
15506 & answer_shape(1), &
15508 & answer_shape(2), &
15510 & answer_shape(3) ) &
15513 allocate( both_negative( &
15514 & answer_shape(1), &
15516 & answer_shape(2), &
15518 & answer_shape(3) ) &
15521 answer_negative = answer < 0.0
15522 check_negative = check < 0.0
15523 both_negative = answer_negative .and. check_negative
15524 if (.not. negative_support_on) both_negative = .false.
15526 judge = answer > check
15527 where (both_negative) judge = .not. judge
15529 judge_rev = .not. judge
15530 err_flag = any(judge_rev)
15532 pos = maxloc(mask_array, judge_rev)
15550 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
15552 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
15554 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
15558 & trim(adjustl(pos_array(1))) //
',' // &
15560 & trim(adjustl(pos_array(2))) //
',' // &
15562 & trim(adjustl(pos_array(3))) //
')' 15564 if ( both_negative( &
15571 abs_mes =
'ABSOLUTE value of' 15578 deallocate(mask_array, judge, judge_rev)
15579 deallocate(answer_negative, check_negative, both_negative)
15585 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 15587 write(*,*)
' ' // trim(abs_mes) // &
15588 &
' check' // trim(pos_str) //
' = ', wrong
15589 write(*,*)
' is NOT LESS THAN' 15590 write(*,*)
' ' // trim(abs_mes) // &
15591 &
' answer' // trim(pos_str) //
' = ', right
15595 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 15603 & message, answer, check, negative_support)
15606 character(*),
intent(in):: message
15607 real,
intent(in):: answer(:,:,:,:)
15608 real,
intent(in):: check(:,:,:,:)
15609 logical,
intent(in),
optional:: negative_support
15611 logical:: negative_support_on
15612 character(STRING):: pos_str
15613 character(TOKEN):: abs_mes
15614 real:: wrong, right
15616 integer:: answer_shape(4), check_shape(4), pos(4)
15617 logical:: consist_shape(4)
15618 character(TOKEN):: pos_array(4)
15619 integer,
allocatable:: mask_array(:,:,:,:)
15620 logical,
allocatable:: judge(:,:,:,:)
15621 logical,
allocatable:: judge_rev(:,:,:,:)
15622 logical,
allocatable:: answer_negative(:,:,:,:)
15623 logical,
allocatable:: check_negative(:,:,:,:)
15624 logical,
allocatable:: both_negative(:,:,:,:)
15628 if (
present(negative_support))
then 15629 negative_support_on = negative_support
15631 negative_support_on = .true.
15637 answer_shape = shape(answer)
15638 check_shape = shape(check)
15640 consist_shape = answer_shape == check_shape
15642 if (.not. all(consist_shape))
then 15643 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 15645 write(*,*)
' shape of check is (', check_shape,
')' 15646 write(*,*)
' is INCORRECT' 15647 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 15653 allocate( mask_array( &
15654 & answer_shape(1), &
15656 & answer_shape(2), &
15658 & answer_shape(3), &
15660 & answer_shape(4) ) &
15664 & answer_shape(1), &
15666 & answer_shape(2), &
15668 & answer_shape(3), &
15670 & answer_shape(4) ) &
15673 allocate( judge_rev( &
15674 & answer_shape(1), &
15676 & answer_shape(2), &
15678 & answer_shape(3), &
15680 & answer_shape(4) ) &
15683 allocate( answer_negative( &
15684 & answer_shape(1), &
15686 & answer_shape(2), &
15688 & answer_shape(3), &
15690 & answer_shape(4) ) &
15693 allocate( check_negative( &
15694 & answer_shape(1), &
15696 & answer_shape(2), &
15698 & answer_shape(3), &
15700 & answer_shape(4) ) &
15703 allocate( both_negative( &
15704 & answer_shape(1), &
15706 & answer_shape(2), &
15708 & answer_shape(3), &
15710 & answer_shape(4) ) &
15713 answer_negative = answer < 0.0
15714 check_negative = check < 0.0
15715 both_negative = answer_negative .and. check_negative
15716 if (.not. negative_support_on) both_negative = .false.
15718 judge = answer > check
15719 where (both_negative) judge = .not. judge
15721 judge_rev = .not. judge
15722 err_flag = any(judge_rev)
15724 pos = maxloc(mask_array, judge_rev)
15746 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
15748 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
15750 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
15752 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
15756 & trim(adjustl(pos_array(1))) //
',' // &
15758 & trim(adjustl(pos_array(2))) //
',' // &
15760 & trim(adjustl(pos_array(3))) //
',' // &
15762 & trim(adjustl(pos_array(4))) //
')' 15764 if ( both_negative( &
15773 abs_mes =
'ABSOLUTE value of' 15780 deallocate(mask_array, judge, judge_rev)
15781 deallocate(answer_negative, check_negative, both_negative)
15787 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 15789 write(*,*)
' ' // trim(abs_mes) // &
15790 &
' check' // trim(pos_str) //
' = ', wrong
15791 write(*,*)
' is NOT LESS THAN' 15792 write(*,*)
' ' // trim(abs_mes) // &
15793 &
' answer' // trim(pos_str) //
' = ', right
15797 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 15805 & message, answer, check, negative_support)
15808 character(*),
intent(in):: message
15809 real,
intent(in):: answer(:,:,:,:,:)
15810 real,
intent(in):: check(:,:,:,:,:)
15811 logical,
intent(in),
optional:: negative_support
15813 logical:: negative_support_on
15814 character(STRING):: pos_str
15815 character(TOKEN):: abs_mes
15816 real:: wrong, right
15818 integer:: answer_shape(5), check_shape(5), pos(5)
15819 logical:: consist_shape(5)
15820 character(TOKEN):: pos_array(5)
15821 integer,
allocatable:: mask_array(:,:,:,:,:)
15822 logical,
allocatable:: judge(:,:,:,:,:)
15823 logical,
allocatable:: judge_rev(:,:,:,:,:)
15824 logical,
allocatable:: answer_negative(:,:,:,:,:)
15825 logical,
allocatable:: check_negative(:,:,:,:,:)
15826 logical,
allocatable:: both_negative(:,:,:,:,:)
15830 if (
present(negative_support))
then 15831 negative_support_on = negative_support
15833 negative_support_on = .true.
15839 answer_shape = shape(answer)
15840 check_shape = shape(check)
15842 consist_shape = answer_shape == check_shape
15844 if (.not. all(consist_shape))
then 15845 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 15847 write(*,*)
' shape of check is (', check_shape,
')' 15848 write(*,*)
' is INCORRECT' 15849 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 15855 allocate( mask_array( &
15856 & answer_shape(1), &
15858 & answer_shape(2), &
15860 & answer_shape(3), &
15862 & answer_shape(4), &
15864 & answer_shape(5) ) &
15868 & answer_shape(1), &
15870 & answer_shape(2), &
15872 & answer_shape(3), &
15874 & answer_shape(4), &
15876 & answer_shape(5) ) &
15879 allocate( judge_rev( &
15880 & answer_shape(1), &
15882 & answer_shape(2), &
15884 & answer_shape(3), &
15886 & answer_shape(4), &
15888 & answer_shape(5) ) &
15891 allocate( answer_negative( &
15892 & answer_shape(1), &
15894 & answer_shape(2), &
15896 & answer_shape(3), &
15898 & answer_shape(4), &
15900 & answer_shape(5) ) &
15903 allocate( check_negative( &
15904 & answer_shape(1), &
15906 & answer_shape(2), &
15908 & answer_shape(3), &
15910 & answer_shape(4), &
15912 & answer_shape(5) ) &
15915 allocate( both_negative( &
15916 & answer_shape(1), &
15918 & answer_shape(2), &
15920 & answer_shape(3), &
15922 & answer_shape(4), &
15924 & answer_shape(5) ) &
15927 answer_negative = answer < 0.0
15928 check_negative = check < 0.0
15929 both_negative = answer_negative .and. check_negative
15930 if (.not. negative_support_on) both_negative = .false.
15932 judge = answer > check
15933 where (both_negative) judge = .not. judge
15935 judge_rev = .not. judge
15936 err_flag = any(judge_rev)
15938 pos = maxloc(mask_array, judge_rev)
15964 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
15966 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
15968 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
15970 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
15972 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
15976 & trim(adjustl(pos_array(1))) //
',' // &
15978 & trim(adjustl(pos_array(2))) //
',' // &
15980 & trim(adjustl(pos_array(3))) //
',' // &
15982 & trim(adjustl(pos_array(4))) //
',' // &
15984 & trim(adjustl(pos_array(5))) //
')' 15986 if ( both_negative( &
15997 abs_mes =
'ABSOLUTE value of' 16004 deallocate(mask_array, judge, judge_rev)
16005 deallocate(answer_negative, check_negative, both_negative)
16011 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 16013 write(*,*)
' ' // trim(abs_mes) // &
16014 &
' check' // trim(pos_str) //
' = ', wrong
16015 write(*,*)
' is NOT LESS THAN' 16016 write(*,*)
' ' // trim(abs_mes) // &
16017 &
' answer' // trim(pos_str) //
' = ', right
16021 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 16029 & message, answer, check, negative_support)
16032 character(*),
intent(in):: message
16033 real,
intent(in):: answer(:,:,:,:,:,:)
16034 real,
intent(in):: check(:,:,:,:,:,:)
16035 logical,
intent(in),
optional:: negative_support
16037 logical:: negative_support_on
16038 character(STRING):: pos_str
16039 character(TOKEN):: abs_mes
16040 real:: wrong, right
16042 integer:: answer_shape(6), check_shape(6), pos(6)
16043 logical:: consist_shape(6)
16044 character(TOKEN):: pos_array(6)
16045 integer,
allocatable:: mask_array(:,:,:,:,:,:)
16046 logical,
allocatable:: judge(:,:,:,:,:,:)
16047 logical,
allocatable:: judge_rev(:,:,:,:,:,:)
16048 logical,
allocatable:: answer_negative(:,:,:,:,:,:)
16049 logical,
allocatable:: check_negative(:,:,:,:,:,:)
16050 logical,
allocatable:: both_negative(:,:,:,:,:,:)
16054 if (
present(negative_support))
then 16055 negative_support_on = negative_support
16057 negative_support_on = .true.
16063 answer_shape = shape(answer)
16064 check_shape = shape(check)
16066 consist_shape = answer_shape == check_shape
16068 if (.not. all(consist_shape))
then 16069 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 16071 write(*,*)
' shape of check is (', check_shape,
')' 16072 write(*,*)
' is INCORRECT' 16073 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 16079 allocate( mask_array( &
16080 & answer_shape(1), &
16082 & answer_shape(2), &
16084 & answer_shape(3), &
16086 & answer_shape(4), &
16088 & answer_shape(5), &
16090 & answer_shape(6) ) &
16094 & answer_shape(1), &
16096 & answer_shape(2), &
16098 & answer_shape(3), &
16100 & answer_shape(4), &
16102 & answer_shape(5), &
16104 & answer_shape(6) ) &
16107 allocate( judge_rev( &
16108 & answer_shape(1), &
16110 & answer_shape(2), &
16112 & answer_shape(3), &
16114 & answer_shape(4), &
16116 & answer_shape(5), &
16118 & answer_shape(6) ) &
16121 allocate( answer_negative( &
16122 & answer_shape(1), &
16124 & answer_shape(2), &
16126 & answer_shape(3), &
16128 & answer_shape(4), &
16130 & answer_shape(5), &
16132 & answer_shape(6) ) &
16135 allocate( check_negative( &
16136 & answer_shape(1), &
16138 & answer_shape(2), &
16140 & answer_shape(3), &
16142 & answer_shape(4), &
16144 & answer_shape(5), &
16146 & answer_shape(6) ) &
16149 allocate( both_negative( &
16150 & answer_shape(1), &
16152 & answer_shape(2), &
16154 & answer_shape(3), &
16156 & answer_shape(4), &
16158 & answer_shape(5), &
16160 & answer_shape(6) ) &
16163 answer_negative = answer < 0.0
16164 check_negative = check < 0.0
16165 both_negative = answer_negative .and. check_negative
16166 if (.not. negative_support_on) both_negative = .false.
16168 judge = answer > check
16169 where (both_negative) judge = .not. judge
16171 judge_rev = .not. judge
16172 err_flag = any(judge_rev)
16174 pos = maxloc(mask_array, judge_rev)
16204 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
16206 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
16208 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
16210 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
16212 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
16214 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
16218 & trim(adjustl(pos_array(1))) //
',' // &
16220 & trim(adjustl(pos_array(2))) //
',' // &
16222 & trim(adjustl(pos_array(3))) //
',' // &
16224 & trim(adjustl(pos_array(4))) //
',' // &
16226 & trim(adjustl(pos_array(5))) //
',' // &
16228 & trim(adjustl(pos_array(6))) //
')' 16230 if ( both_negative( &
16243 abs_mes =
'ABSOLUTE value of' 16250 deallocate(mask_array, judge, judge_rev)
16251 deallocate(answer_negative, check_negative, both_negative)
16257 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 16259 write(*,*)
' ' // trim(abs_mes) // &
16260 &
' check' // trim(pos_str) //
' = ', wrong
16261 write(*,*)
' is NOT LESS THAN' 16262 write(*,*)
' ' // trim(abs_mes) // &
16263 &
' answer' // trim(pos_str) //
' = ', right
16267 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 16275 & message, answer, check, negative_support)
16278 character(*),
intent(in):: message
16279 real,
intent(in):: answer(:,:,:,:,:,:,:)
16280 real,
intent(in):: check(:,:,:,:,:,:,:)
16281 logical,
intent(in),
optional:: negative_support
16283 logical:: negative_support_on
16284 character(STRING):: pos_str
16285 character(TOKEN):: abs_mes
16286 real:: wrong, right
16288 integer:: answer_shape(7), check_shape(7), pos(7)
16289 logical:: consist_shape(7)
16290 character(TOKEN):: pos_array(7)
16291 integer,
allocatable:: mask_array(:,:,:,:,:,:,:)
16292 logical,
allocatable:: judge(:,:,:,:,:,:,:)
16293 logical,
allocatable:: judge_rev(:,:,:,:,:,:,:)
16294 logical,
allocatable:: answer_negative(:,:,:,:,:,:,:)
16295 logical,
allocatable:: check_negative(:,:,:,:,:,:,:)
16296 logical,
allocatable:: both_negative(:,:,:,:,:,:,:)
16300 if (
present(negative_support))
then 16301 negative_support_on = negative_support
16303 negative_support_on = .true.
16309 answer_shape = shape(answer)
16310 check_shape = shape(check)
16312 consist_shape = answer_shape == check_shape
16314 if (.not. all(consist_shape))
then 16315 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 16317 write(*,*)
' shape of check is (', check_shape,
')' 16318 write(*,*)
' is INCORRECT' 16319 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 16325 allocate( mask_array( &
16326 & answer_shape(1), &
16328 & answer_shape(2), &
16330 & answer_shape(3), &
16332 & answer_shape(4), &
16334 & answer_shape(5), &
16336 & answer_shape(6), &
16338 & answer_shape(7) ) &
16342 & answer_shape(1), &
16344 & answer_shape(2), &
16346 & answer_shape(3), &
16348 & answer_shape(4), &
16350 & answer_shape(5), &
16352 & answer_shape(6), &
16354 & answer_shape(7) ) &
16357 allocate( judge_rev( &
16358 & answer_shape(1), &
16360 & answer_shape(2), &
16362 & answer_shape(3), &
16364 & answer_shape(4), &
16366 & answer_shape(5), &
16368 & answer_shape(6), &
16370 & answer_shape(7) ) &
16373 allocate( answer_negative( &
16374 & answer_shape(1), &
16376 & answer_shape(2), &
16378 & answer_shape(3), &
16380 & answer_shape(4), &
16382 & answer_shape(5), &
16384 & answer_shape(6), &
16386 & answer_shape(7) ) &
16389 allocate( check_negative( &
16390 & answer_shape(1), &
16392 & answer_shape(2), &
16394 & answer_shape(3), &
16396 & answer_shape(4), &
16398 & answer_shape(5), &
16400 & answer_shape(6), &
16402 & answer_shape(7) ) &
16405 allocate( both_negative( &
16406 & answer_shape(1), &
16408 & answer_shape(2), &
16410 & answer_shape(3), &
16412 & answer_shape(4), &
16414 & answer_shape(5), &
16416 & answer_shape(6), &
16418 & answer_shape(7) ) &
16421 answer_negative = answer < 0.0
16422 check_negative = check < 0.0
16423 both_negative = answer_negative .and. check_negative
16424 if (.not. negative_support_on) both_negative = .false.
16426 judge = answer > check
16427 where (both_negative) judge = .not. judge
16429 judge_rev = .not. judge
16430 err_flag = any(judge_rev)
16432 pos = maxloc(mask_array, judge_rev)
16466 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
16468 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
16470 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
16472 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
16474 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
16476 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
16478 write(unit=pos_array(7), fmt=
"(i20)") pos(7)
16482 & trim(adjustl(pos_array(1))) //
',' // &
16484 & trim(adjustl(pos_array(2))) //
',' // &
16486 & trim(adjustl(pos_array(3))) //
',' // &
16488 & trim(adjustl(pos_array(4))) //
',' // &
16490 & trim(adjustl(pos_array(5))) //
',' // &
16492 & trim(adjustl(pos_array(6))) //
',' // &
16494 & trim(adjustl(pos_array(7))) //
')' 16496 if ( both_negative( &
16511 abs_mes =
'ABSOLUTE value of' 16518 deallocate(mask_array, judge, judge_rev)
16519 deallocate(answer_negative, check_negative, both_negative)
16525 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 16527 write(*,*)
' ' // trim(abs_mes) // &
16528 &
' check' // trim(pos_str) //
' = ', wrong
16529 write(*,*)
' is NOT LESS THAN' 16530 write(*,*)
' ' // trim(abs_mes) // &
16531 &
' answer' // trim(pos_str) //
' = ', right
16535 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 16543 & message, answer, check, negative_support)
16546 character(*),
intent(in):: message
16547 real(DP),
intent(in):: answer
16548 real(DP),
intent(in):: check
16549 logical,
intent(in),
optional:: negative_support
16551 logical:: negative_support_on
16552 character(STRING):: pos_str
16553 character(TOKEN):: abs_mes
16554 real(DP):: wrong, right
16559 if (
present(negative_support))
then 16560 negative_support_on = negative_support
16562 negative_support_on = .true.
16570 err_flag = .not. answer > check
16573 if ( answer < 0.0_dp &
16574 & .and. check < 0.0_dp &
16575 & .and. negative_support_on )
then 16577 err_flag = .not. err_flag
16578 abs_mes =
'ABSOLUTE value of' 16589 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 16591 write(*,*)
' ' // trim(abs_mes) // &
16592 &
' check' // trim(pos_str) //
' = ', wrong
16593 write(*,*)
' is NOT LESS THAN' 16594 write(*,*)
' ' // trim(abs_mes) // &
16595 &
' answer' // trim(pos_str) //
' = ', right
16599 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 16607 & message, answer, check, negative_support)
16610 character(*),
intent(in):: message
16611 real(DP),
intent(in):: answer(:)
16612 real(DP),
intent(in):: check(:)
16613 logical,
intent(in),
optional:: negative_support
16615 logical:: negative_support_on
16616 character(STRING):: pos_str
16617 character(TOKEN):: abs_mes
16618 real(DP):: wrong, right
16620 integer:: answer_shape(1), check_shape(1), pos(1)
16621 logical:: consist_shape(1)
16622 character(TOKEN):: pos_array(1)
16623 integer,
allocatable:: mask_array(:)
16624 logical,
allocatable:: judge(:)
16625 logical,
allocatable:: judge_rev(:)
16626 logical,
allocatable:: answer_negative(:)
16627 logical,
allocatable:: check_negative(:)
16628 logical,
allocatable:: both_negative(:)
16632 if (
present(negative_support))
then 16633 negative_support_on = negative_support
16635 negative_support_on = .true.
16641 answer_shape = shape(answer)
16642 check_shape = shape(check)
16644 consist_shape = answer_shape == check_shape
16646 if (.not. all(consist_shape))
then 16647 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 16649 write(*,*)
' shape of check is (', check_shape,
')' 16650 write(*,*)
' is INCORRECT' 16651 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 16657 allocate( mask_array( &
16659 & answer_shape(1) ) &
16664 & answer_shape(1) ) &
16667 allocate( judge_rev( &
16669 & answer_shape(1) ) &
16672 allocate( answer_negative( &
16674 & answer_shape(1) ) &
16677 allocate( check_negative( &
16679 & answer_shape(1) ) &
16682 allocate( both_negative( &
16684 & answer_shape(1) ) &
16687 answer_negative = answer < 0.0_dp
16688 check_negative = check < 0.0_dp
16689 both_negative = answer_negative .and. check_negative
16690 if (.not. negative_support_on) both_negative = .false.
16692 judge = answer > check
16693 where (both_negative) judge = .not. judge
16695 judge_rev = .not. judge
16696 err_flag = any(judge_rev)
16698 pos = maxloc(mask_array, judge_rev)
16710 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
16715 & trim(adjustl(pos_array(1))) //
')' 16717 if ( both_negative( &
16721 abs_mes =
'ABSOLUTE value of' 16728 deallocate(mask_array, judge, judge_rev)
16729 deallocate(answer_negative, check_negative, both_negative)
16735 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 16737 write(*,*)
' ' // trim(abs_mes) // &
16738 &
' check' // trim(pos_str) //
' = ', wrong
16739 write(*,*)
' is NOT LESS THAN' 16740 write(*,*)
' ' // trim(abs_mes) // &
16741 &
' answer' // trim(pos_str) //
' = ', right
16745 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 16753 & message, answer, check, negative_support)
16756 character(*),
intent(in):: message
16757 real(DP),
intent(in):: answer(:,:)
16758 real(DP),
intent(in):: check(:,:)
16759 logical,
intent(in),
optional:: negative_support
16761 logical:: negative_support_on
16762 character(STRING):: pos_str
16763 character(TOKEN):: abs_mes
16764 real(DP):: wrong, right
16766 integer:: answer_shape(2), check_shape(2), pos(2)
16767 logical:: consist_shape(2)
16768 character(TOKEN):: pos_array(2)
16769 integer,
allocatable:: mask_array(:,:)
16770 logical,
allocatable:: judge(:,:)
16771 logical,
allocatable:: judge_rev(:,:)
16772 logical,
allocatable:: answer_negative(:,:)
16773 logical,
allocatable:: check_negative(:,:)
16774 logical,
allocatable:: both_negative(:,:)
16778 if (
present(negative_support))
then 16779 negative_support_on = negative_support
16781 negative_support_on = .true.
16787 answer_shape = shape(answer)
16788 check_shape = shape(check)
16790 consist_shape = answer_shape == check_shape
16792 if (.not. all(consist_shape))
then 16793 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 16795 write(*,*)
' shape of check is (', check_shape,
')' 16796 write(*,*)
' is INCORRECT' 16797 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 16803 allocate( mask_array( &
16804 & answer_shape(1), &
16806 & answer_shape(2) ) &
16810 & answer_shape(1), &
16812 & answer_shape(2) ) &
16815 allocate( judge_rev( &
16816 & answer_shape(1), &
16818 & answer_shape(2) ) &
16821 allocate( answer_negative( &
16822 & answer_shape(1), &
16824 & answer_shape(2) ) &
16827 allocate( check_negative( &
16828 & answer_shape(1), &
16830 & answer_shape(2) ) &
16833 allocate( both_negative( &
16834 & answer_shape(1), &
16836 & answer_shape(2) ) &
16839 answer_negative = answer < 0.0_dp
16840 check_negative = check < 0.0_dp
16841 both_negative = answer_negative .and. check_negative
16842 if (.not. negative_support_on) both_negative = .false.
16844 judge = answer > check
16845 where (both_negative) judge = .not. judge
16847 judge_rev = .not. judge
16848 err_flag = any(judge_rev)
16850 pos = maxloc(mask_array, judge_rev)
16864 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
16866 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
16870 & trim(adjustl(pos_array(1))) //
',' // &
16872 & trim(adjustl(pos_array(2))) //
')' 16874 if ( both_negative( &
16879 abs_mes =
'ABSOLUTE value of' 16886 deallocate(mask_array, judge, judge_rev)
16887 deallocate(answer_negative, check_negative, both_negative)
16893 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 16895 write(*,*)
' ' // trim(abs_mes) // &
16896 &
' check' // trim(pos_str) //
' = ', wrong
16897 write(*,*)
' is NOT LESS THAN' 16898 write(*,*)
' ' // trim(abs_mes) // &
16899 &
' answer' // trim(pos_str) //
' = ', right
16903 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 16911 & message, answer, check, negative_support)
16914 character(*),
intent(in):: message
16915 real(DP),
intent(in):: answer(:,:,:)
16916 real(DP),
intent(in):: check(:,:,:)
16917 logical,
intent(in),
optional:: negative_support
16919 logical:: negative_support_on
16920 character(STRING):: pos_str
16921 character(TOKEN):: abs_mes
16922 real(DP):: wrong, right
16924 integer:: answer_shape(3), check_shape(3), pos(3)
16925 logical:: consist_shape(3)
16926 character(TOKEN):: pos_array(3)
16927 integer,
allocatable:: mask_array(:,:,:)
16928 logical,
allocatable:: judge(:,:,:)
16929 logical,
allocatable:: judge_rev(:,:,:)
16930 logical,
allocatable:: answer_negative(:,:,:)
16931 logical,
allocatable:: check_negative(:,:,:)
16932 logical,
allocatable:: both_negative(:,:,:)
16936 if (
present(negative_support))
then 16937 negative_support_on = negative_support
16939 negative_support_on = .true.
16945 answer_shape = shape(answer)
16946 check_shape = shape(check)
16948 consist_shape = answer_shape == check_shape
16950 if (.not. all(consist_shape))
then 16951 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 16953 write(*,*)
' shape of check is (', check_shape,
')' 16954 write(*,*)
' is INCORRECT' 16955 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 16961 allocate( mask_array( &
16962 & answer_shape(1), &
16964 & answer_shape(2), &
16966 & answer_shape(3) ) &
16970 & answer_shape(1), &
16972 & answer_shape(2), &
16974 & answer_shape(3) ) &
16977 allocate( judge_rev( &
16978 & answer_shape(1), &
16980 & answer_shape(2), &
16982 & answer_shape(3) ) &
16985 allocate( answer_negative( &
16986 & answer_shape(1), &
16988 & answer_shape(2), &
16990 & answer_shape(3) ) &
16993 allocate( check_negative( &
16994 & answer_shape(1), &
16996 & answer_shape(2), &
16998 & answer_shape(3) ) &
17001 allocate( both_negative( &
17002 & answer_shape(1), &
17004 & answer_shape(2), &
17006 & answer_shape(3) ) &
17009 answer_negative = answer < 0.0_dp
17010 check_negative = check < 0.0_dp
17011 both_negative = answer_negative .and. check_negative
17012 if (.not. negative_support_on) both_negative = .false.
17014 judge = answer > check
17015 where (both_negative) judge = .not. judge
17017 judge_rev = .not. judge
17018 err_flag = any(judge_rev)
17020 pos = maxloc(mask_array, judge_rev)
17038 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
17040 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
17042 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
17046 & trim(adjustl(pos_array(1))) //
',' // &
17048 & trim(adjustl(pos_array(2))) //
',' // &
17050 & trim(adjustl(pos_array(3))) //
')' 17052 if ( both_negative( &
17059 abs_mes =
'ABSOLUTE value of' 17066 deallocate(mask_array, judge, judge_rev)
17067 deallocate(answer_negative, check_negative, both_negative)
17073 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 17075 write(*,*)
' ' // trim(abs_mes) // &
17076 &
' check' // trim(pos_str) //
' = ', wrong
17077 write(*,*)
' is NOT LESS THAN' 17078 write(*,*)
' ' // trim(abs_mes) // &
17079 &
' answer' // trim(pos_str) //
' = ', right
17083 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 17091 & message, answer, check, negative_support)
17094 character(*),
intent(in):: message
17095 real(DP),
intent(in):: answer(:,:,:,:)
17096 real(DP),
intent(in):: check(:,:,:,:)
17097 logical,
intent(in),
optional:: negative_support
17099 logical:: negative_support_on
17100 character(STRING):: pos_str
17101 character(TOKEN):: abs_mes
17102 real(DP):: wrong, right
17104 integer:: answer_shape(4), check_shape(4), pos(4)
17105 logical:: consist_shape(4)
17106 character(TOKEN):: pos_array(4)
17107 integer,
allocatable:: mask_array(:,:,:,:)
17108 logical,
allocatable:: judge(:,:,:,:)
17109 logical,
allocatable:: judge_rev(:,:,:,:)
17110 logical,
allocatable:: answer_negative(:,:,:,:)
17111 logical,
allocatable:: check_negative(:,:,:,:)
17112 logical,
allocatable:: both_negative(:,:,:,:)
17116 if (
present(negative_support))
then 17117 negative_support_on = negative_support
17119 negative_support_on = .true.
17125 answer_shape = shape(answer)
17126 check_shape = shape(check)
17128 consist_shape = answer_shape == check_shape
17130 if (.not. all(consist_shape))
then 17131 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 17133 write(*,*)
' shape of check is (', check_shape,
')' 17134 write(*,*)
' is INCORRECT' 17135 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 17141 allocate( mask_array( &
17142 & answer_shape(1), &
17144 & answer_shape(2), &
17146 & answer_shape(3), &
17148 & answer_shape(4) ) &
17152 & answer_shape(1), &
17154 & answer_shape(2), &
17156 & answer_shape(3), &
17158 & answer_shape(4) ) &
17161 allocate( judge_rev( &
17162 & answer_shape(1), &
17164 & answer_shape(2), &
17166 & answer_shape(3), &
17168 & answer_shape(4) ) &
17171 allocate( answer_negative( &
17172 & answer_shape(1), &
17174 & answer_shape(2), &
17176 & answer_shape(3), &
17178 & answer_shape(4) ) &
17181 allocate( check_negative( &
17182 & answer_shape(1), &
17184 & answer_shape(2), &
17186 & answer_shape(3), &
17188 & answer_shape(4) ) &
17191 allocate( both_negative( &
17192 & answer_shape(1), &
17194 & answer_shape(2), &
17196 & answer_shape(3), &
17198 & answer_shape(4) ) &
17201 answer_negative = answer < 0.0_dp
17202 check_negative = check < 0.0_dp
17203 both_negative = answer_negative .and. check_negative
17204 if (.not. negative_support_on) both_negative = .false.
17206 judge = answer > check
17207 where (both_negative) judge = .not. judge
17209 judge_rev = .not. judge
17210 err_flag = any(judge_rev)
17212 pos = maxloc(mask_array, judge_rev)
17234 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
17236 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
17238 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
17240 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
17244 & trim(adjustl(pos_array(1))) //
',' // &
17246 & trim(adjustl(pos_array(2))) //
',' // &
17248 & trim(adjustl(pos_array(3))) //
',' // &
17250 & trim(adjustl(pos_array(4))) //
')' 17252 if ( both_negative( &
17261 abs_mes =
'ABSOLUTE value of' 17268 deallocate(mask_array, judge, judge_rev)
17269 deallocate(answer_negative, check_negative, both_negative)
17275 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 17277 write(*,*)
' ' // trim(abs_mes) // &
17278 &
' check' // trim(pos_str) //
' = ', wrong
17279 write(*,*)
' is NOT LESS THAN' 17280 write(*,*)
' ' // trim(abs_mes) // &
17281 &
' answer' // trim(pos_str) //
' = ', right
17285 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 17293 & message, answer, check, negative_support)
17296 character(*),
intent(in):: message
17297 real(DP),
intent(in):: answer(:,:,:,:,:)
17298 real(DP),
intent(in):: check(:,:,:,:,:)
17299 logical,
intent(in),
optional:: negative_support
17301 logical:: negative_support_on
17302 character(STRING):: pos_str
17303 character(TOKEN):: abs_mes
17304 real(DP):: wrong, right
17306 integer:: answer_shape(5), check_shape(5), pos(5)
17307 logical:: consist_shape(5)
17308 character(TOKEN):: pos_array(5)
17309 integer,
allocatable:: mask_array(:,:,:,:,:)
17310 logical,
allocatable:: judge(:,:,:,:,:)
17311 logical,
allocatable:: judge_rev(:,:,:,:,:)
17312 logical,
allocatable:: answer_negative(:,:,:,:,:)
17313 logical,
allocatable:: check_negative(:,:,:,:,:)
17314 logical,
allocatable:: both_negative(:,:,:,:,:)
17318 if (
present(negative_support))
then 17319 negative_support_on = negative_support
17321 negative_support_on = .true.
17327 answer_shape = shape(answer)
17328 check_shape = shape(check)
17330 consist_shape = answer_shape == check_shape
17332 if (.not. all(consist_shape))
then 17333 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 17335 write(*,*)
' shape of check is (', check_shape,
')' 17336 write(*,*)
' is INCORRECT' 17337 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 17343 allocate( mask_array( &
17344 & answer_shape(1), &
17346 & answer_shape(2), &
17348 & answer_shape(3), &
17350 & answer_shape(4), &
17352 & answer_shape(5) ) &
17356 & answer_shape(1), &
17358 & answer_shape(2), &
17360 & answer_shape(3), &
17362 & answer_shape(4), &
17364 & answer_shape(5) ) &
17367 allocate( judge_rev( &
17368 & answer_shape(1), &
17370 & answer_shape(2), &
17372 & answer_shape(3), &
17374 & answer_shape(4), &
17376 & answer_shape(5) ) &
17379 allocate( answer_negative( &
17380 & answer_shape(1), &
17382 & answer_shape(2), &
17384 & answer_shape(3), &
17386 & answer_shape(4), &
17388 & answer_shape(5) ) &
17391 allocate( check_negative( &
17392 & answer_shape(1), &
17394 & answer_shape(2), &
17396 & answer_shape(3), &
17398 & answer_shape(4), &
17400 & answer_shape(5) ) &
17403 allocate( both_negative( &
17404 & answer_shape(1), &
17406 & answer_shape(2), &
17408 & answer_shape(3), &
17410 & answer_shape(4), &
17412 & answer_shape(5) ) &
17415 answer_negative = answer < 0.0_dp
17416 check_negative = check < 0.0_dp
17417 both_negative = answer_negative .and. check_negative
17418 if (.not. negative_support_on) both_negative = .false.
17420 judge = answer > check
17421 where (both_negative) judge = .not. judge
17423 judge_rev = .not. judge
17424 err_flag = any(judge_rev)
17426 pos = maxloc(mask_array, judge_rev)
17452 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
17454 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
17456 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
17458 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
17460 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
17464 & trim(adjustl(pos_array(1))) //
',' // &
17466 & trim(adjustl(pos_array(2))) //
',' // &
17468 & trim(adjustl(pos_array(3))) //
',' // &
17470 & trim(adjustl(pos_array(4))) //
',' // &
17472 & trim(adjustl(pos_array(5))) //
')' 17474 if ( both_negative( &
17485 abs_mes =
'ABSOLUTE value of' 17492 deallocate(mask_array, judge, judge_rev)
17493 deallocate(answer_negative, check_negative, both_negative)
17499 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 17501 write(*,*)
' ' // trim(abs_mes) // &
17502 &
' check' // trim(pos_str) //
' = ', wrong
17503 write(*,*)
' is NOT LESS THAN' 17504 write(*,*)
' ' // trim(abs_mes) // &
17505 &
' answer' // trim(pos_str) //
' = ', right
17509 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 17517 & message, answer, check, negative_support)
17520 character(*),
intent(in):: message
17521 real(DP),
intent(in):: answer(:,:,:,:,:,:)
17522 real(DP),
intent(in):: check(:,:,:,:,:,:)
17523 logical,
intent(in),
optional:: negative_support
17525 logical:: negative_support_on
17526 character(STRING):: pos_str
17527 character(TOKEN):: abs_mes
17528 real(DP):: wrong, right
17530 integer:: answer_shape(6), check_shape(6), pos(6)
17531 logical:: consist_shape(6)
17532 character(TOKEN):: pos_array(6)
17533 integer,
allocatable:: mask_array(:,:,:,:,:,:)
17534 logical,
allocatable:: judge(:,:,:,:,:,:)
17535 logical,
allocatable:: judge_rev(:,:,:,:,:,:)
17536 logical,
allocatable:: answer_negative(:,:,:,:,:,:)
17537 logical,
allocatable:: check_negative(:,:,:,:,:,:)
17538 logical,
allocatable:: both_negative(:,:,:,:,:,:)
17542 if (
present(negative_support))
then 17543 negative_support_on = negative_support
17545 negative_support_on = .true.
17551 answer_shape = shape(answer)
17552 check_shape = shape(check)
17554 consist_shape = answer_shape == check_shape
17556 if (.not. all(consist_shape))
then 17557 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 17559 write(*,*)
' shape of check is (', check_shape,
')' 17560 write(*,*)
' is INCORRECT' 17561 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 17567 allocate( mask_array( &
17568 & answer_shape(1), &
17570 & answer_shape(2), &
17572 & answer_shape(3), &
17574 & answer_shape(4), &
17576 & answer_shape(5), &
17578 & answer_shape(6) ) &
17582 & answer_shape(1), &
17584 & answer_shape(2), &
17586 & answer_shape(3), &
17588 & answer_shape(4), &
17590 & answer_shape(5), &
17592 & answer_shape(6) ) &
17595 allocate( judge_rev( &
17596 & answer_shape(1), &
17598 & answer_shape(2), &
17600 & answer_shape(3), &
17602 & answer_shape(4), &
17604 & answer_shape(5), &
17606 & answer_shape(6) ) &
17609 allocate( answer_negative( &
17610 & answer_shape(1), &
17612 & answer_shape(2), &
17614 & answer_shape(3), &
17616 & answer_shape(4), &
17618 & answer_shape(5), &
17620 & answer_shape(6) ) &
17623 allocate( check_negative( &
17624 & answer_shape(1), &
17626 & answer_shape(2), &
17628 & answer_shape(3), &
17630 & answer_shape(4), &
17632 & answer_shape(5), &
17634 & answer_shape(6) ) &
17637 allocate( both_negative( &
17638 & answer_shape(1), &
17640 & answer_shape(2), &
17642 & answer_shape(3), &
17644 & answer_shape(4), &
17646 & answer_shape(5), &
17648 & answer_shape(6) ) &
17651 answer_negative = answer < 0.0_dp
17652 check_negative = check < 0.0_dp
17653 both_negative = answer_negative .and. check_negative
17654 if (.not. negative_support_on) both_negative = .false.
17656 judge = answer > check
17657 where (both_negative) judge = .not. judge
17659 judge_rev = .not. judge
17660 err_flag = any(judge_rev)
17662 pos = maxloc(mask_array, judge_rev)
17692 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
17694 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
17696 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
17698 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
17700 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
17702 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
17706 & trim(adjustl(pos_array(1))) //
',' // &
17708 & trim(adjustl(pos_array(2))) //
',' // &
17710 & trim(adjustl(pos_array(3))) //
',' // &
17712 & trim(adjustl(pos_array(4))) //
',' // &
17714 & trim(adjustl(pos_array(5))) //
',' // &
17716 & trim(adjustl(pos_array(6))) //
')' 17718 if ( both_negative( &
17731 abs_mes =
'ABSOLUTE value of' 17738 deallocate(mask_array, judge, judge_rev)
17739 deallocate(answer_negative, check_negative, both_negative)
17745 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 17747 write(*,*)
' ' // trim(abs_mes) // &
17748 &
' check' // trim(pos_str) //
' = ', wrong
17749 write(*,*)
' is NOT LESS THAN' 17750 write(*,*)
' ' // trim(abs_mes) // &
17751 &
' answer' // trim(pos_str) //
' = ', right
17755 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK' 17763 & message, answer, check, negative_support)
17766 character(*),
intent(in):: message
17767 real(DP),
intent(in):: answer(:,:,:,:,:,:,:)
17768 real(DP),
intent(in):: check(:,:,:,:,:,:,:)
17769 logical,
intent(in),
optional:: negative_support
17771 logical:: negative_support_on
17772 character(STRING):: pos_str
17773 character(TOKEN):: abs_mes
17774 real(DP):: wrong, right
17776 integer:: answer_shape(7), check_shape(7), pos(7)
17777 logical:: consist_shape(7)
17778 character(TOKEN):: pos_array(7)
17779 integer,
allocatable:: mask_array(:,:,:,:,:,:,:)
17780 logical,
allocatable:: judge(:,:,:,:,:,:,:)
17781 logical,
allocatable:: judge_rev(:,:,:,:,:,:,:)
17782 logical,
allocatable:: answer_negative(:,:,:,:,:,:,:)
17783 logical,
allocatable:: check_negative(:,:,:,:,:,:,:)
17784 logical,
allocatable:: both_negative(:,:,:,:,:,:,:)
17788 if (
present(negative_support))
then 17789 negative_support_on = negative_support
17791 negative_support_on = .true.
17797 answer_shape = shape(answer)
17798 check_shape = shape(check)
17800 consist_shape = answer_shape == check_shape
17802 if (.not. all(consist_shape))
then 17803 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 17805 write(*,*)
' shape of check is (', check_shape,
')' 17806 write(*,*)
' is INCORRECT' 17807 write(*,*)
' Correct shape of answer is (', answer_shape,
')' 17813 allocate( mask_array( &
17814 & answer_shape(1), &
17816 & answer_shape(2), &
17818 & answer_shape(3), &
17820 & answer_shape(4), &
17822 & answer_shape(5), &
17824 & answer_shape(6), &
17826 & answer_shape(7) ) &
17830 & answer_shape(1), &
17832 & answer_shape(2), &
17834 & answer_shape(3), &
17836 & answer_shape(4), &
17838 & answer_shape(5), &
17840 & answer_shape(6), &
17842 & answer_shape(7) ) &
17845 allocate( judge_rev( &
17846 & answer_shape(1), &
17848 & answer_shape(2), &
17850 & answer_shape(3), &
17852 & answer_shape(4), &
17854 & answer_shape(5), &
17856 & answer_shape(6), &
17858 & answer_shape(7) ) &
17861 allocate( answer_negative( &
17862 & answer_shape(1), &
17864 & answer_shape(2), &
17866 & answer_shape(3), &
17868 & answer_shape(4), &
17870 & answer_shape(5), &
17872 & answer_shape(6), &
17874 & answer_shape(7) ) &
17877 allocate( check_negative( &
17878 & answer_shape(1), &
17880 & answer_shape(2), &
17882 & answer_shape(3), &
17884 & answer_shape(4), &
17886 & answer_shape(5), &
17888 & answer_shape(6), &
17890 & answer_shape(7) ) &
17893 allocate( both_negative( &
17894 & answer_shape(1), &
17896 & answer_shape(2), &
17898 & answer_shape(3), &
17900 & answer_shape(4), &
17902 & answer_shape(5), &
17904 & answer_shape(6), &
17906 & answer_shape(7) ) &
17909 answer_negative = answer < 0.0_dp
17910 check_negative = check < 0.0_dp
17911 both_negative = answer_negative .and. check_negative
17912 if (.not. negative_support_on) both_negative = .false.
17914 judge = answer > check
17915 where (both_negative) judge = .not. judge
17917 judge_rev = .not. judge
17918 err_flag = any(judge_rev)
17920 pos = maxloc(mask_array, judge_rev)
17954 write(unit=pos_array(1), fmt=
"(i20)") pos(1)
17956 write(unit=pos_array(2), fmt=
"(i20)") pos(2)
17958 write(unit=pos_array(3), fmt=
"(i20)") pos(3)
17960 write(unit=pos_array(4), fmt=
"(i20)") pos(4)
17962 write(unit=pos_array(5), fmt=
"(i20)") pos(5)
17964 write(unit=pos_array(6), fmt=
"(i20)") pos(6)
17966 write(unit=pos_array(7), fmt=
"(i20)") pos(7)
17970 & trim(adjustl(pos_array(1))) //
',' // &
17972 & trim(adjustl(pos_array(2))) //
',' // &
17974 & trim(adjustl(pos_array(3))) //
',' // &
17976 & trim(adjustl(pos_array(4))) //
',' // &
17978 & trim(adjustl(pos_array(5))) //
',' // &
17980 & trim(adjustl(pos_array(6))) //
',' // &
17982 & trim(adjustl(pos_array(7))) //
')' 17984 if ( both_negative( &
17999 abs_mes =
'ABSOLUTE value of' 18006 deallocate(mask_array, judge, judge_rev)
18007 deallocate(answer_negative, check_negative, both_negative)
18013 write(*,*)
' *** Error [AssertLT] *** Checking ' // trim(message) //
' FAILURE' 18015 write(*,*)
' ' // trim(abs_mes) // &
18016 &
' check' // trim(pos_str) //
' = ', wrong
18017 write(*,*)
' is NOT LESS THAN' 18018 write(*,*)
' ' // trim(abs_mes) // &
18019 &
' answer' // trim(pos_str) //
' = ', right
18023 write(*,*)
' *** MESSAGE [AssertLT] *** Checking ' // trim(message) //
' OK'
subroutine dctestassertgreaterthandouble1(message, answer, check, negative_support)
subroutine dctestassertequalint6(message, answer, check)
subroutine dctestassertgreaterthanreal0(message, answer, check, negative_support)
subroutine dctestassertequaldouble7digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertlessthanint1(message, answer, check, negative_support)
subroutine dctestassertequalint7(message, answer, check)
subroutine dctestassertequaldouble3(message, answer, check)
subroutine dctestassertlessthanint5(message, answer, check, negative_support)
subroutine dctestassertequaldouble7(message, answer, check)
subroutine dctestassertequalreal1(message, answer, check)
subroutine dctestassertequaldouble1digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertequalchar1(message, answer, check)
subroutine dctestassertequallogical7(message, answer, check)
subroutine dctestassertequaldouble4(message, answer, check)
subroutine dctestassertequalchar4(message, answer, check)
subroutine dctestassertequallogical4(message, answer, check)
subroutine dctestassertequalreal3(message, answer, check)
subroutine dctestassertlessthanreal0(message, answer, check, negative_support)
subroutine dctestassertlessthandouble0(message, answer, check, negative_support)
subroutine dctestassertequalreal5digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertequalreal7(message, answer, check)
subroutine dctestassertgreaterthanint1(message, answer, check, negative_support)
subroutine dctestassertequaldouble0digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertequalint2(message, answer, check)
subroutine dctestassertlessthanint7(message, answer, check, negative_support)
subroutine dctestassertequalchar5(message, answer, check)
subroutine dctestassertequalreal2digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertlessthandouble1(message, answer, check, negative_support)
subroutine dctestassertequallogical3(message, answer, check)
subroutine dctestassertequallogical0(message, answer, check)
subroutine dctestassertequalreal3digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertequallogical1(message, answer, check)
subroutine dctestassertequalint1(message, answer, check)
subroutine dctestassertgreaterthanreal2(message, answer, check, negative_support)
subroutine dctestassertgreaterthanint6(message, answer, check, negative_support)
subroutine dctestassertgreaterthanreal7(message, answer, check, negative_support)
subroutine dctestassertequalreal5(message, answer, check)
subroutine dctestassertlessthanreal2(message, answer, check, negative_support)
integer, parameter, public token
subroutine dctestassertgreaterthandouble4(message, answer, check, negative_support)
integer, parameter, public string
subroutine dctestassertlessthanint4(message, answer, check, negative_support)
subroutine dctestassertequaldouble1(message, answer, check)
subroutine dctestassertlessthanint2(message, answer, check, negative_support)
subroutine dctestassertequaldouble2(message, answer, check)
subroutine dctestassertgreaterthanint3(message, answer, check, negative_support)
subroutine dctestassertgreaterthanint0(message, answer, check, negative_support)
subroutine dctestassertequallogical2(message, answer, check)
subroutine dctestassertequaldouble6(message, answer, check)
subroutine dctestassertgreaterthanint4(message, answer, check, negative_support)
subroutine dctestassertlessthandouble2(message, answer, check, negative_support)
subroutine dctestassertgreaterthandouble7(message, answer, check, negative_support)
integer, parameter, public dp
subroutine dctestassertlessthanreal5(message, answer, check, negative_support)
subroutine dctestassertequaldouble2digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertequalreal6(message, answer, check)
subroutine dctestassertequaldouble6digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertequalint3(message, answer, check)
subroutine dctestassertequalint0(message, answer, check)
subroutine dctestassertgreaterthanint2(message, answer, check, negative_support)
subroutine dctestassertequaldouble5(message, answer, check)
subroutine dctestassertequaldouble3digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertequaldouble0(message, answer, check)
subroutine dctestassertequallogical5(message, answer, check)
subroutine dctestassertgreaterthandouble0(message, answer, check, negative_support)
subroutine dctestassertlessthanreal1(message, answer, check, negative_support)
subroutine dctestassertlessthandouble3(message, answer, check, negative_support)
subroutine dctestassertgreaterthanreal3(message, answer, check, negative_support)
subroutine dctestassertequalint4(message, answer, check)
subroutine dctestassertequaldouble4digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertequalchar7(message, answer, check)
subroutine dctestassertgreaterthanreal4(message, answer, check, negative_support)
subroutine dctestassertlessthanreal4(message, answer, check, negative_support)
subroutine dctestassertgreaterthandouble3(message, answer, check, negative_support)
subroutine dctestassertlessthandouble7(message, answer, check, negative_support)
subroutine dctestassertequallogical6(message, answer, check)
subroutine dctestassertlessthanreal3(message, answer, check, negative_support)
subroutine dctestassertgreaterthanint7(message, answer, check, negative_support)
subroutine dctestassertlessthanint0(message, answer, check, negative_support)
subroutine dctestassertlessthandouble5(message, answer, check, negative_support)
subroutine dctestassertgreaterthanreal5(message, answer, check, negative_support)
subroutine dctestassertlessthandouble6(message, answer, check, negative_support)
subroutine dctestassertequalreal2(message, answer, check)
subroutine dctestassertequalreal4digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertlessthanreal7(message, answer, check, negative_support)
subroutine dctestassertgreaterthandouble2(message, answer, check, negative_support)
subroutine dctestassertgreaterthanreal6(message, answer, check, negative_support)
subroutine dctestassertequalreal6digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertequaldouble5digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertequalreal4(message, answer, check)
subroutine dctestassertgreaterthandouble6(message, answer, check, negative_support)
subroutine dctestassertlessthandouble4(message, answer, check, negative_support)
subroutine dctestassertequalchar3(message, answer, check)
subroutine dctestassertlessthanint3(message, answer, check, negative_support)
subroutine dctestassertlessthanreal6(message, answer, check, negative_support)
subroutine dctestassertequalint5(message, answer, check)
subroutine dctestassertequalreal1digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertequalreal7digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertequalreal0(message, answer, check)
subroutine dctestassertequalreal0digits(message, answer, check, significant_digits, ignore_digits)
subroutine dctestassertgreaterthandouble5(message, answer, check, negative_support)
subroutine dctestassertequalchar2(message, answer, check)
subroutine dctestassertequalchar6(message, answer, check)
subroutine dctestassertgreaterthanreal1(message, answer, check, negative_support)
subroutine dctestassertgreaterthanint5(message, answer, check, negative_support)
subroutine dctestassertlessthanint6(message, answer, check, negative_support)