421 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
422 INTEGER(INTG),
INTENT(OUT) :: ERR
425 INTEGER(INTG) :: DUMMY_ERR
428 enters(
"LIST_CREATE_FINISH",err,error,*998)
430 IF(
ASSOCIATED(list))
THEN 431 IF(list%LIST_FINISHED)
THEN 432 CALL flagerror(
"List is already finished.",err,error,*998)
435 IF(list%DATA_DIMENSION==1)
THEN 436 SELECT CASE(list%DATA_TYPE)
438 ALLOCATE(list%LIST_INTG(list%INITIAL_SIZE),stat=err)
439 IF(err/=0)
CALL flagerror(
"Could not allocate list integer data.",err,error,*999)
441 ALLOCATE(list%LIST_SP(list%INITIAL_SIZE),stat=err)
442 IF(err/=0)
CALL flagerror(
"Could not allocate list single precision data.",err,error,*999)
444 ALLOCATE(list%LIST_DP(list%INITIAL_SIZE),stat=err)
445 IF(err/=0)
CALL flagerror(
"Could not allocate list double precision data.",err,error,*999)
447 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))//
" is invalid." 448 CALL flagerror(local_error,err,error,*999)
451 SELECT CASE(list%DATA_TYPE)
453 ALLOCATE(list%LIST_INTG2(list%DATA_DIMENSION,list%INITIAL_SIZE),stat=err)
454 IF(err/=0)
CALL flagerror(
"Could not allocate list integer data.",err,error,*999)
456 ALLOCATE(list%LIST_SP2(list%DATA_DIMENSION,list%INITIAL_SIZE),stat=err)
457 IF(err/=0)
CALL flagerror(
"Could not allocate list single precision data.",err,error,*999)
459 ALLOCATE(list%LIST_DP2(list%DATA_DIMENSION,list%INITIAL_SIZE),stat=err)
460 IF(err/=0)
CALL flagerror(
"Could not allocate list double precision data.",err,error,*999)
462 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))//
" is invalid." 463 CALL flagerror(local_error,err,error,*999)
466 list%SIZE=list%INITIAL_SIZE
467 list%LIST_FINISHED=.true.
470 CALL flagerror(
"List is not associated.",err,error,*998)
473 exits(
"LIST_CREATE_FINISH")
476 998 errorsexits(
"LIST_CREATE_FINISH",err,error)
488 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
489 INTEGER(INTG),
INTENT(OUT) :: ERR
493 enters(
"LIST_CREATE_START",err,error,*999)
497 exits(
"LIST_CREATE_START")
499 999 errorsexits(
"LIST_CREATE_START",err,error)
511 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
512 INTEGER(INTG),
INTENT(IN) :: DATA_DIMENSION
513 INTEGER(INTG),
INTENT(OUT) :: ERR
518 enters(
"LIST_DATA_DIMENSION_SET",err,error,*999)
520 IF(
ASSOCIATED(list))
THEN 521 IF(list%LIST_FINISHED)
THEN 522 CALL flagerror(
"List has been finished.",err,error,*999)
524 IF(data_dimension>0)
THEN 525 list%DATA_DIMENSION=data_dimension
527 local_error=
"The specified data dimension of "//
trim(
numbertovstring(data_dimension,
"*",err,error))// &
528 &
" is invalid. The dimension must be > 0." 529 CALL flagerror(local_error,err,error,*999)
533 CALL flagerror(
"List is not associated.",err,error,*999)
536 exits(
"LIST_DATA_DIMENSION_SET")
538 999 errorsexits(
"LIST_DATA_DIMENSION_SET",err,error)
550 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
551 LOGICAL,
INTENT(IN) :: MUTABLE
552 INTEGER(INTG),
INTENT(OUT) :: ERR
555 enters(
"LIST_MUTABLE_SET",err,error,*999)
557 IF(
ASSOCIATED(list))
THEN 558 IF(list%LIST_FINISHED)
THEN 559 CALL flagerror(
"List has been finished.",err,error,*999)
561 list%MUTABLE = mutable
564 CALL flagerror(
"List is not associated.",err,error,*999)
567 exits(
"LIST_MUTABLE_SET")
569 999 errorsexits(
"LIST_MUTABLE_SET",err,error)
581 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
582 INTEGER(INTG),
INTENT(IN) :: DATA_TYPE
583 INTEGER(INTG),
INTENT(OUT) :: ERR
588 enters(
"LIST_DATA_TYPE_SET",err,error,*999)
590 IF(
ASSOCIATED(list))
THEN 591 IF(list%LIST_FINISHED)
THEN 592 CALL flagerror(
"List has been finished.",err,error,*999)
594 SELECT CASE(data_type)
602 local_error=
"The data type of "//
trim(
numbertovstring(data_type,
"*",err,error))//
" is invalid." 603 CALL flagerror(local_error,err,error,*999)
607 CALL flagerror(
"List is not associated.",err,error,*999)
610 exits(
"LIST_DATA_TYPE_SET")
612 999 errorsexits(
"LIST_DATA_TYPE_SET",err,error)
624 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
625 INTEGER(INTG),
INTENT(OUT) :: ERR
629 enters(
"LIST_DESTROY",err,error,*999)
631 IF(
ASSOCIATED(list))
THEN 634 CALL flagerror(
"List is not associated.",err,error,*999)
637 exits(
"LIST_DESTROY")
639 999 errorsexits(
"LIST_DESTROY",err,error)
651 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
652 INTEGER(INTG),
INTENT(OUT) :: ERR
656 enters(
"LIST_FINALISE",err,error,*999)
658 IF(
ASSOCIATED(list))
THEN 659 IF(
ALLOCATED(list%LIST_INTG))
DEALLOCATE(list%LIST_INTG)
660 IF(
ALLOCATED(list%LIST_INTG2))
DEALLOCATE(list%LIST_INTG2)
661 IF(
ALLOCATED(list%LIST_SP))
DEALLOCATE(list%LIST_SP)
662 IF(
ALLOCATED(list%LIST_SP2))
DEALLOCATE(list%LIST_SP2)
663 IF(
ALLOCATED(list%LIST_DP))
DEALLOCATE(list%LIST_DP)
664 IF(
ALLOCATED(list%LIST_DP2))
DEALLOCATE(list%LIST_DP2)
668 exits(
"LIST_FINALISE")
670 999 errorsexits(
"LIST_FINALISE",err,error)
681 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: list
682 TYPE(
list_type),
POINTER,
INTENT(IN) :: appendedList
683 INTEGER(INTG),
INTENT(OUT) :: err
686 INTEGER(INTG) :: newSize
687 INTEGER(INTG),
ALLOCATABLE :: newListIntg(:)
688 REAL(SP),
ALLOCATABLE :: newListSP(:)
689 REAL(DP),
ALLOCATABLE :: newListDP(:)
690 INTEGER(C_INT),
ALLOCATABLE :: newListCInt(:)
693 enters(
"List_AppendList",err,error,*999)
695 IF(
ASSOCIATED(list))
THEN 696 IF(list%LIST_FINISHED)
THEN 697 IF(
ASSOCIATED(appendedlist))
THEN 698 IF(appendedlist%LIST_FINISHED)
THEN 699 IF(list%DATA_TYPE==appendedlist%DATA_TYPE)
THEN 700 IF(list%DATA_DIMENSION==appendedlist%DATA_DIMENSION)
THEN 701 SELECT CASE(list%DATA_DIMENSION)
703 SELECT CASE(list%DATA_TYPE)
705 IF(list%SIZE<list%NUMBER_IN_LIST+appendedlist%NUMBER_IN_LIST)
THEN 707 newsize=max(2*list%NUMBER_IN_LIST,list%NUMBER_IN_LIST+appendedlist%NUMBER_IN_LIST*2)
708 ALLOCATE(newlistintg(newsize),stat=err)
709 IF(err/=0)
CALL flagerror(
"Could not allocate new list.",err,error,*999)
710 newlistintg(1:list%NUMBER_IN_LIST)=list%LIST_INTG(1:list%NUMBER_IN_LIST)
711 CALL move_alloc(newlistintg,list%LIST_INTG)
714 list%LIST_INTG(list%NUMBER_IN_LIST+1:list%NUMBER_IN_LIST+appendedlist%NUMBER_IN_LIST)= &
715 & appendedlist%LIST_INTG(1:appendedlist%NUMBER_IN_LIST)
716 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST+appendedlist%NUMBER_IN_LIST
718 IF(list%SIZE<list%NUMBER_IN_LIST+appendedlist%NUMBER_IN_LIST)
THEN 720 newsize=max(2*list%NUMBER_IN_LIST,list%NUMBER_IN_LIST+appendedlist%NUMBER_IN_LIST*2)
721 ALLOCATE(newlistsp(newsize),stat=err)
722 IF(err/=0)
CALL flagerror(
"Could not allocate new list.",err,error,*999)
723 newlistsp(1:list%NUMBER_IN_LIST)=list%LIST_SP(1:list%NUMBER_IN_LIST)
724 CALL move_alloc(newlistsp,list%LIST_SP)
727 list%LIST_SP(list%NUMBER_IN_LIST+1:list%NUMBER_IN_LIST+appendedlist%NUMBER_IN_LIST)= &
728 & appendedlist%LIST_SP(1:appendedlist%NUMBER_IN_LIST)
729 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST+appendedlist%NUMBER_IN_LIST
731 IF(list%SIZE<list%NUMBER_IN_LIST+appendedlist%NUMBER_IN_LIST)
THEN 733 newsize=max(2*list%NUMBER_IN_LIST,list%NUMBER_IN_LIST+appendedlist%NUMBER_IN_LIST*2)
734 ALLOCATE(newlistdp(newsize),stat=err)
735 IF(err/=0)
CALL flagerror(
"Could not allocate new list.",err,error,*999)
736 newlistdp(1:list%NUMBER_IN_LIST)=list%LIST_DP(1:list%NUMBER_IN_LIST)
737 CALL move_alloc(newlistdp,list%LIST_DP)
740 list%LIST_DP(list%NUMBER_IN_LIST+1:list%NUMBER_IN_LIST+appendedlist%NUMBER_IN_LIST)= &
741 & appendedlist%LIST_DP(1:appendedlist%NUMBER_IN_LIST)
742 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST+appendedlist%NUMBER_IN_LIST
745 &
" is invalid.",err,error,*999)
748 CALL flagerror(
"Dimensions > 1 not implemented for appended to a list",err,error,*999)
751 localerror=
"Invalid data dimension. The list to append has data dimension of "// &
752 &
trim(
numbertovstring(appendedlist%DATA_DIMENSION,
"*",err,error))//
" and the list data dimension is "// &
754 CALL flagerror(localerror,err,error,*999)
757 localerror=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
758 &
" does not match the data type of the list to append" 759 CALL flagerror(localerror,err,error,*999)
762 CALL flagerror(
"The list to append has not been finished",err,error,*999)
765 CALL flagerror(
"The list to append is not associated",err,error,*999)
768 CALL flagerror(
"The list has not been finished",err,error,*999)
771 CALL flagerror(
"List is not associated",err,error,*999)
774 exits(
"List_AppendList")
776 999
IF(
ALLOCATED(newlistintg))
DEALLOCATE(newlistintg)
777 IF(
ALLOCATED(newlistsp))
DEALLOCATE(newlistsp)
778 IF(
ALLOCATED(newlistdp))
DEALLOCATE(newlistdp)
779 IF(
ALLOCATED(newlistcint))
DEALLOCATE(newlistcint)
780 errorsexits(
"List_AppendList",err,error)
791 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: list
792 INTEGER(INTG),
INTENT(OUT) :: err
795 enters(
"List_ClearItems",err,error,*999)
797 IF(
ASSOCIATED(list))
THEN 798 IF(list%LIST_FINISHED)
THEN 799 IF(list%mutable)
THEN 800 list%NUMBER_IN_LIST=0
802 CALL flagerror(
"The list is not mutable",err,error,*999)
805 CALL flagerror(
"The list has not been finished",err,error,*999)
808 CALL flagerror(
"List is not associated",err,error,*999)
811 exits(
"List_ClearItems")
813 999 errorsexits(
"List_ClearItems",err,error)
824 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
825 INTEGER(INTG),
INTENT(OUT) :: ERR
828 INTEGER(INTG) :: DUMMY_ERR
831 enters(
"LIST_INITIALISE",err,error,*998)
833 IF(
ASSOCIATED(list))
THEN 834 CALL flagerror(
"List is already associated.",err,error,*998)
836 ALLOCATE(list,stat=err)
837 IF(err/=0)
CALL flagerror(
"Could not allocate list.",err,error,*999)
838 list%LIST_FINISHED=.false.
840 list%NUMBER_IN_LIST=0
841 list%DATA_DIMENSION=1
850 exits(
"LIST_INITIALISE")
853 998 errorsexits(
"LIST_INITIALISE",err,error)
865 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
866 INTEGER(INTG),
INTENT(IN) :: INITIAL_SIZE
867 INTEGER(INTG),
INTENT(OUT) :: ERR
872 enters(
"LIST_INITIAL_SIZE_SET",err,error,*999)
874 IF(
ASSOCIATED(list))
THEN 875 IF(list%LIST_FINISHED)
THEN 876 CALL flagerror(
"List has been finished.",err,error,*999)
878 IF(initial_size>0)
THEN 879 list%INITIAL_SIZE=initial_size
882 &
" is invalid. The size must be > 0." 883 CALL flagerror(local_error,err,error,*999)
887 CALL flagerror(
"List is not associated",err,error,*999)
890 exits(
"LIST_INTIIAL_SIZE_SET")
892 999 errorsexits(
"LIST_INITIAL_SIZE_SET",err,error)
903 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
904 INTEGER(INTG),
INTENT(IN) :: ITEM
905 INTEGER(INTG),
INTENT(OUT) :: ERR
908 INTEGER(INTG) :: NEW_SIZE
909 INTEGER(INTG),
ALLOCATABLE :: NEW_LIST(:)
912 enters(
"LIST_ITEM_ADD_INTG1",err,error,*999)
914 IF(
ASSOCIATED(list))
THEN 915 IF(list%LIST_FINISHED)
THEN 917 IF(list%DATA_DIMENSION==1)
THEN 918 IF(list%NUMBER_IN_LIST==list%SIZE)
THEN 920 new_size=max(2*list%NUMBER_IN_LIST,1)
921 ALLOCATE(new_list(new_size),stat=err)
922 IF(err/=0)
CALL flagerror(
"Could not allocate new list.",err,error,*999)
923 new_list(1:list%NUMBER_IN_LIST)=list%LIST_INTG(1:list%NUMBER_IN_LIST)
924 CALL move_alloc(new_list,list%LIST_INTG)
927 list%LIST_INTG(list%NUMBER_IN_LIST+1)=item
928 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST+1
930 local_error=
"Invalid data dimension. The supplied data dimension is 1 and the list data dimension is "// &
932 CALL flagerror(local_error,err,error,*999)
935 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
936 &
" does not match the integer type of the supplied list item" 937 CALL flagerror(local_error,err,error,*999)
940 CALL flagerror(
"The list has not been finished",err,error,*999)
943 CALL flagerror(
"List is not associated",err,error,*999)
946 exits(
"LIST_ITEM_ADD_INTG1")
948 999
IF(
ALLOCATED(new_list))
DEALLOCATE(new_list)
949 errorsexits(
"LIST_ITEM_ADD_INTG1",err,error)
960 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
961 INTEGER(INTG),
INTENT(IN) :: ITEM(:)
962 INTEGER(INTG),
INTENT(OUT) :: ERR
965 INTEGER(INTG) :: NEW_SIZE
966 INTEGER(INTG),
ALLOCATABLE :: NEW_LIST(:,:)
969 enters(
"LIST_ITEM_ADD_INTG2",err,error,*999)
971 IF(
ASSOCIATED(list))
THEN 972 IF(list%LIST_FINISHED)
THEN 974 IF(list%DATA_DIMENSION==
SIZE(item,1))
THEN 975 IF(list%NUMBER_IN_LIST==list%SIZE)
THEN 977 new_size=max(2*list%NUMBER_IN_LIST,1)
978 ALLOCATE(new_list(list%DATA_DIMENSION,new_size),stat=err)
979 IF(err/=0)
CALL flagerror(
"Could not allocate new list.",err,error,*999)
980 new_list(:,1:list%NUMBER_IN_LIST)=list%LIST_INTG2(:,1:list%NUMBER_IN_LIST)
981 CALL move_alloc(new_list,list%LIST_INTG2)
984 list%LIST_INTG2(:,list%NUMBER_IN_LIST+1)=item
985 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST+1
987 local_error=
"Invalid data dimension. The supplied data dimension is "// &
988 &
trim(
numbertovstring(
SIZE(item,1),
"*",err,error))//
" and the list data dimension is "// &
990 CALL flagerror(local_error,err,error,*999)
993 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
994 &
" does not match the integer type of the supplied list item." 995 CALL flagerror(local_error,err,error,*999)
998 CALL flagerror(
"The list has not been finished.",err,error,*999)
1001 CALL flagerror(
"List is not associated.",err,error,*999)
1004 exits(
"LIST_ITEM_ADD_INTG2")
1006 999
IF(
ALLOCATED(new_list))
DEALLOCATE(new_list)
1007 errorsexits(
"LIST_ITEM_ADD_INTG2",err,error)
1020 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
1021 REAL(SP),
INTENT(IN) :: ITEM
1022 INTEGER(INTG),
INTENT(OUT) :: ERR
1025 INTEGER(INTG) :: NEW_SIZE
1026 REAL(SP),
ALLOCATABLE :: NEW_LIST(:)
1029 enters(
"LIST_ITEM_ADD_SP1",err,error,*999)
1031 IF(
ASSOCIATED(list))
THEN 1032 IF(list%LIST_FINISHED)
THEN 1034 IF(list%DATA_DIMENSION==1)
THEN 1035 IF(list%NUMBER_IN_LIST==list%SIZE)
THEN 1037 new_size=max(2*list%NUMBER_IN_LIST,1)
1038 ALLOCATE(new_list(new_size),stat=err)
1039 IF(err/=0)
CALL flagerror(
"Could not allocate new list.",err,error,*999)
1040 new_list(1:list%NUMBER_IN_LIST)=list%LIST_SP(1:list%NUMBER_IN_LIST)
1041 CALL move_alloc(new_list,list%LIST_SP)
1044 list%LIST_SP(list%NUMBER_IN_LIST+1)=item
1045 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST+1
1047 local_error=
"Invalid data dimension. The supplied data dimension is 1 and the list data dimension is "// &
1051 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1052 &
" does not match the single precision type of the supplied list item." 1053 CALL flagerror(local_error,err,error,*999)
1056 CALL flagerror(
"The list has not been finished.",err,error,*999)
1059 CALL flagerror(
"List is not associated.",err,error,*999)
1061 exits(
"LIST_ITEM_ADD_SP1")
1063 999
IF(
ALLOCATED(new_list))
DEALLOCATE(new_list)
1064 errorsexits(
"LIST_ITEM_ADD_SP1",err,error)
1076 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
1077 REAL(SP),
INTENT(IN) :: ITEM(:)
1078 INTEGER(INTG),
INTENT(OUT) :: ERR
1081 INTEGER(INTG) :: NEW_SIZE
1082 REAL(SP),
ALLOCATABLE :: NEW_LIST(:,:)
1085 enters(
"LIST_ITEM_ADD_SP2",err,error,*999)
1087 IF(
ASSOCIATED(list))
THEN 1088 IF(list%LIST_FINISHED)
THEN 1090 IF(list%DATA_DIMENSION==
SIZE(item,1))
THEN 1091 IF(list%NUMBER_IN_LIST==list%SIZE)
THEN 1093 new_size=max(2*list%NUMBER_IN_LIST,1)
1094 ALLOCATE(new_list(list%DATA_DIMENSION,new_size),stat=err)
1095 IF(err/=0)
CALL flagerror(
"Could not allocate new list.",err,error,*999)
1096 new_list(:,1:list%NUMBER_IN_LIST)=list%LIST_SP2(:,1:list%NUMBER_IN_LIST)
1097 CALL move_alloc(new_list,list%LIST_SP2)
1100 list%LIST_SP2(:,list%NUMBER_IN_LIST+1)=item
1101 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST+1
1103 local_error=
"Invalid data dimension. The supplied data dimension is "// &
1104 &
trim(
numbertovstring(
SIZE(item,1),
"*",err,error))//
" and the list data dimension is "// &
1106 CALL flagerror(local_error,err,error,*999)
1109 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1110 &
" does not match the single precision type of the supplied list item." 1111 CALL flagerror(local_error,err,error,*999)
1114 CALL flagerror(
"The list has not been finished.",err,error,*999)
1117 CALL flagerror(
"List is not associated.",err,error,*999)
1119 exits(
"LIST_ITEM_ADD_SP2")
1121 999
IF(
ALLOCATED(new_list))
DEALLOCATE(new_list)
1122 errorsexits(
"LIST_ITEM_ADD_SP2",err,error)
1134 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
1135 REAL(DP),
INTENT(IN) :: ITEM
1136 INTEGER(INTG),
INTENT(OUT) :: ERR
1139 INTEGER(INTG) :: NEW_SIZE
1140 REAL(DP),
ALLOCATABLE :: NEW_LIST(:)
1143 enters(
"LIST_ITEM_ADD_DP1",err,error,*999)
1145 IF(
ASSOCIATED(list))
THEN 1146 IF(list%LIST_FINISHED)
THEN 1148 IF(list%DATA_DIMENSION==1)
THEN 1149 IF(list%NUMBER_IN_LIST==list%SIZE)
THEN 1151 new_size=max(2*list%NUMBER_IN_LIST,1)
1152 ALLOCATE(new_list(new_size),stat=err)
1153 IF(err/=0)
CALL flagerror(
"Could not allocate new list.",err,error,*999)
1154 new_list(1:list%NUMBER_IN_LIST)=list%LIST_DP(1:list%NUMBER_IN_LIST)
1155 CALL move_alloc(new_list,list%LIST_DP)
1158 list%LIST_DP(list%NUMBER_IN_LIST+1)=item
1159 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST+1
1161 local_error=
"Invalid data dimension. The supplied data dimension is 1 and the list data dimension is "// &
1163 CALL flagerror(local_error,err,error,*999)
1166 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1167 &
" does not match the double precision type of the supplied list item." 1168 CALL flagerror(local_error,err,error,*999)
1171 CALL flagerror(
"The list has not been finished.",err,error,*999)
1174 CALL flagerror(
"List is not associated.",err,error,*999)
1176 exits(
"LIST_ITEM_ADD_DP1")
1178 999
IF(
ALLOCATED(new_list))
DEALLOCATE(new_list)
1179 errorsexits(
"LIST_ITEM_ADD_DP1",err,error)
1191 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
1192 REAL(DP),
INTENT(IN) :: ITEM(:)
1193 INTEGER(INTG),
INTENT(OUT) :: ERR
1196 INTEGER(INTG) :: NEW_SIZE
1197 REAL(DP),
ALLOCATABLE :: NEW_LIST(:,:)
1200 enters(
"LIST_ITEM_ADD_DP2",err,error,*999)
1202 IF(
ASSOCIATED(list))
THEN 1203 IF(list%LIST_FINISHED)
THEN 1205 IF(list%DATA_DIMENSION==
SIZE(item,1))
THEN 1206 IF(list%NUMBER_IN_LIST==list%SIZE)
THEN 1208 new_size=max(2*list%NUMBER_IN_LIST,1)
1209 ALLOCATE(new_list(list%DATA_DIMENSION,new_size),stat=err)
1210 IF(err/=0)
CALL flagerror(
"Could not allocate new list.",err,error,*999)
1211 new_list(:,1:list%NUMBER_IN_LIST)=list%LIST_DP2(:,1:list%NUMBER_IN_LIST)
1212 CALL move_alloc(new_list,list%LIST_DP2)
1215 list%LIST_DP2(:,list%NUMBER_IN_LIST+1)=item
1216 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST+1
1218 local_error=
"Invalid data dimension. The supplied data dimension is "// &
1219 &
trim(
numbertovstring(
SIZE(item,1),
"*",err,error))//
" and the list data dimension is "// &
1221 CALL flagerror(local_error,err,error,*999)
1224 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1225 &
" does not match the double precision type of the supplied list item." 1226 CALL flagerror(local_error,err,error,*999)
1229 CALL flagerror(
"The list has not been finished.",err,error,*999)
1232 CALL flagerror(
"List is not associated.",err,error,*999)
1234 exits(
"LIST_ITEM_ADD_DP2")
1236 999
IF(
ALLOCATED(new_list))
DEALLOCATE(new_list)
1237 errorsexits(
"LIST_ITEM_ADD_DP2",err,error)
1248 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
1249 INTEGER(INTG),
INTENT(IN) :: LIST_ITEM
1250 INTEGER(INTG),
INTENT(IN) :: ITEM
1251 INTEGER(INTG),
INTENT(OUT) :: ERR
1256 enters(
"LIST_ITEM_SET_INTG1",err,error,*999)
1258 IF(
ASSOCIATED(list))
THEN 1259 IF(list%LIST_FINISHED)
THEN 1261 IF(list%DATA_DIMENSION==1)
THEN 1262 IF(list_item>0.AND.list_item<=list%NUMBER_IN_LIST)
THEN 1263 IF(list%MUTABLE)
THEN 1264 list%LIST_INTG(list_item)=item
1266 CALL flagerror(
"Cannot modify an immutable list.",err,error,*999)
1269 local_error=
"Invalid list index. The supplied index is "// &
1272 CALL flagerror(local_error,err,error,*999)
1275 local_error=
"Invalid data dimension. The supplied data dimension is 1 and the list data dimension is "// &
1277 CALL flagerror(local_error,err,error,*999)
1280 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1281 &
" does not match the integer type of the supplied list item" 1282 CALL flagerror(local_error,err,error,*999)
1285 CALL flagerror(
"The list has not been finished",err,error,*999)
1288 CALL flagerror(
"List is not associated",err,error,*999)
1291 exits(
"LIST_ITEM_SET_INTG1")
1293 999 errorsexits(
"LIST_ITEM_SET_INTG1",err,error)
1304 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
1305 INTEGER(INTG),
INTENT(IN) :: LIST_ITEM
1306 INTEGER(INTG),
INTENT(IN) :: ITEM(:)
1307 INTEGER(INTG),
INTENT(OUT) :: ERR
1312 enters(
"LIST_ITEM_SET_INTG2",err,error,*999)
1314 IF(
ASSOCIATED(list))
THEN 1315 IF(list%LIST_FINISHED)
THEN 1317 IF(list%DATA_DIMENSION==
SIZE(item,1))
THEN 1318 IF(list_item>0.AND.list_item<=list%NUMBER_IN_LIST)
THEN 1319 IF(list%MUTABLE)
THEN 1320 list%LIST_INTG2(:,list_item)=item
1322 CALL flagerror(
"Cannot modify an immutable list.",err,error,*999)
1325 local_error=
"Invalid list index. The supplied index is "//&
1328 CALL flagerror(local_error,err,error,*999)
1331 local_error=
"Invalid data dimension. The supplied data dimension is "// &
1332 &
trim(
numbertovstring(
SIZE(item,1),
"*",err,error))//
" and the list data dimension is "// &
1334 CALL flagerror(local_error,err,error,*999)
1337 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1338 &
" does not match the integer type of the supplied list item." 1339 CALL flagerror(local_error,err,error,*999)
1342 CALL flagerror(
"The list has not been finished.",err,error,*999)
1345 CALL flagerror(
"List is not associated.",err,error,*999)
1348 exits(
"LIST_ITEM_SET_INTG2")
1350 999 errorsexits(
"LIST_ITEM_SET_INTG2",err,error)
1363 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
1364 INTEGER(INTG),
INTENT(IN) :: LIST_ITEM
1365 REAL(SP),
INTENT(IN) :: ITEM
1366 INTEGER(INTG),
INTENT(OUT) :: ERR
1371 enters(
"LIST_ITEM_SET_SP1",err,error,*999)
1373 IF(
ASSOCIATED(list))
THEN 1374 IF(list%LIST_FINISHED)
THEN 1376 IF(list%DATA_DIMENSION==1)
THEN 1377 IF(list_item>0.AND.list_item<=list%NUMBER_IN_LIST)
THEN 1378 IF(list%MUTABLE)
THEN 1379 list%LIST_SP(list_item)=item
1381 CALL flagerror(
"Cannot modify an immutable list.",err,error,*999)
1384 local_error=
"Invalid list index. The supplied index is "//&
1387 CALL flagerror(local_error,err,error,*999)
1390 local_error=
"Invalid data dimension. The supplied data dimension is 1 and the list data dimension is "// &
1394 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1395 &
" does not match the single precision type of the supplied list item." 1396 CALL flagerror(local_error,err,error,*999)
1399 CALL flagerror(
"The list has not been finished.",err,error,*999)
1402 CALL flagerror(
"List is not associated.",err,error,*999)
1404 exits(
"LIST_ITEM_SET_SP1")
1406 999 errorsexits(
"LIST_ITEM_SET_SP1",err,error)
1418 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
1419 INTEGER(INTG),
INTENT(IN) :: LIST_ITEM
1420 REAL(SP),
INTENT(IN) :: ITEM(:)
1421 INTEGER(INTG),
INTENT(OUT) :: ERR
1426 enters(
"LIST_ITEM_SET_SP2",err,error,*999)
1428 IF(
ASSOCIATED(list))
THEN 1429 IF(list%LIST_FINISHED)
THEN 1431 IF(list%DATA_DIMENSION==
SIZE(item,1))
THEN 1432 IF(list_item>0.AND.list_item<=list%NUMBER_IN_LIST)
THEN 1433 IF(list%MUTABLE)
THEN 1434 list%LIST_SP2(:,list_item)=item
1436 CALL flagerror(
"Cannot modify an immutable list.",err,error,*999)
1439 local_error=
"Invalid list index. The supplied index is "//&
1442 CALL flagerror(local_error,err,error,*999)
1445 local_error=
"Invalid data dimension. The supplied data dimension is "// &
1446 &
trim(
numbertovstring(
SIZE(item,1),
"*",err,error))//
" and the list data dimension is "// &
1448 CALL flagerror(local_error,err,error,*999)
1451 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1452 &
" does not match the single precision type of the supplied list item." 1453 CALL flagerror(local_error,err,error,*999)
1456 CALL flagerror(
"The list has not been finished.",err,error,*999)
1459 CALL flagerror(
"List is not associated.",err,error,*999)
1461 exits(
"LIST_ITEM_SET_SP2")
1463 999 errorsexits(
"LIST_ITEM_SET_SP2",err,error)
1475 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
1476 INTEGER(INTG),
INTENT(IN) :: LIST_ITEM
1477 REAL(DP),
INTENT(IN) :: ITEM
1478 INTEGER(INTG),
INTENT(OUT) :: ERR
1483 enters(
"LIST_ITEM_SET_DP1",err,error,*999)
1485 IF(
ASSOCIATED(list))
THEN 1486 IF(list%LIST_FINISHED)
THEN 1488 IF(list%DATA_DIMENSION==1)
THEN 1489 IF(list_item>0.AND.list_item<=list%NUMBER_IN_LIST)
THEN 1490 IF(list%MUTABLE)
THEN 1491 list%LIST_DP(list_item)=item
1493 CALL flagerror(
"Cannot modify an immutable list.",err,error,*999)
1496 local_error=
"Invalid list index. The supplied index is "//&
1499 CALL flagerror(local_error,err,error,*999)
1502 local_error=
"Invalid data dimension. The supplied data dimension is 1 and the list data dimension is "// &
1504 CALL flagerror(local_error,err,error,*999)
1507 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1508 &
" does not match the double precision type of the supplied list item." 1509 CALL flagerror(local_error,err,error,*999)
1512 CALL flagerror(
"The list has not been finished.",err,error,*999)
1515 CALL flagerror(
"List is not associated.",err,error,*999)
1517 exits(
"LIST_ITEM_SET_DP1")
1519 999 errorsexits(
"LIST_ITEM_SET_DP1",err,error)
1531 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
1532 INTEGER(INTG),
INTENT(IN) :: LIST_ITEM
1533 REAL(DP),
INTENT(IN) :: ITEM(:)
1534 INTEGER(INTG),
INTENT(OUT) :: ERR
1539 enters(
"LIST_ITEM_SET_DP2",err,error,*999)
1541 IF(
ASSOCIATED(list))
THEN 1542 IF(list%LIST_FINISHED)
THEN 1544 IF(list%DATA_DIMENSION==
SIZE(item,1))
THEN 1545 IF(list_item>0.AND.list_item<=list%NUMBER_IN_LIST)
THEN 1546 IF(list%MUTABLE)
THEN 1547 list%LIST_DP2(:,list_item)=item
1549 CALL flagerror(
"Cannot modify an immutable list.",err,error,*999)
1552 local_error=
"Invalid list index. The supplied index is "//&
1555 CALL flagerror(local_error,err,error,*999)
1558 local_error=
"Invalid data dimension. The supplied data dimension is "// &
1559 &
trim(
numbertovstring(
SIZE(item,1),
"*",err,error))//
" and the list data dimension is "// &
1561 CALL flagerror(local_error,err,error,*999)
1564 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1565 &
" does not match the double precision type of the supplied list item." 1566 CALL flagerror(local_error,err,error,*999)
1569 CALL flagerror(
"The list has not been finished.",err,error,*999)
1572 CALL flagerror(
"List is not associated.",err,error,*999)
1574 exits(
"LIST_ITEM_SET_DP2")
1576 999 errorsexits(
"LIST_ITEM_SET_DP2",err,error)
1588 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
1589 INTEGER(INTG),
INTENT(IN) :: LIST_ITEM
1590 INTEGER(INTG),
INTENT(OUT) :: ITEM
1591 INTEGER(INTG),
INTENT(OUT) :: ERR
1596 enters(
"LIST_ITEM_GET_INTG1",err,error,*999)
1598 IF(
ASSOCIATED(list))
THEN 1599 IF(list%LIST_FINISHED)
THEN 1601 IF(list_item>0.AND.list_item<=list%NUMBER_IN_LIST)
THEN 1602 IF(list%DATA_DIMENSION==1)
THEN 1603 item=list%LIST_INTG(list_item)
1605 local_error=
"Invalid item dimension. The specified item has dimension 1 and the list is of dimension "// &
1607 CALL flagerror(local_error,err,error,*999)
1610 local_error=
"The specified list item position of "//
trim(
numbertovstring(list_item,
"*",err,error))// &
1611 &
" is invalid. The list item position must be > 0 and <= "// &
1613 CALL flagerror(local_error,err,error,*999)
1616 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1617 &
" does not match the integer type of the supplied list item." 1618 CALL flagerror(local_error,err,error,*999)
1621 CALL flagerror(
"List has not been finished.",err,error,*999)
1624 CALL flagerror(
"List is not associated.",err,error,*999)
1627 exits(
"LIST_ITEM_GET_INTG1")
1629 999 errorsexits(
"LIST_ITEM_GET_INTG1",err,error)
1641 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
1642 INTEGER(INTG),
INTENT(IN) :: LIST_ITEM
1643 INTEGER(INTG),
INTENT(OUT) :: ITEM(:)
1644 INTEGER(INTG),
INTENT(OUT) :: ERR
1649 enters(
"LIST_ITEM_GET_INTG2",err,error,*999)
1651 IF(
ASSOCIATED(list))
THEN 1652 IF(list%LIST_FINISHED)
THEN 1654 IF(list_item>0.AND.list_item<=list%NUMBER_IN_LIST)
THEN 1655 IF(list%DATA_DIMENSION==
SIZE(item,1))
THEN 1656 item=list%LIST_INTG2(:,list_item)
1658 local_error=
"Invalid item dimension. The specified item has dimension "// &
1661 CALL flagerror(local_error,err,error,*999)
1664 local_error=
"The specified list item position of "//
trim(
numbertovstring(list_item,
"*",err,error))// &
1665 &
" is invalid. The list item position must be > 0 and <= "// &
1667 CALL flagerror(local_error,err,error,*999)
1670 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1671 &
" does not match the integer type of the supplied list item." 1672 CALL flagerror(local_error,err,error,*999)
1675 CALL flagerror(
"List has not been finished.",err,error,*999)
1678 CALL flagerror(
"List is not associated.",err,error,*999)
1681 exits(
"LIST_ITEM_GET_INTG2")
1683 999 errorsexits(
"LIST_ITEM_GET_INTG2",err,error)
1695 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
1696 INTEGER(INTG),
INTENT(IN) :: LIST_ITEM
1697 REAL(SP),
INTENT(OUT) :: ITEM
1698 INTEGER(INTG),
INTENT(OUT) :: ERR
1703 enters(
"LIST_ITEM_GET_SP1",err,error,*999)
1705 IF(
ASSOCIATED(list))
THEN 1706 IF(list%LIST_FINISHED)
THEN 1708 IF(list_item>0.AND.list_item<=list%NUMBER_IN_LIST)
THEN 1709 IF(list%DATA_DIMENSION==1)
THEN 1710 item=list%LIST_SP(list_item)
1712 local_error=
"Invalid item dimension. The specified item has dimension 1 and the list is of dimension "// &
1714 CALL flagerror(local_error,err,error,*999)
1717 local_error=
"The specified list item position of "//
trim(
numbertovstring(list_item,
"*",err,error))// &
1718 &
" is invalid. The list item position must be > 0 and <= "// &
1720 CALL flagerror(local_error,err,error,*999)
1723 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1724 &
" does not match the single precision type of the supplied list item." 1725 CALL flagerror(local_error,err,error,*999)
1728 CALL flagerror(
"List has not been finished.",err,error,*999)
1731 CALL flagerror(
"List is not associated.",err,error,*999)
1734 exits(
"LIST_ITEM_GET_SP1")
1736 999 errorsexits(
"LIST_ITEM_GET_SP1",err,error)
1748 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
1749 INTEGER(INTG),
INTENT(IN) :: LIST_ITEM
1750 REAL(SP),
INTENT(OUT) :: ITEM(:)
1751 INTEGER(INTG),
INTENT(OUT) :: ERR
1756 enters(
"LIST_ITEM_GET_SP2",err,error,*999)
1758 IF(
ASSOCIATED(list))
THEN 1759 IF(list%LIST_FINISHED)
THEN 1761 IF(list_item>0.AND.list_item<=list%NUMBER_IN_LIST)
THEN 1762 IF(list%DATA_DIMENSION==
SIZE(item,1))
THEN 1763 item=list%LIST_SP2(:,list_item)
1765 local_error=
"Invalid item dimension. The specified item has dimension "// &
1768 CALL flagerror(local_error,err,error,*999)
1771 local_error=
"The specified list item position of "//
trim(
numbertovstring(list_item,
"*",err,error))// &
1772 &
" is invalid. The list item position must be > 0 and <= "// &
1774 CALL flagerror(local_error,err,error,*999)
1777 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1778 &
" does not match the single precision type of the supplied list item." 1779 CALL flagerror(local_error,err,error,*999)
1782 CALL flagerror(
"List has not been finished.",err,error,*999)
1785 CALL flagerror(
"List is not associated.",err,error,*999)
1788 exits(
"LIST_ITEM_GET_SP2")
1790 999 errorsexits(
"LIST_ITEM_GET_SP2",err,error)
1802 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
1803 INTEGER(INTG),
INTENT(IN) :: LIST_ITEM
1804 REAL(DP),
INTENT(OUT) :: ITEM
1805 INTEGER(INTG),
INTENT(OUT) :: ERR
1810 enters(
"LIST_ITEM_GET_DP1",err,error,*999)
1812 IF(
ASSOCIATED(list))
THEN 1813 IF(list%LIST_FINISHED)
THEN 1815 IF(list_item>0.AND.list_item<=list%NUMBER_IN_LIST)
THEN 1816 IF(list%DATA_DIMENSION==1)
THEN 1817 item=list%LIST_DP(list_item)
1819 local_error=
"Invalid item dimension. The specified item has dimension 1 and the list is of dimension "// &
1821 CALL flagerror(local_error,err,error,*999)
1824 local_error=
"The specified list item position of "//
trim(
numbertovstring(list_item,
"*",err,error))// &
1825 &
" is invalid. The list item position must be > 0 and <= "// &
1827 CALL flagerror(local_error,err,error,*999)
1830 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1831 &
" does not match the double precision type of the supplied list item." 1832 CALL flagerror(local_error,err,error,*999)
1835 CALL flagerror(
"List has not been finished.",err,error,*999)
1838 CALL flagerror(
"List is not associated.",err,error,*999)
1841 exits(
"LIST_ITEM_GET_DP1")
1843 999 errorsexits(
"LIST_ITEM_GET_DP1",err,error)
1855 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
1856 INTEGER(INTG),
INTENT(IN) :: LIST_ITEM
1857 REAL(DP),
INTENT(OUT) :: ITEM(:)
1858 INTEGER(INTG),
INTENT(OUT) :: ERR
1863 enters(
"LIST_ITEM_GET_DP2",err,error,*999)
1865 IF(
ASSOCIATED(list))
THEN 1866 IF(list%LIST_FINISHED)
THEN 1868 IF(list_item>0.AND.list_item<=list%NUMBER_IN_LIST)
THEN 1869 IF(list%DATA_DIMENSION==
SIZE(item,1))
THEN 1870 item=list%LIST_DP2(:,list_item)
1872 local_error=
"Invalid item dimension. The specified item has dimension "// &
1875 CALL flagerror(local_error,err,error,*999)
1878 local_error=
"The specified list item position of "//
trim(
numbertovstring(list_item,
"*",err,error))// &
1879 &
" is invalid. The list item position must be > 0 and <= "// &
1881 CALL flagerror(local_error,err,error,*999)
1884 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1885 &
" does not match the double precision type of the supplied list item." 1886 CALL flagerror(local_error,err,error,*999)
1889 CALL flagerror(
"List has not been finished.",err,error,*999)
1892 CALL flagerror(
"List is not associated.",err,error,*999)
1895 exits(
"LIST_ITEM_GET_DP2")
1897 999 errorsexits(
"LIST_ITEM_GET_DP2",err,error)
1909 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
1910 INTEGER(INTG),
INTENT(IN) :: ITEM
1911 INTEGER(INTG),
INTENT(OUT) :: LIST_ITEM
1912 INTEGER(INTG),
INTENT(OUT) :: ERR
1917 enters(
"LIST_ITEM_IN_LIST_INTG1",err,error,*999)
1919 IF(
ASSOCIATED(list))
THEN 1920 IF(list%LIST_FINISHED)
THEN 1923 IF(list%DATA_DIMENSION==1)
THEN 1924 CALL list_search_linear(list%LIST_INTG(1:list%NUMBER_IN_LIST),item,list_item,err,error,*999)
1926 CALL list_search_linear(list%LIST_INTG2(list%KEY_DIMENSION,1:list%NUMBER_IN_LIST),item,list_item,err,error,*999)
1929 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1930 &
" does not match the integer type of the supplied list item." 1931 CALL flagerror(local_error,err,error,*999)
1934 CALL flagerror(
"List has not been finished.",err,error,*999)
1937 CALL flagerror(
"List is not associated.",err,error,*999)
1940 exits(
"LIST_ITEM_IN_LIST_INTG1")
1942 999 errorsexits(
"LIST_ITEM_IN_LIST_INTG1",err,error)
1954 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
1955 INTEGER(INTG),
INTENT(IN) :: ITEM(:)
1956 INTEGER(INTG),
INTENT(OUT) :: LIST_ITEM
1957 INTEGER(INTG),
INTENT(OUT) :: ERR
1962 enters(
"LIST_ITEM_IN_LIST_INTG2",err,error,*999)
1964 IF(
ASSOCIATED(list))
THEN 1965 IF(list%LIST_FINISHED)
THEN 1968 IF(list%DATA_DIMENSION==1)
THEN 1969 CALL list_search_linear(list%LIST_INTG(1:list%NUMBER_IN_LIST),item(list%KEY_DIMENSION),list_item,err,error,*999)
1971 CALL list_search_linear(list%LIST_INTG2(list%KEY_DIMENSION,1:list%NUMBER_IN_LIST),item(list%KEY_DIMENSION), &
1972 & list_item,err,error,*999)
1975 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
1976 &
" does not match the integer type of the supplied list item." 1977 CALL flagerror(local_error,err,error,*999)
1980 CALL flagerror(
"List has not been finished.",err,error,*999)
1983 CALL flagerror(
"List is not associated.",err,error,*999)
1986 exits(
"LIST_ITEM_IN_LIST_INTG2")
1988 999 errorsexits(
"LIST_ITEM_IN_LIST_INTG2",err,error)
2001 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
2002 REAL(SP),
INTENT(IN) :: ITEM
2003 INTEGER(INTG),
INTENT(OUT) :: LIST_ITEM
2004 INTEGER(INTG),
INTENT(OUT) :: ERR
2009 enters(
"LIST_ITEM_IN_LIST_SP1",err,error,*999)
2011 IF(
ASSOCIATED(list))
THEN 2012 IF(list%LIST_FINISHED)
THEN 2015 IF(list%DATA_DIMENSION==1)
THEN 2016 CALL list_search_linear(list%LIST_SP(1:list%NUMBER_IN_LIST),item,list_item,err,error,*999)
2018 CALL list_search_linear(list%LIST_SP2(list%KEY_DIMENSION,1:list%NUMBER_IN_LIST),item,list_item,err,error,*999)
2021 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
2022 &
" does not match the single precision type of the supplied list item." 2023 CALL flagerror(local_error,err,error,*999)
2026 CALL flagerror(
"List has not been finished.",err,error,*999)
2029 CALL flagerror(
"List is not associated.",err,error,*999)
2032 exits(
"LIST_ITEM_IN_LIST_SP1")
2034 999 errorsexits(
"LIST_ITEM_IN_LIST_SP1",err,error)
2047 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
2048 REAL(SP),
INTENT(IN) :: ITEM(:)
2049 INTEGER(INTG),
INTENT(OUT) :: LIST_ITEM
2050 INTEGER(INTG),
INTENT(OUT) :: ERR
2055 enters(
"LIST_ITEM_IN_LIST_SP2",err,error,*999)
2057 IF(
ASSOCIATED(list))
THEN 2058 IF(list%LIST_FINISHED)
THEN 2061 IF(list%DATA_DIMENSION==1)
THEN 2062 CALL list_search_linear(list%LIST_SP(1:list%NUMBER_IN_LIST),item(list%KEY_DIMENSION),list_item,err,error,*999)
2064 CALL list_search_linear(list%LIST_SP2(list%KEY_DIMENSION,1:list%NUMBER_IN_LIST),item(list%KEY_DIMENSION), &
2065 & list_item,err,error,*999)
2068 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
2069 &
" does not match the single precision type of the supplied list item." 2070 CALL flagerror(local_error,err,error,*999)
2073 CALL flagerror(
"List has not been finished.",err,error,*999)
2076 CALL flagerror(
"List is not associated.",err,error,*999)
2079 exits(
"LIST_ITEM_IN_LIST_SP2")
2081 999 errorsexits(
"LIST_ITEM_IN_LIST_SP2",err,error)
2094 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
2095 REAL(DP),
INTENT(IN) :: ITEM
2096 INTEGER(INTG),
INTENT(OUT) :: LIST_ITEM
2097 INTEGER(INTG),
INTENT(OUT) :: ERR
2102 enters(
"LIST_ITEM_IN_LIST_DP1",err,error,*999)
2104 IF(
ASSOCIATED(list))
THEN 2105 IF(list%LIST_FINISHED)
THEN 2108 IF(list%DATA_DIMENSION==1)
THEN 2109 CALL list_search_linear(list%LIST_DP(1:list%NUMBER_IN_LIST),item,list_item,err,error,*999)
2111 CALL list_search_linear(list%LIST_DP2(list%KEY_DIMENSION,1:list%NUMBER_IN_LIST),item,list_item,err,error,*999)
2114 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
2115 &
" does not match the single precision type of the supplied list item." 2116 CALL flagerror(local_error,err,error,*999)
2119 CALL flagerror(
"List has not been finished.",err,error,*999)
2122 CALL flagerror(
"List is not associated.",err,error,*999)
2125 exits(
"LIST_ITEM_IN_LIST_DP1")
2127 999 errorsexits(
"LIST_ITEM_IN_LIST_DP1",err,error)
2140 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
2141 REAL(DP),
INTENT(IN) :: ITEM(:)
2142 INTEGER(INTG),
INTENT(OUT) :: LIST_ITEM
2143 INTEGER(INTG),
INTENT(OUT) :: ERR
2148 enters(
"LIST_ITEM_IN_LIST_DP2",err,error,*999)
2150 IF(
ASSOCIATED(list))
THEN 2151 IF(list%LIST_FINISHED)
THEN 2154 IF(list%DATA_DIMENSION==1)
THEN 2155 CALL list_search_linear(list%LIST_DP(1:list%NUMBER_IN_LIST),item(list%KEY_DIMENSION),list_item,err,error,*999)
2157 CALL list_search_linear(list%LIST_DP2(list%KEY_DIMENSION,1:list%NUMBER_IN_LIST),item(list%KEY_DIMENSION), &
2158 & list_item,err,error,*999)
2161 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
2162 &
" does not match the single precision type of the supplied list item." 2163 CALL flagerror(local_error,err,error,*999)
2166 CALL flagerror(
"List has not been finished.",err,error,*999)
2169 CALL flagerror(
"List is not associated.",err,error,*999)
2172 exits(
"LIST_ITEM_IN_LIST_DP2")
2174 999 errorsexits(
"LIST_ITEM_IN_LIST_DP2",err,error)
2186 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
2187 INTEGER(INTG),
INTENT(IN) :: LIST_ITEM
2188 INTEGER(INTG),
INTENT(OUT) :: ERR
2193 enters(
"LIST_ITEM_DELETE",err,error,*999)
2195 IF(
ASSOCIATED(list))
THEN 2196 IF(list%LIST_FINISHED)
THEN 2197 IF(list_item>=1.AND.list_item<=list%NUMBER_IN_LIST)
THEN 2198 IF(list%DATA_DIMENSION==1)
THEN 2199 SELECT CASE(list%DATA_TYPE)
2201 list%LIST_INTG(1:list_item-1)=list%LIST_INTG(1:list_item-1)
2202 list%LIST_INTG(list_item:list%NUMBER_IN_LIST-1)=list%LIST_INTG(list_item+1:list%NUMBER_IN_LIST)
2204 list%LIST_SP(1:list_item-1)=list%LIST_SP(1:list_item-1)
2205 list%LIST_SP(list_item:list%NUMBER_IN_LIST-1)=list%LIST_SP(list_item+1:list%NUMBER_IN_LIST)
2207 list%LIST_DP(1:list_item-1)=list%LIST_DP(1:list_item-1)
2208 list%LIST_DP(list_item:list%NUMBER_IN_LIST-1)=list%LIST_DP(list_item+1:list%NUMBER_IN_LIST)
2210 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))//
" is invalid." 2211 CALL flagerror(local_error,err,error,*999)
2214 SELECT CASE(list%DATA_TYPE)
2216 list%LIST_INTG2(:,1:list_item-1)=list%LIST_INTG2(:,1:list_item-1)
2217 list%LIST_INTG2(:,list_item:list%NUMBER_IN_LIST-1)=list%LIST_INTG2(:,list_item+1:list%NUMBER_IN_LIST)
2219 list%LIST_SP2(:,1:list_item-1)=list%LIST_SP2(:,1:list_item-1)
2220 list%LIST_SP2(:,list_item:list%NUMBER_IN_LIST-1)=list%LIST_SP2(:,list_item+1:list%NUMBER_IN_LIST)
2222 list%LIST_DP2(:,1:list_item-1)=list%LIST_DP2(:,1:list_item-1)
2223 list%LIST_DP2(:,list_item:list%NUMBER_IN_LIST-1)=list%LIST_DP2(:,list_item+1:list%NUMBER_IN_LIST)
2225 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))//
" is invalid." 2226 CALL flagerror(local_error,err,error,*999)
2229 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST-1
2231 local_error=
"The specified list item of "//
trim(
numbertovstring(list_item,
"*",err,error))// &
2232 &
" is invalid. The item must be >= 1 and <= "//
trim(
numbertovstring(list%NUMBER_IN_LIST,
"*",err,error))//
"." 2233 CALL flagerror(local_error,err,error,*999)
2236 CALL flagerror(
"List has not been finished.",err,error,*999)
2239 CALL flagerror(
"List is not associated.",err,error,*999)
2242 exits(
"LIST_ITEM_DELETE")
2244 999 errorsexits(
"LIST_ITEM_DELETE",err,error)
2256 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
2257 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
2258 INTEGER(INTG),
INTENT(OUT) :: ERR
2263 enters(
"LIST_KEY_DIMENSION_SET",err,error,*999)
2265 IF(
ASSOCIATED(list))
THEN 2266 IF(key_dimension>0.AND.key_dimension<=list%DATA_DIMENSION)
THEN 2267 list%KEY_DIMENSION=key_dimension
2269 local_error=
"The specified key dimension of "//
trim(
numbertovstring(key_dimension,
"*",err,error))// &
2270 &
" is invalid. The key dimension must be > 0 and <= "// &
2272 CALL flagerror(local_error,err,error,*999)
2275 CALL flagerror(
"List is not associated.",err,error,*999)
2278 exits(
"LIST_KEY_DIMENSION_SET")
2280 999 errorsexits(
"LIST_KEY_DIMENSION_SET",err,error)
2292 TYPE(
list_type),
POINTER,
INTENT(IN) :: LIST
2293 INTEGER(INTG),
INTENT(OUT) :: NUMBER_OF_ITEMS
2294 INTEGER(INTG),
INTENT(OUT) :: ERR
2298 enters(
"LIST_NUMBER_OF_ITEMS_GET",err,error,*999)
2300 IF(
ASSOCIATED(list))
THEN 2301 IF(list%LIST_FINISHED)
THEN 2302 number_of_items=list%NUMBER_IN_LIST
2304 CALL flagerror(
"List has not been finished.",err,error,*999)
2307 CALL flagerror(
"List is not associated.",err,error,*999)
2310 exits(
"LIST_NUMBER_OF_ITEMS_GET")
2312 999 errorsexits(
"LIST_NUMBER_OF_ITEMS_GET",err,error)
2326 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
2327 INTEGER(INTG),
INTENT(OUT) :: NUMBER_IN_LIST
2328 INTEGER(INTG),
ALLOCATABLE,
INTENT(INOUT) :: LIST_VALUES(:)
2329 INTEGER(INTG),
INTENT(OUT) :: ERR
2334 enters(
"LIST_DETACH_AND_DESTROY_INTG1",err,error,*999)
2336 IF(
ASSOCIATED(list))
THEN 2337 IF(list%LIST_FINISHED)
THEN 2338 IF(
ALLOCATED(list_values))
THEN 2339 CALL flagerror(
"List values is allocated.",err,error,*999)
2342 IF(list%DATA_DIMENSION==1)
THEN 2343 number_in_list=list%NUMBER_IN_LIST
2345 CALL move_alloc(list%LIST_INTG,list_values)
2348 local_error=
"Invalid data dimension. The supplied data dimension is 1 and the list data dimension is "// &
2350 CALL flagerror(local_error,err,error,*999)
2353 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
2354 &
" does not match the integer type of the supplied list values item." 2355 CALL flagerror(local_error,err,error,*999)
2359 CALL flagerror(
"List has not been finished.",err,error,*999)
2362 CALL flagerror(
"List is not associated.",err,error,*999)
2365 exits(
"LIST_DETACH_AND_DESTROY_INTG1")
2367 999 errorsexits(
"LIST_DETACH_AND_DESTROY_INTG1",err,error)
2381 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
2382 INTEGER(INTG),
INTENT(OUT) :: NUMBER_IN_LIST
2383 INTEGER(INTG),
ALLOCATABLE,
INTENT(INOUT) :: LIST_VALUES(:,:)
2384 INTEGER(INTG),
INTENT(OUT) :: ERR
2389 enters(
"LIST_DETACH_AND_DESTROY_INTG2",err,error,*999)
2391 IF(
ASSOCIATED(list))
THEN 2392 IF(list%LIST_FINISHED)
THEN 2393 IF(
ALLOCATED(list_values))
THEN 2394 CALL flagerror(
"List values is allocated.",err,error,*999)
2397 IF(list%DATA_DIMENSION>1)
THEN 2398 number_in_list=list%NUMBER_IN_LIST
2400 CALL move_alloc(list%LIST_INTG2,list_values)
2403 CALL flagerror(
"Invalid data dimension. The supplied data dimension is > 1 and the list data dimension is 1.", &
2407 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
2408 &
" does not match the integer type of the supplied list values item." 2409 CALL flagerror(local_error,err,error,*999)
2413 CALL flagerror(
"List has not been finished.",err,error,*999)
2416 CALL flagerror(
"List is not associated.",err,error,*999)
2419 exits(
"LIST_DETACH_AND_DESTROY_INTG2")
2421 999 errorsexits(
"LIST_DETACH_AND_DESTROY_INTG2",err,error)
2435 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
2436 INTEGER(INTG),
INTENT(OUT) :: NUMBER_IN_LIST
2437 REAL(SP),
ALLOCATABLE,
INTENT(INOUT) :: LIST_VALUES(:)
2438 INTEGER(INTG),
INTENT(OUT) :: ERR
2443 enters(
"LIST_DETACH_AND_DESTROY_SP1",err,error,*999)
2445 IF(
ASSOCIATED(list))
THEN 2446 IF(list%LIST_FINISHED)
THEN 2447 IF(
ALLOCATED(list_values))
THEN 2448 CALL flagerror(
"List values is associated.",err,error,*999)
2451 IF(list%DATA_DIMENSION==1)
THEN 2452 number_in_list=list%NUMBER_IN_LIST
2454 CALL move_alloc(list%LIST_SP,list_values)
2457 local_error=
"Invalid data dimension. The supplied data dimension is 1 and the list data dimension is "// &
2459 CALL flagerror(local_error,err,error,*999)
2462 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
2463 &
" does not match the single precision type of the supplied list values item." 2464 CALL flagerror(local_error,err,error,*999)
2468 CALL flagerror(
"List has not been finished.",err,error,*999)
2471 CALL flagerror(
"List is not associated.",err,error,*999)
2474 exits(
"LIST_DETACH_AND_DESTROY_SP1")
2476 999 errorsexits(
"LIST_DETACH_AND_DESTROY_SP1",err,error)
2489 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
2490 INTEGER(INTG),
INTENT(OUT) :: NUMBER_IN_LIST
2491 REAL(SP),
ALLOCATABLE,
INTENT(INOUT) :: LIST_VALUES(:,:)
2492 INTEGER(INTG),
INTENT(OUT) :: ERR
2497 enters(
"LIST_DETACH_AND_DESTROY_SP2",err,error,*999)
2499 IF(
ASSOCIATED(list))
THEN 2500 IF(list%LIST_FINISHED)
THEN 2501 IF(
ALLOCATED(list_values))
THEN 2502 CALL flagerror(
"List values is associated.",err,error,*999)
2505 IF(list%DATA_DIMENSION>1)
THEN 2506 number_in_list=list%NUMBER_IN_LIST
2508 CALL move_alloc(list%LIST_SP2,list_values)
2511 CALL flagerror(
"Invalid data dimension. The supplied data dimension is > 1 and the list data dimension is 1.", &
2515 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
2516 &
" does not match the single precision type of the supplied list values item." 2517 CALL flagerror(local_error,err,error,*999)
2521 CALL flagerror(
"List has not been finished.",err,error,*999)
2524 CALL flagerror(
"List is not associated.",err,error,*999)
2527 exits(
"LIST_DETACH_AND_DESTROY_SP2")
2529 999 errorsexits(
"LIST_DETACH_AND_DESTROY_SP2",err,error)
2543 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
2544 INTEGER(INTG),
INTENT(OUT) :: NUMBER_IN_LIST
2545 REAL(DP),
ALLOCATABLE,
INTENT(INOUT) :: LIST_VALUES(:)
2546 INTEGER(INTG),
INTENT(OUT) :: ERR
2551 enters(
"LIST_DETACH_AND_DESTROY_DP1",err,error,*999)
2553 IF(
ASSOCIATED(list))
THEN 2554 IF(list%LIST_FINISHED)
THEN 2555 IF(
ALLOCATED(list_values))
THEN 2556 CALL flagerror(
"List values is associated.",err,error,*999)
2559 IF(list%DATA_DIMENSION==1)
THEN 2560 number_in_list=list%NUMBER_IN_LIST
2562 CALL move_alloc(list%LIST_DP,list_values)
2565 local_error=
"Invalid data dimension. The supplied data dimension is 1 and the list data dimension is "// &
2567 CALL flagerror(local_error,err,error,*999)
2570 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
2571 &
" does not match the double precision type of the supplied list values item." 2572 CALL flagerror(local_error,err,error,*999)
2576 CALL flagerror(
"List has not been finished.",err,error,*999)
2579 CALL flagerror(
"List is not associated.",err,error,*999)
2582 exits(
"LIST_DETACH_AND_DESTROY_DP1")
2584 999 errorsexits(
"LIST_DETACH_AND_DESTROY_DP1",err,error)
2598 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
2599 INTEGER(INTG),
INTENT(OUT) :: NUMBER_IN_LIST
2600 REAL(DP),
ALLOCATABLE,
INTENT(INOUT) :: LIST_VALUES(:,:)
2601 INTEGER(INTG),
INTENT(OUT) :: ERR
2606 enters(
"LIST_DETACH_AND_DESTROY_DP2",err,error,*999)
2608 IF(
ASSOCIATED(list))
THEN 2609 IF(list%LIST_FINISHED)
THEN 2610 IF(
ALLOCATED(list_values))
THEN 2611 CALL flagerror(
"List values is associated.",err,error,*999)
2614 IF(list%DATA_DIMENSION>1)
THEN 2615 number_in_list=list%NUMBER_IN_LIST
2617 CALL move_alloc(list%LIST_DP2,list_values)
2620 CALL flagerror(
"Invalid data dimension. The supplied data dimension is > 1 and the list data dimension is 1.", &
2624 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))// &
2625 &
" does not match the double precision type of the supplied list values item." 2626 CALL flagerror(local_error,err,error,*999)
2630 CALL flagerror(
"List has not been finished.",err,error,*999)
2633 CALL flagerror(
"List is not associated.",err,error,*999)
2636 exits(
"LIST_DETACH_AND_DESTROY_DP2")
2638 999 errorsexits(
"LIST_DETACH_AND_DESTROY_DP2",err,error)
2650 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
2651 INTEGER(INTG),
INTENT(OUT) :: ERR
2654 INTEGER(INTG) :: i,j,NUMBER_REMOVED
2655 LOGICAL :: SAME_VALUE
2658 enters(
"LIST_REMOVE_DUPLICATES",err,error,*999)
2660 IF(
ASSOCIATED(list))
THEN 2661 IF(list%LIST_FINISHED)
THEN 2662 IF(list%NUMBER_IN_LIST>0)
THEN 2663 IF(list%DATA_DIMENSION==1)
THEN 2664 SELECT CASE(list%DATA_TYPE)
2666 CALL list_sort(list%LIST_INTG(1:list%NUMBER_IN_LIST),err,error,*999)
2668 DO WHILE(i<=list%NUMBER_IN_LIST)
2672 DO WHILE(j<=list%NUMBER_IN_LIST.AND.same_value)
2673 IF(list%LIST_INTG(j)==list%LIST_INTG(i))
THEN 2679 IF(j>i+1.OR.same_value)
THEN 2683 list%NUMBER_IN_LIST=i
2685 number_removed=j-i-1
2686 list%LIST_INTG(i+1:list%NUMBER_IN_LIST-number_removed)=list%LIST_INTG(j:list%NUMBER_IN_LIST)
2687 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST-number_removed
2693 CALL list_sort(list%LIST_SP(1:list%NUMBER_IN_LIST),err,error,*999)
2695 DO WHILE(i<=list%NUMBER_IN_LIST)
2699 DO WHILE(j<=list%NUMBER_IN_LIST.AND.same_value)
2706 IF(j>i+1.OR.same_value)
THEN 2710 list%NUMBER_IN_LIST=i
2712 number_removed=j-i-1
2713 list%LIST_SP(i+1:list%NUMBER_IN_LIST-number_removed)=list%LIST_SP(j:list%NUMBER_IN_LIST)
2714 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST-number_removed
2720 CALL list_sort(list%LIST_DP(1:list%NUMBER_IN_LIST),err,error,*999)
2722 DO WHILE(i<=list%NUMBER_IN_LIST)
2726 DO WHILE(j<=list%NUMBER_IN_LIST.AND.same_value)
2733 IF(j>i+1.OR.same_value)
THEN 2737 list%NUMBER_IN_LIST=i
2739 number_removed=j-i-1
2740 list%LIST_DP(i+1:list%NUMBER_IN_LIST-number_removed)=list%LIST_DP(j:list%NUMBER_IN_LIST)
2741 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST-number_removed
2747 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))//
" is invalid." 2748 CALL flagerror(local_error,err,error,*999)
2751 SELECT CASE(list%DATA_TYPE)
2753 CALL list_sort(list%LIST_INTG2(:,1:list%NUMBER_IN_LIST),list%KEY_DIMENSION,err,error,*999)
2755 DO WHILE(i<=list%NUMBER_IN_LIST)
2759 DO WHILE(j<=list%NUMBER_IN_LIST.AND.same_value)
2760 IF(list%LIST_INTG2(list%KEY_DIMENSION,j)==list%LIST_INTG2(list%KEY_DIMENSION,i))
THEN 2766 IF(j>i+1.OR.same_value)
THEN 2770 list%NUMBER_IN_LIST=i
2772 number_removed=j-i-1
2773 list%LIST_INTG2(:,i+1:list%NUMBER_IN_LIST-number_removed)=list%LIST_INTG2(:,j:list%NUMBER_IN_LIST)
2774 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST-number_removed
2780 CALL list_sort(list%LIST_SP2(:,1:list%NUMBER_IN_LIST),list%KEY_DIMENSION,err,error,*999)
2782 DO WHILE(i<=list%NUMBER_IN_LIST)
2786 DO WHILE(j<=list%NUMBER_IN_LIST.AND.same_value)
2787 IF(abs(list%LIST_SP2(list%KEY_DIMENSION,j)-list%LIST_SP2(list%KEY_DIMENSION,i))<=
zero_tolerance_sp)
THEN 2793 IF(j>i+1.OR.same_value)
THEN 2797 list%NUMBER_IN_LIST=i
2799 number_removed=j-i-1
2800 list%LIST_SP2(:,i+1:list%NUMBER_IN_LIST-number_removed)=list%LIST_SP2(:,j:list%NUMBER_IN_LIST)
2801 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST-number_removed
2807 CALL list_sort(list%LIST_DP2(:,1:list%NUMBER_IN_LIST),list%KEY_DIMENSION,err,error,*999)
2809 DO WHILE(i<=list%NUMBER_IN_LIST)
2813 DO WHILE(j<=list%NUMBER_IN_LIST.AND.same_value)
2814 IF(abs(list%LIST_DP2(list%KEY_DIMENSION,j)-list%LIST_DP2(list%KEY_DIMENSION,i))<=
zero_tolerance)
THEN 2820 IF(j>i+1.OR.same_value)
THEN 2824 list%NUMBER_IN_LIST=i
2826 number_removed=j-i-1
2827 list%LIST_DP2(:,i+1:list%NUMBER_IN_LIST-number_removed)=list%LIST_DP2(:,j:list%NUMBER_IN_LIST)
2828 list%NUMBER_IN_LIST=list%NUMBER_IN_LIST-number_removed
2834 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))//
" is invalid." 2835 CALL flagerror(local_error,err,error,*999)
2840 CALL flagerror(
"List has not been finished.",err,error,*999)
2843 CALL flagerror(
"List is not associated.",err,error,*999)
2846 exits(
"LIST_REMOVE_DUPLICATES")
2848 999 errorsexits(
"LIST_REMOVE_DUPLICATES",err,error)
2860 INTEGER(INTG),
INTENT(IN) :: A(:)
2861 INTEGER(INTG),
INTENT(IN) ::
VALUE 2862 INTEGER(INTG),
INTENT(OUT) :: POSITION
2863 INTEGER(INTG),
INTENT(OUT) :: ERR
2867 enters(
"LIST_SEARCH_INTG_ARRAY",err,error,*999)
2872 exits(
"LIST_SEARCH_INTG_ARRAY")
2874 999 errorsexits(
"LIST_SEARCH_INTG_ARRAY",err,error)
2886 INTEGER(C_INT),
INTENT(IN) :: A(:)
2887 INTEGER(C_INT),
INTENT(IN) ::
VALUE 2888 INTEGER(INTG),
INTENT(OUT) :: POSITION
2889 INTEGER(INTG),
INTENT(OUT) :: ERR
2893 enters(
"LIST_SEARCH_C_INT_ARRAY",err,error,*999)
2898 exits(
"LIST_SEARCH_C_INT_ARRAY")
2900 999 errorsexits(
"LIST_SEARCH_C_INT_ARRAY",err,error)
2912 REAL(SP),
INTENT(IN) :: A(:)
2913 REAL(SP),
INTENT(IN) ::
VALUE 2914 INTEGER(INTG),
INTENT(OUT) :: POSITION
2915 INTEGER(INTG),
INTENT(OUT) :: ERR
2919 enters(
"LIST_SEARCH_SP_ARRAY",err,error,*999)
2924 exits(
"LIST_SEARCH_SP_ARRAY")
2926 999 errorsexits(
"LIST_SEARCH_SP_ARRAY",err,error)
2938 REAL(DP),
INTENT(IN) :: A(:)
2939 REAL(DP),
INTENT(IN) ::
VALUE 2940 INTEGER(INTG),
INTENT(OUT) :: POSITION
2941 INTEGER(INTG),
INTENT(OUT) :: ERR
2945 enters(
"LIST_SEARCH_DP_ARRAY",err,error,*999)
2950 exits(
"LIST_SEARCH_DP_ARRAY")
2952 999 errorsexits(
"LIST_SEARCH_DP_ARRAY",err,error)
2964 INTEGER(INTG),
INTENT(IN) :: A(:)
2965 INTEGER(INTG),
INTENT(IN) ::
VALUE 2966 INTEGER(INTG),
INTENT(OUT) :: POSITION
2967 INTEGER(INTG),
INTENT(OUT) :: ERR
2973 enters(
"LIST_SEARCH_LINEAR_INTG_ARRAY",err,error,*999)
2977 DO WHILE(i<=
SIZE(a,1).AND..NOT.found)
2978 IF(a(i)==
VALUE)
THEN 2990 exits(
"LIST_SEARCH_LINEAR_INTG_ARRAY")
2992 999 errorsexits(
"LIST_SEARCH_LINEAR_INTG_ARRAY",err,error)
3004 INTEGER(C_INT),
INTENT(IN) :: A(:)
3005 INTEGER(C_INT),
INTENT(IN) ::
VALUE 3006 INTEGER(INTG),
INTENT(OUT) :: POSITION
3007 INTEGER(INTG),
INTENT(OUT) :: ERR
3013 enters(
"LIST_SEARCH_LINEAR_C_INT_ARRAY",err,error,*999)
3017 DO WHILE(i<=
SIZE(a,1).AND..NOT.found)
3018 IF(a(i)==
VALUE)
THEN 3030 exits(
"LIST_SEARCH_LINEAR_C_INT_ARRAY")
3032 999 errorsexits(
"LIST_SEARCH_LINEAR_C_INT_ARRAY",err,error)
3044 REAL(SP),
INTENT(IN) :: A(:)
3045 REAL(SP),
INTENT(IN) ::
VALUE 3046 INTEGER(INTG),
INTENT(OUT) :: POSITION
3047 INTEGER(INTG),
INTENT(OUT) :: ERR
3053 enters(
"LIST_SEARCH_LINEAR_SP_ARRAY",err,error,*999)
3057 DO WHILE(i<=
SIZE(a,1).AND..NOT.found)
3070 exits(
"LIST_SEARCH_LINEAR_SP_ARRAY")
3072 999 errorsexits(
"LIST_SEARCH_LINEAR_SP_ARRAY",err,error)
3084 REAL(DP),
INTENT(IN) :: A(:)
3085 REAL(DP),
INTENT(IN) ::
VALUE 3086 INTEGER(INTG),
INTENT(OUT) :: POSITION
3087 INTEGER(INTG),
INTENT(OUT) :: ERR
3093 enters(
"LIST_SEARCH_LINEAR_DP_ARRAY",err,error,*999)
3097 DO WHILE(i<=
SIZE(a,1).AND..NOT.found)
3110 exits(
"LIST_SEARCH_LINEAR_DP_ARRAY")
3112 999 errorsexits(
"LIST_SEARCH_LINEAR_DP_ARRAY",err,error)
3124 TYPE(
list_type),
POINTER,
INTENT(INOUT) :: LIST
3125 INTEGER(INTG),
INTENT(OUT) :: ERR
3130 enters(
"LIST_SORT_LIST",err,error,*999)
3132 IF(
ASSOCIATED(list))
THEN 3133 IF(list%LIST_FINISHED)
THEN 3134 SELECT CASE(list%SORT_METHOD)
3136 IF(list%DATA_DIMENSION==1)
THEN 3137 SELECT CASE(list%DATA_TYPE)
3145 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))//
" is invalid." 3146 CALL flagerror(local_error,err,error,*999)
3149 SELECT CASE(list%DATA_TYPE)
3160 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))//
" is invalid." 3161 CALL flagerror(local_error,err,error,*999)
3165 IF(list%DATA_DIMENSION==1)
THEN 3166 SELECT CASE(list%DATA_TYPE)
3174 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))//
" is invalid." 3175 CALL flagerror(local_error,err,error,*999)
3178 SELECT CASE(list%DATA_TYPE)
3189 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))//
" is invalid." 3190 CALL flagerror(local_error,err,error,*999)
3194 IF(list%DATA_DIMENSION==1)
THEN 3195 SELECT CASE(list%DATA_TYPE)
3203 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))//
" is invalid." 3204 CALL flagerror(local_error,err,error,*999)
3207 SELECT CASE(list%DATA_TYPE)
3218 local_error=
"The list data type of "//
trim(
numbertovstring(list%DATA_TYPE,
"*",err,error))//
" is invalid." 3219 CALL flagerror(local_error,err,error,*999)
3223 local_error=
"The list sort method of "//
trim(
numbertovstring(list%SORT_METHOD,
"*",err,error))//
" is invlaid." 3224 CALL flagerror(local_error,err,error,*999)
3227 CALL flagerror(
"List has not been finished.",err,error,*999)
3230 CALL flagerror(
"List is not associated.",err,error,*999)
3233 exits(
"LIST_SORT_LIST")
3235 999 errorsexits(
"LIST_SORT_LIST",err,error)
3247 INTEGER(INTG),
INTENT(INOUT) :: A(:)
3248 INTEGER(INTG),
INTENT(OUT) :: ERR
3252 enters(
"LIST_SORT_INTG1_ARRAY",err,error,*999)
3257 exits(
"LIST_SORT_INTG1_ARRAY")
3259 999 errorsexits(
"LIST_SORT_INTG1_ARRAY",err,error)
3271 INTEGER(INTG),
INTENT(INOUT) :: A(:,:)
3272 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
3273 INTEGER(INTG),
INTENT(OUT) :: ERR
3277 enters(
"LIST_SORT_INTG2_ARRAY",err,error,*999)
3282 exits(
"LIST_SORT_INTG2_ARRAY")
3284 999 errorsexits(
"LIST_SORT_INTG2_ARRAY",err,error)
3296 INTEGER(C_INT),
INTENT(INOUT) :: A(:)
3297 INTEGER(INTG),
INTENT(OUT) :: ERR
3301 enters(
"LIST_SORT_C_INT1_ARRAY",err,error,*999)
3306 exits(
"LIST_SORT_C_INT1_ARRAY")
3308 999 errorsexits(
"LIST_SORT_C_INT1_ARRAY",err,error)
3320 INTEGER(C_INT),
INTENT(INOUT) :: A(:,:)
3321 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
3322 INTEGER(INTG),
INTENT(OUT) :: ERR
3326 enters(
"LIST_SORT_C_INT2_ARRAY",err,error,*999)
3331 exits(
"LIST_SORT_C_INT2_ARRAY")
3333 999 errorsexits(
"LIST_SORT_C_INT2_ARRAY",err,error)
3345 REAL(SP),
INTENT(INOUT) :: A(:)
3346 INTEGER(INTG),
INTENT(OUT) :: ERR
3350 enters(
"LIST_SORT_SP1_ARRAY",err,error,*999)
3355 exits(
"LIST_SORT_SP1_ARRAY")
3357 999 errorsexits(
"LIST_SORT_SP1_ARRAY",err,error)
3369 REAL(SP),
INTENT(INOUT) :: A(:,:)
3370 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
3371 INTEGER(INTG),
INTENT(OUT) :: ERR
3375 enters(
"LIST_SORT_SP2_ARRAY",err,error,*999)
3380 exits(
"LIST_SORT_SP2_ARRAY")
3382 999 errorsexits(
"LIST_SORT_SP2_ARRAY",err,error)
3394 REAL(DP),
INTENT(INOUT) :: A(:)
3395 INTEGER(INTG),
INTENT(OUT) :: ERR
3399 enters(
"LIST_SORT_DP1_ARRAY",err,error,*999)
3404 exits(
"LIST_SORT_DP1_ARRAY")
3406 999 errorsexits(
"LIST_SORT_DP1_ARRAY",err,error)
3418 REAL(DP),
INTENT(INOUT) :: A(:,:)
3419 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
3420 INTEGER(INTG),
INTENT(OUT) :: ERR
3424 enters(
"LIST_SORT_DP2_ARRAY",err,error,*999)
3429 exits(
"LIST_SORT_DP2_ARRAY")
3431 999 errorsexits(
"LIST_SORT_DP2_ARRAY",err,error)
3443 INTEGER(INTG),
INTENT(INOUT) :: A(:)
3444 INTEGER(INTG),
INTENT(OUT) :: ERR
3447 INTEGER(INTG) :: FLAG,i,j,k,VALUE
3449 enters(
"LIST_SORT_BUBBLE_INTG1_ARRAY",err,error,*999)
3451 IF(
SIZE(a,1)>1)
THEN 3457 IF(a(j)>a(j+1))
THEN 3468 exits(
"LIST_SORT_BUBBLE_INTG1_ARRAY")
3470 999 errorsexits(
"LIST_SORT_BUBBLE_INTG1_ARRAY",err,error)
3482 INTEGER(INTG),
INTENT(INOUT) :: A(:,:)
3483 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
3484 INTEGER(INTG),
INTENT(OUT) :: ERR
3487 INTEGER(INTG) :: FLAG,i,j,k,
VALUE(size(a,1))
3490 enters(
"LIST_SORT_BUBBLE_INTG2_ARRAY",err,error,*999)
3492 IF(key_dimension>0.AND.key_dimension<=
SIZE(a,1))
THEN 3493 IF(
SIZE(a,2)>1)
THEN 3499 IF(a(key_dimension,j)>a(key_dimension,j+1))
THEN 3510 local_error=
"The specified key dimension of "//
trim(
numbertovstring(key_dimension,
"*",err,error))// &
3511 &
" is invalid. The key dimension must be > 0 and <= "//
trim(
numbertovstring(
SIZE(a,1),
"*",err,error))//
"." 3512 CALL flagerror(local_error,err,error,*999)
3515 exits(
"LIST_SORT_BUBBLE_INTG2_ARRAY")
3517 999 errorsexits(
"LIST_SORT_BUBBLE_INTG2_ARRAY",err,error)
3529 INTEGER(C_INT),
INTENT(INOUT) :: A(:)
3530 INTEGER(INTG),
INTENT(OUT) :: ERR
3533 INTEGER(INTG) :: FLAG,i,j,k
3534 INTEGER(C_INT) :: VALUE
3536 enters(
"LIST_SORT_BUBBLE_C_INT1_ARRAY",err,error,*999)
3538 IF(
SIZE(a,1)>1)
THEN 3544 IF(a(j)>a(j+1))
THEN 3555 exits(
"LIST_SORT_BUBBLE_C_INT1_ARRAY")
3557 999 errorsexits(
"LIST_SORT_BUBBLE_C_INT1_ARRAY",err,error)
3569 INTEGER(C_INT),
INTENT(INOUT) :: A(:,:)
3570 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
3571 INTEGER(INTG),
INTENT(OUT) :: ERR
3574 INTEGER(INTG) :: FLAG,i,j,k
3575 INTEGER(C_INT) ::
VALUE(size(a,1))
3578 enters(
"LIST_SORT_BUBBLE_C_INT2_ARRAY",err,error,*999)
3580 IF(key_dimension>0.AND.key_dimension<=
SIZE(a,1))
THEN 3581 IF(
SIZE(a,2)>1)
THEN 3587 IF(a(key_dimension,j)>a(key_dimension,j+1))
THEN 3598 local_error=
"The specified key dimension of "//
trim(
numbertovstring(key_dimension,
"*",err,error))// &
3599 &
" is invalid. The key dimension must be > 0 and <= "//
trim(
numbertovstring(
SIZE(a,1),
"*",err,error))//
"." 3600 CALL flagerror(local_error,err,error,*999)
3603 exits(
"LIST_SORT_BUBBLE_C_INT2_ARRAY")
3605 999 errorsexits(
"LIST_SORT_BUBBLE_C_INT2_ARRAY",err,error)
3617 REAL(SP),
INTENT(INOUT) :: A(:)
3618 INTEGER(INTG),
INTENT(OUT) :: ERR
3621 INTEGER(INTG) :: FLAG,i,j,k
3624 enters(
"LIST_SORT_BUBBLE_SP1_ARRAY",err,error,*999)
3626 IF(
SIZE(a,1)>1)
THEN 3632 IF(a(j)>a(j+1))
THEN 3643 exits(
"LIST_SORT_BUBBLE_SP1_ARRAY")
3645 999 errorsexits(
"LIST_SORT_BUBBLE_SP1_ARRAY",err,error)
3657 REAL(SP),
INTENT(INOUT) :: A(:,:)
3658 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
3659 INTEGER(INTG),
INTENT(OUT) :: ERR
3662 INTEGER(INTG) :: FLAG,i,j,k
3663 REAL(SP) ::
VALUE(size(a,1))
3666 enters(
"LIST_SORT_BUBBLE_SP2_ARRAY",err,error,*999)
3668 IF(key_dimension>0.AND.key_dimension<=
SIZE(a,1))
THEN 3669 IF(
SIZE(a,2)>1)
THEN 3675 IF(a(key_dimension,j)>a(key_dimension,j+1))
THEN 3686 local_error=
"The specified key dimension of "//
trim(
numbertovstring(key_dimension,
"*",err,error))// &
3687 &
" is invalid. The key dimension must be > 0 and <= "//
trim(
numbertovstring(
SIZE(a,1),
"*",err,error))//
"." 3688 CALL flagerror(local_error,err,error,*999)
3691 exits(
"LIST_SORT_BUBBLE_SP2_ARRAY")
3693 999 errorsexits(
"LIST_SORT_BUBBLE_SP2_ARRAY",err,error)
3705 REAL(DP),
INTENT(INOUT) :: A(:)
3706 INTEGER(INTG),
INTENT(OUT) :: ERR
3709 INTEGER(INTG) :: FLAG,i,j,k
3712 enters(
"LIST_SORT_BUBBLE_DP1_ARRAY",err,error,*999)
3714 IF(
SIZE(a,1)>1)
THEN 3720 IF(a(j)>a(j+1))
THEN 3731 exits(
"LIST_SORT_BUBBLE_DP1_ARRAY")
3733 999 errorsexits(
"LIST_SORT_BUBBLE_DP1_ARRAY",err,error)
3745 REAL(DP),
INTENT(INOUT) :: A(:,:)
3746 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
3747 INTEGER(INTG),
INTENT(OUT) :: ERR
3750 INTEGER(INTG) :: FLAG,i,j,k
3751 REAL(DP) ::
VALUE(size(a,1))
3754 enters(
"LIST_SORT_BUBBLE_DP2_ARRAY",err,error,*999)
3756 IF(key_dimension>0.AND.key_dimension<=
SIZE(a,1))
THEN 3757 IF(
SIZE(a,2)>1)
THEN 3763 IF(a(key_dimension,j)>a(key_dimension,j+1))
THEN 3774 local_error=
"The specified key dimension of "//
trim(
numbertovstring(key_dimension,
"*",err,error))// &
3775 &
" is invalid. The key dimension must be > 0 and <= "//
trim(
numbertovstring(
SIZE(a,1),
"*",err,error))//
"." 3776 CALL flagerror(local_error,err,error,*999)
3779 exits(
"LIST_SORT_BUBBLE_DP2_ARRAY")
3781 999 errorsexits(
"LIST_SORT_BUBBLE_DP2_ARRAY",err,error)
3793 INTEGER(INTG),
INTENT(INOUT) :: A(:)
3794 INTEGER(INTG),
INTENT(OUT) :: ERR
3797 INTEGER(INTG) :: I,IVALUE,J,L,VALUE
3799 enters(
"LIST_SORT_HEAP_INTG1_ARRAY",err,error,*999)
3801 IF(
SIZE(a,1)>1)
THEN 3821 IF(a(j)<a(j+1)) j=j+1
3835 exits(
"LIST_SORT_HEAP_INTG1_ARRAY")
3837 999 errorsexits(
"LIST_SORT_HEAP_INTG1_ARRAY",err,error)
3849 INTEGER(INTG),
INTENT(INOUT) :: A(:,:)
3850 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
3851 INTEGER(INTG),
INTENT(OUT) :: ERR
3854 INTEGER(INTG) :: I,IVALUE,J,L,
VALUE(size(a,1))
3857 enters(
"LIST_SORT_HEAP_INTG2_ARRAY",err,error,*999)
3859 IF(key_dimension>0.AND.key_dimension<=
SIZE(a,1))
THEN 3860 IF(
SIZE(a,2)>1)
THEN 3880 IF(a(key_dimension,j)<a(key_dimension,j+1)) j=j+1
3882 IF(value(key_dimension)<a(key_dimension,j))
THEN 3894 local_error=
"The specified key dimension of "//
trim(
numbertovstring(key_dimension,
"*",err,error))// &
3895 &
" is invalid. The key dimension must be > 0 and <= "//
trim(
numbertovstring(
SIZE(a,1),
"*",err,error))//
"." 3896 CALL flagerror(local_error,err,error,*999)
3899 exits(
"LIST_SORT_HEAP_INTG2_ARRAY")
3901 999 errorsexits(
"LIST_SORT_HEAP_INTG2_ARRAY",err,error)
3913 INTEGER(C_INT),
INTENT(INOUT) :: A(:)
3914 INTEGER(INTG),
INTENT(OUT) :: ERR
3917 INTEGER(INTG) :: I,J,L
3918 INTEGER(C_INT) :: IVALUE,VALUE
3920 enters(
"LIST_SORT_HEAP_C_INT1_ARRAY",err,error,*999)
3922 IF(
SIZE(a,1)>1)
THEN 3942 IF(a(j)<a(j+1)) j=j+1
3956 exits(
"LIST_SORT_HEAP_C_INT1_ARRAY")
3958 999 errorsexits(
"LIST_SORT_HEAP_C_INT1_ARRAY",err,error)
3970 INTEGER(C_INT),
INTENT(INOUT) :: A(:,:)
3971 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
3972 INTEGER(INTG),
INTENT(OUT) :: ERR
3975 INTEGER(INTG) :: I,J,L
3976 INTEGER(C_INT) :: IVALUE,
VALUE(size(a,1))
3979 enters(
"LIST_SORT_HEAP_C_INT2_ARRAY",err,error,*999)
3981 IF(key_dimension>0.AND.key_dimension<=
SIZE(a,1))
THEN 3982 IF(
SIZE(a,2)>1)
THEN 4002 IF(a(key_dimension,j)<a(key_dimension,j+1)) j=j+1
4004 IF(value(key_dimension)<a(key_dimension,j))
THEN 4016 local_error=
"The specified key dimension of "//
trim(
numbertovstring(key_dimension,
"*",err,error))// &
4017 &
" is invalid. The key dimension must be > 0 and <= "//
trim(
numbertovstring(
SIZE(a,1),
"*",err,error))//
"." 4018 CALL flagerror(local_error,err,error,*999)
4021 exits(
"LIST_SORT_HEAP_C_INT2_ARRAY")
4023 999 errorsexits(
"LIST_SORT_HEAP_C_INT2_ARRAY",err,error)
4035 REAL(SP),
INTENT(INOUT) :: A(:)
4036 INTEGER(INTG),
INTENT(OUT) :: ERR
4039 INTEGER(INTG) :: I,IVALUE,J,L
4042 enters(
"LIST_SORT_HEAP_SP1_ARRAY",err,error,*999)
4044 IF(
SIZE(a,1)>1)
THEN 4064 IF(a(j)<a(j+1)) j=j+1
4078 exits(
"LIST_SORT_HEAP_SP1_ARRAY")
4080 999 errorsexits(
"LIST_SORT_HEAP_SP1_ARRAY",err,error)
4092 REAL(SP),
INTENT(INOUT) :: A(:,:)
4093 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
4094 INTEGER(INTG),
INTENT(OUT) :: ERR
4097 INTEGER(INTG) :: I,IVALUE,J,L
4098 REAL(SP) ::
VALUE(size(a,1))
4101 enters(
"LIST_SORT_HEAP_SP2_ARRAY",err,error,*999)
4103 IF(key_dimension>0.AND.key_dimension<=
SIZE(a,1))
THEN 4104 IF(
SIZE(a,2)>1)
THEN 4124 IF(a(key_dimension,j)<a(key_dimension,j+1)) j=j+1
4126 IF(value(key_dimension)<a(key_dimension,j))
THEN 4138 local_error=
"The specified key dimension of "//
trim(
numbertovstring(key_dimension,
"*",err,error))// &
4139 &
" is invalid. The key dimension must be > 0 and <= "//
trim(
numbertovstring(
SIZE(a,1),
"*",err,error))//
"." 4140 CALL flagerror(local_error,err,error,*999)
4143 exits(
"LIST_SORT_HEAP_SP2_ARRAY")
4145 999 errorsexits(
"LIST_SORT_HEAP_SP2_ARRAY",err,error)
4157 REAL(DP),
INTENT(INOUT) :: A(:)
4158 INTEGER(INTG),
INTENT(OUT) :: ERR
4161 INTEGER(INTG) :: I,IVALUE,J,L
4164 enters(
"LIST_SORT_HEAP_DP1_ARRAY",err,error,*999)
4166 IF(
SIZE(a,1)>1)
THEN 4186 IF(a(j)<a(j+1)) j=j+1
4200 exits(
"LIST_SORT_HEAP_DP1_ARRAY")
4202 999 errorsexits(
"LIST_SORT_HEAP_DP1_ARRAY",err,error)
4214 REAL(DP),
INTENT(INOUT) :: A(:,:)
4215 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
4216 INTEGER(INTG),
INTENT(OUT) :: ERR
4219 INTEGER(INTG) :: I,IVALUE,J,L
4220 REAL(DP) ::
VALUE(size(a,1))
4223 enters(
"LIST_SORT_HEAP_DP2_ARRAY",err,error,*999)
4225 IF(key_dimension>0.AND.key_dimension<=
SIZE(a,1))
THEN 4226 IF(
SIZE(a,2)>1)
THEN 4246 IF(a(key_dimension,j)<a(key_dimension,j+1)) j=j+1
4248 IF(value(key_dimension)<a(key_dimension,j))
THEN 4260 local_error=
"The specified key dimension of "//
trim(
numbertovstring(key_dimension,
"*",err,error))// &
4261 &
" is invalid. The key dimension must be > 0 and <= "//
trim(
numbertovstring(
SIZE(a,1),
"*",err,error))//
"." 4262 CALL flagerror(local_error,err,error,*999)
4265 exits(
"LIST_SORT_HEAP_DP2_ARRAY")
4267 999 errorsexits(
"LIST_SORT_HEAP_DP2_ARRAY",err,error)
4279 INTEGER(INTG),
INTENT(INOUT) :: A(:)
4280 INTEGER(INTG),
INTENT(OUT) :: ERR
4283 INTEGER(INTG) :: I,INC,J,VALUE
4285 enters(
"LIST_SORT_SHELL_INTG1_ARRAY",err,error,*999)
4288 DO WHILE(inc<=
SIZE(a,1))
4293 DO i=inc+1,
SIZE(a,1)
4296 DO WHILE(a(j-inc)>
VALUE)
4305 exits(
"LIST_SORT_SHELL_INTG1_ARRAY")
4307 999 errorsexits(
"LIST_SORT_SHELL_INTG1_ARRAY",err,error)
4319 INTEGER(INTG),
INTENT(INOUT) :: A(:,:)
4320 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
4321 INTEGER(INTG),
INTENT(OUT) :: ERR
4324 INTEGER(INTG) :: I,INC,J,
VALUE(size(a,1))
4327 enters(
"LIST_SORT_SHELL_INTG2_ARRAY",err,error,*999)
4329 IF(key_dimension>0.AND.key_dimension<=
SIZE(a,1))
THEN 4331 DO WHILE(inc<=
SIZE(a,2))
4336 DO i=inc+1,
SIZE(a,2)
4339 DO WHILE(a(key_dimension,j-inc)>value(key_dimension))
4348 local_error=
"The specified key dimension of "//
trim(
numbertovstring(key_dimension,
"*",err,error))// &
4349 &
" is invalid. The key dimension must be > 0 and <= "//
trim(
numbertovstring(
SIZE(a,1),
"*",err,error))//
"." 4350 CALL flagerror(local_error,err,error,*999)
4353 exits(
"LIST_SORT_SHELL_INTG2_ARRAY")
4355 999 errorsexits(
"LIST_SORT_SHELL_INTG2_ARRAY",err,error)
4367 INTEGER(C_INT),
INTENT(INOUT) :: A(:)
4368 INTEGER(INTG),
INTENT(OUT) :: ERR
4371 INTEGER(INTG) :: I,INC,J
4372 INTEGER(C_INT) :: VALUE
4374 enters(
"LIST_SORT_SHELL_C_INT1_ARRAY",err,error,*999)
4377 DO WHILE(inc<=
SIZE(a,1))
4382 DO i=inc+1,
SIZE(a,1)
4385 DO WHILE(a(j-inc)>
VALUE)
4394 exits(
"LIST_SORT_SHELL_C_INT1_ARRAY")
4396 999 errorsexits(
"LIST_SORT_SHELL_C_INT1_ARRAY",err,error)
4408 INTEGER(C_INT),
INTENT(INOUT) :: A(:,:)
4409 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
4410 INTEGER(INTG),
INTENT(OUT) :: ERR
4413 INTEGER(INTG) :: I,INC,J
4414 INTEGER(C_INT) ::
VALUE(size(a,1))
4417 enters(
"LIST_SORT_SHELL_C_INT2_ARRAY",err,error,*999)
4419 IF(key_dimension>0.AND.key_dimension<=
SIZE(a,1))
THEN 4421 DO WHILE(inc<=
SIZE(a,2))
4426 DO i=inc+1,
SIZE(a,2)
4429 DO WHILE(a(key_dimension,j-inc)>value(key_dimension))
4438 local_error=
"The specified key dimension of "//
trim(
numbertovstring(key_dimension,
"*",err,error))// &
4439 &
" is invalid. The key dimension must be > 0 and <= "//
trim(
numbertovstring(
SIZE(a,1),
"*",err,error))//
"." 4440 CALL flagerror(local_error,err,error,*999)
4443 exits(
"LIST_SORT_SHELL_C_INT2_ARRAY")
4445 999 errorsexits(
"LIST_SORT_SHELL_C_INT2_ARRAY",err,error)
4458 REAL(SP),
INTENT(INOUT) :: A(:)
4459 INTEGER(INTG),
INTENT(OUT) :: ERR
4462 INTEGER(INTG) :: I,INC,J
4465 enters(
"LIST_SORT_SHELL_SP1_ARRAY",err,error,*999)
4468 DO WHILE(inc<=
SIZE(a,1))
4473 DO i=inc+1,
SIZE(a,1)
4476 DO WHILE(a(j-inc)>
VALUE)
4485 exits(
"LIST_SORT_SHELL_SP1_ARRAY")
4487 999 errorsexits(
"LIST_SORT_SHELL_SP1_ARRAY",err,error)
4500 REAL(SP),
INTENT(INOUT) :: A(:,:)
4501 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
4502 INTEGER(INTG),
INTENT(OUT) :: ERR
4505 INTEGER(INTG) :: I,INC,J
4506 REAL(SP) ::
VALUE(size(a,1))
4509 enters(
"LIST_SORT_SHELL_SP2_ARRAY",err,error,*999)
4511 IF(key_dimension>0.AND.key_dimension<=
SIZE(a,1))
THEN 4513 DO WHILE(inc<=
SIZE(a,2))
4518 DO i=inc+1,
SIZE(a,2)
4521 DO WHILE(a(key_dimension,j-inc)>value(key_dimension))
4530 local_error=
"The specified key dimension of "//
trim(
numbertovstring(key_dimension,
"*",err,error))// &
4531 &
" is invalid. The key dimension must be > 0 and <= "//
trim(
numbertovstring(
SIZE(a,1),
"*",err,error))//
"." 4532 CALL flagerror(local_error,err,error,*999)
4535 exits(
"LIST_SORT_SHELL_SP2_ARRAY")
4537 999 errorsexits(
"LIST_SORT_SHELL_SP2_ARRAY",err,error)
4550 REAL(DP),
INTENT(INOUT) :: A(:)
4551 INTEGER(INTG),
INTENT(OUT) :: ERR
4554 INTEGER(INTG) :: I,INC,J
4557 enters(
"LIST_SORT_SHELL_DP1_ARRAY",err,error,*999)
4560 DO WHILE(inc<=
SIZE(a,1))
4565 DO i=inc+1,
SIZE(a,1)
4568 DO WHILE(a(j-inc)>
VALUE)
4577 exits(
"LIST_SORT_SHELL_DP1_ARRAY")
4579 999 errorsexits(
"LIST_SORT_SHELL_DP1_ARRAY",err,error)
4592 REAL(DP),
INTENT(INOUT) :: A(:,:)
4593 INTEGER(INTG),
INTENT(IN) :: KEY_DIMENSION
4594 INTEGER(INTG),
INTENT(OUT) :: ERR
4597 INTEGER(INTG) :: I,INC,J
4598 REAL(DP) ::
VALUE(size(a,1))
4601 enters(
"LIST_SORT_SHELL_DP2_ARRAY",err,error,*999)
4603 IF(key_dimension>0.AND.key_dimension<=
SIZE(a,1))
THEN 4605 DO WHILE(inc<=
SIZE(a,2))
4610 DO i=inc+1,
SIZE(a,2)
4613 DO WHILE(a(key_dimension,j-inc)>value(key_dimension))
4622 local_error=
"The specified key dimension of "//
trim(
numbertovstring(key_dimension,
"*",err,error))// &
4623 &
" is invalid. The key dimension must be > 0 and <= "//
trim(
numbertovstring(
SIZE(a,1),
"*",err,error))//
"." 4624 CALL flagerror(local_error,err,error,*999)
4627 exits(
"LIST_SORT_SHELL_DP1_ARRAY")
4629 999 errorsexits(
"LIST_SORT_SHELL_DP1_ARRAY",err,error)
4641 INTEGER(INTG),
INTENT(IN),
TARGET :: A(:)
4642 INTEGER(INTG),
INTENT(IN),
TARGET :: B(:)
4643 INTEGER(INTG),
ALLOCATABLE,
INTENT(OUT) :: C(:)
4644 INTEGER(INTG),
INTENT(OUT) :: ERR
4647 INTEGER(INTG) :: SIZE_SHORTER,SIZE_LONGER
4648 INTEGER(INTG) :: I,J,START,NUMBER_OF_MATCHES
4649 INTEGER(INTG),
POINTER :: LONGER(:),SHORTER(:)
4650 INTEGER(INTG),
ALLOCATABLE :: MATCHES(:)
4651 INTEGER(INTG),
ALLOCATABLE :: LONG_ARRAY(:),SHORT_ARRAY(:)
4653 enters(
"LIST_INTERSECTION_INTG_ARRAY",err,error,*999)
4658 IF(
ALLOCATED(c))
THEN 4660 CALL flagerror(
"Output array is already allocated.",err,error,*999)
4666 IF(
SIZE(a)>
SIZE(b))
THEN 4673 size_shorter=
SIZE(shorter)
4674 size_longer=
SIZE(longer)
4675 ALLOCATE(matches(size_shorter))
4679 IF(size_longer*size_shorter<=1e4)
THEN 4683 IF(shorter(i)==longer(j))
THEN 4684 number_of_matches=number_of_matches+1
4685 matches(number_of_matches)=shorter(i)
4691 ALLOCATE(long_array(size_longer),short_array(size_shorter))
4692 long_array(1:size_longer)=longer(1:size_longer)
4693 short_array(1:size_shorter)=shorter(1:size_shorter)
4695 CALL list_sort(long_array,err,error,*999)
4696 CALL list_sort(short_array,err,error,*999)
4700 DO j=start,size_longer
4701 IF(long_array(j)==short_array(i))
THEN 4702 number_of_matches=number_of_matches+1
4703 matches(number_of_matches)=short_array(i)
4704 start=min(j+1,size_longer)
4706 ELSEIF(long_array(j)>short_array(i))
THEN 4713 DEALLOCATE(long_array,short_array)
4716 ALLOCATE(c(number_of_matches))
4717 c(1:number_of_matches)=matches(1:number_of_matches)
4721 exits(
"LIST_INTERSECTION_INTG_ARRAY")
4723 999 errorsexits(
"LIST_INTERSECTION_INTG_ARRAY",err,error)
4736 INTEGER(C_INT),
INTENT(IN),
TARGET :: A(:)
4737 INTEGER(C_INT),
INTENT(IN),
TARGET :: B(:)
4738 INTEGER(C_INT),
ALLOCATABLE,
INTENT(OUT) :: C(:)
4739 INTEGER(INTG),
INTENT(OUT) :: ERR
4742 INTEGER(INTG) :: SIZE_SHORTER,SIZE_LONGER
4743 INTEGER(INTG) :: I,J,START,NUMBER_OF_MATCHES
4744 INTEGER(C_INT),
POINTER :: LONGER(:),SHORTER(:)
4745 INTEGER(C_INT),
ALLOCATABLE :: MATCHES(:)
4746 INTEGER(C_INT),
ALLOCATABLE :: LONG_ARRAY(:),SHORT_ARRAY(:)
4748 enters(
"LIST_INTERSECTION_C_INT_ARRAY",err,error,*999)
4753 IF(
ALLOCATED(c))
THEN 4755 CALL flagerror(
"Output array is already allocated.",err,error,*999)
4761 IF(
SIZE(a)>
SIZE(b))
THEN 4768 size_shorter=
SIZE(shorter)
4769 size_longer=
SIZE(longer)
4770 ALLOCATE(matches(size_shorter))
4774 IF(size_longer*size_shorter<=1e4)
THEN 4778 IF(shorter(i)==longer(j))
THEN 4779 number_of_matches=number_of_matches+1
4780 matches(number_of_matches)=shorter(i)
4786 ALLOCATE(long_array(size_longer),short_array(size_shorter))
4787 long_array(1:size_longer)=longer(1:size_longer)
4788 short_array(1:size_shorter)=shorter(1:size_shorter)
4790 CALL list_sort(long_array,err,error,*999)
4791 CALL list_sort(short_array,err,error,*999)
4795 DO j=start,size_longer
4796 IF(long_array(j)==short_array(i))
THEN 4797 number_of_matches=number_of_matches+1
4798 matches(number_of_matches)=short_array(i)
4799 start=min(j+1,size_longer)
4801 ELSEIF(long_array(j)>short_array(i))
THEN 4808 DEALLOCATE(long_array,short_array)
4811 ALLOCATE(c(number_of_matches))
4812 c(1:number_of_matches)=matches(1:number_of_matches)
4816 exits(
"LIST_INTERSECTION_C_INT_ARRAY")
4818 999 errorsexits(
"LIST_INTERSECTION_C_INT_ARRAY",err,error)
4830 INTEGER(INTG),
INTENT(IN) :: A(:)
4831 INTEGER(INTG),
INTENT(IN) :: B(:)
4832 LOGICAL,
INTENT(OUT) :: SUBSET
4833 INTEGER(INTG),
INTENT(OUT) :: ERR
4836 INTEGER(INTG) :: SIZE_A,SIZE_B,I,J,START,SIZE_REDUCE
4837 INTEGER(INTG),
ALLOCATABLE :: A_SORTED(:),B_SORTED(:)
4839 enters(
"LISTS_SUBSET_OF_INTG_ARRAY",err,error,*999)
4846 IF(size_a>size_b)
THEN 4847 exits(
"LISTS_SUBSET_OF_INTG_ARRAY")
4853 IF(a(i)==0) size_reduce=size_reduce+1
4855 size_a=size_a-size_reduce
4858 IF(b(i)==0) size_reduce=size_reduce+1
4860 size_b=size_b-size_reduce
4863 IF(size_a*size_b<=1e4)
THEN 4869 ELSEIF(j==size_b)
THEN 4870 exits(
"LISTS_SUBSET_OF_INTG_ARRAY")
4874 IF(i==size_a) subset=.true.
4878 ALLOCATE(a_sorted(size_a),b_sorted(size_b))
4879 a_sorted(1:size_a)=a(1:size_a)
4880 b_sorted(1:size_b)=b(1:size_b)
4887 start=min(j+1,size_b)
4889 ELSEIF(a(i)<b(j))
THEN 4890 DEALLOCATE(a_sorted,b_sorted)
4891 exits(
"LISTS_SUBSET_OF_INTG_ARRAY")
4895 IF(i==size_a) subset=.true.
4897 DEALLOCATE(a_sorted,b_sorted)
4900 exits(
"LISTS_SUBSET_OF_INTG_ARRAY")
4902 999 errorsexits(
"LISTS_SUBSET_OF_INTG_ARRAY",err,error)
4914 INTEGER(C_INT),
INTENT(IN) :: A(:)
4915 INTEGER(C_INT),
INTENT(IN) :: B(:)
4916 LOGICAL,
INTENT(OUT) :: SUBSET
4917 INTEGER(INTG),
INTENT(OUT) :: ERR
4920 INTEGER(INTG) :: SIZE_A,SIZE_B,I,J,START,SIZE_REDUCE
4921 INTEGER(C_INT),
ALLOCATABLE :: A_SORTED(:),B_SORTED(:)
4923 enters(
"LISTS_SUBSET_OF_C_INT_ARRAY",err,error,*999)
4930 IF(size_a>size_b)
THEN 4931 exits(
"LISTS_SUBSET_OF_C_INT_ARRAY")
4937 IF(a(i)==0) size_reduce=size_reduce+1
4939 size_a=size_a-size_reduce
4942 IF(b(i)==0) size_reduce=size_reduce+1
4944 size_b=size_b-size_reduce
4947 IF(size_a*size_b<=1e4)
THEN 4953 ELSEIF(j==size_b)
THEN 4954 exits(
"LISTS_SUBSET_OF_C_INT_ARRAY")
4958 IF(i==size_a) subset=.true.
4962 ALLOCATE(a_sorted(size_a),b_sorted(size_b))
4963 a_sorted(1:size_a)=a(1:size_a)
4964 b_sorted(1:size_b)=b(1:size_b)
4971 start=min(j+1,size_b)
4973 ELSEIF(a(i)<b(j))
THEN 4974 DEALLOCATE(a_sorted,b_sorted)
4975 exits(
"LISTS_SUBSET_OF_C_INT_ARRAY")
4979 IF(i==size_a) subset=.true.
4981 DEALLOCATE(a_sorted,b_sorted)
4984 exits(
"LISTS_SUBSET_OF_C_INT_ARRAY")
4986 999 errorsexits(
"LISTS_SUBSET_OF_C_INT_ARRAY",err,error)
Sorts a list into assending order using the heap sort method.
subroutine list_sort_heap_c_int2_array(A, KEY_DIMENSION, ERR, ERROR,)
Sorts an integer array of data dimension > 1 list into assending order using the heap sort method...
subroutine list_search_dp_array(A, VALUE, POSITION, ERR, ERROR,)
Searches a double precision real array list A for VALUE. If the search is successful POSITION contain...
subroutine, public enters(NAME, ERR, ERROR,)
Records the entry into the named procedure and initialises the error code.
integer(intg), parameter list_bubble_sort_method
Bubble sort method.
subroutine list_detach_and_destroy_sp2(LIST, NUMBER_IN_LIST, LIST_VALUES, ERR, ERROR,)
Detaches the list values from a single precision real list of data dimension > 1 and returns them as ...
subroutine, public list_key_dimension_set(LIST, KEY_DIMENSION, ERR, ERROR,)
Sets/changes the key dimension (i.e., the dimension for searching and sorting) for a list...
subroutine list_item_get_intg2(LIST, LIST_ITEM, ITEM, ERR, ERROR,)
Returns the ITEM in a list at position LIST_ITEM in the given integer LIST.
subroutine list_sort_intg1_array(A, ERR, ERROR,)
Sorts an integer array list of data dimension 1 into ascending order.
real(sp), parameter zero_tolerance_sp
The zero tolerance for single precision zero tests i.e., if(abs(x)>zero_tolerance) then...
subroutine list_item_in_list_intg1(LIST, ITEM, LIST_ITEM, ERR, ERROR,)
Determines if ITEM is in the given integer LIST. If it is LIST_ITEM is the index in the list...
subroutine list_detach_and_destroy_dp1(LIST, NUMBER_IN_LIST, LIST_VALUES, ERR, ERROR,)
Detaches the list values from a double precision real list of data dimension 1 and returns them as an...
subroutine list_detach_and_destroy_intg1(LIST, NUMBER_IN_LIST, LIST_VALUES, ERR, ERROR,)
Detaches the list values from an integer list of data dimension 1 and returns them as an array of bas...
subroutine list_item_add_dp1(LIST, ITEM, ERR, ERROR,)
Adds an item to the end of a double precision real list of data dimension 1.
subroutine list_search_linear_sp_array(A, VALUE, POSITION, ERR, ERROR,)
Searches a single precision real array list A for VALUE using the linear search method. If the search is successful POSITION contains the index of the position of VALUE in the list otherwise POSITION is zero.
Checks whether an array is a subset of another array.
Determines if an item is in a list and returns the position of the item.
subroutine list_intersection_c_int_array(A, B, C, ERR, ERROR,)
Finds the intersection of two sets (arrays), leaving the original arrays intact.
This module contains all string manipulation and transformation routines.
subroutine, public list_number_of_items_get(LIST, NUMBER_OF_ITEMS, ERR, ERROR,)
Gets the current number of items in a list.
integer(intg), parameter double_real_type
Double precision real data type.
subroutine list_item_in_list_sp1(LIST, ITEM, LIST_ITEM, ERR, ERROR,)
Determines if ITEM is in the given single precision real LIST. If it is LIST_ITEM is the index in the...
Sorts a list into ascending order.
subroutine list_search_linear_dp_array(A, VALUE, POSITION, ERR, ERROR,)
Searches a double precision real array list A for VALUE using the linear search method. If the search is successful POSITION contains the index of the position of VALUE in the list otherwise POSITION is zero.
integer(intg), parameter, public list_intg_type
Integer data type for a list.
subroutine list_item_add_sp1(LIST, ITEM, ERR, ERROR,)
Adds an item to the end of a single precision real list of data dimension 1.
subroutine list_sort_heap_c_int1_array(A, ERR, ERROR,)
Sorts an integer array of data dimension 1 list into assending order using the heap sort method...
subroutine list_sort_sp2_array(A, KEY_DIMENSION, ERR, ERROR,)
Sorts an single precision array list of data dimension > 1 into ascending order.
subroutine list_sort_c_int1_array(A, ERR, ERROR,)
Sorts an integer array list of data dimension 1 into ascending order.
This module provides an iso_varying_string module, conformant to the API specified in ISO/IEC 1539-2:...
subroutine, public list_remove_duplicates(LIST, ERR, ERROR,)
Removes duplicate entries from a list. A side effect of this is that the list is sorted.
Calculates the intersection of two arrays.
subroutine list_item_set_intg2(LIST, LIST_ITEM, ITEM, ERR, ERROR,)
Set an item in an integer list of data dimension > 1.
subroutine list_item_add_dp2(LIST, ITEM, ERR, ERROR,)
Adds an item to the end of a double precision real list of data dimension > 1.
subroutine list_sort_bubble_intg2_array(A, KEY_DIMENSION, ERR, ERROR,)
BUBBLE_SORT_INTG performs a bubble sort on an integer array of data dimension > 1 list...
subroutine list_search_sp_array(A, VALUE, POSITION, ERR, ERROR,)
Searches a single precision real array list A for VALUE. If the search is successful POSITION contain...
subroutine list_sort_bubble_dp2_array(A, KEY_DIMENSION, ERR, ERROR,)
BUBBLE_SORT_DP performs a bubble sort on a double precision of data dimension > 1 list...
This module contains all program wide constants.
Sorts a list into assending order using the bubble sort method.
subroutine list_sort_heap_sp2_array(A, KEY_DIMENSION, ERR, ERROR,)
Sorts a real single precision array of data dimension > 1 list into assending order using the heap so...
subroutine list_sort_shell_dp1_array(A, ERR, ERROR,)
Sorts a real double precision array of data dimension 1 list into either assending or descending orde...
subroutine list_item_set_dp2(LIST, LIST_ITEM, ITEM, ERR, ERROR,)
Sets an item in a double precision real list of data dimension > 1.
Determines if an item is in a list and returns the position of the item.
subroutine list_sort_list(LIST, ERR, ERROR,)
Sorts a list of into ascending order.
Detaches the list values from a list and returns them as a pointer to a array of base type before des...
subroutine lists_subset_of_c_int_array(A, B, SUBSET, ERR, ERROR,)
Finds out whether array A is a subset of array B.
Sorts a list into assending order using the bubble sort method.
subroutine list_sort_bubble_c_int1_array(A, ERR, ERROR,)
BUBBLE_SORT_C_INT performs a bubble sort on an integer array of data dimension 1 list.
subroutine list_item_in_list_sp2(LIST, ITEM, LIST_ITEM, ERR, ERROR,)
Determines if ITEM is in the given single precision real LIST. If it is LIST_ITEM is the index in the...
subroutine, public exits(NAME)
Records the exit out of the named procedure.
subroutine list_sort_heap_dp1_array(A, ERR, ERROR,)
Sorts a real double precision array of data dimension 1 list into assending order using the heap sort...
This module contains all type definitions in order to avoid cyclic module references.
subroutine list_sort_heap_dp2_array(A, KEY_DIMENSION, ERR, ERROR,)
Sorts a real double precision array of data dimension > 1 list into assending order using the heap so...
subroutine list_sort_bubble_dp1_array(A, ERR, ERROR,)
BUBBLE_SORT_DP performs a bubble sort on a double precision of data dimension 1 list.
subroutine list_item_get_intg1(LIST, LIST_ITEM, ITEM, ERR, ERROR,)
Returns the ITEM in a list at position LIST_ITEM in the given integer LIST.
subroutine list_intersection_intg_array(A, B, C, ERR, ERROR,)
Finds the intersection of two sets (arrays), leaving the original arrays intact.
This module contains all the low-level base routines e.g., all debug, control, and low-level communic...
subroutine list_item_add_intg1(LIST, ITEM, ERR, ERROR,)
Adds an item to the end of an integer list of data dimension 1.
subroutine list_item_in_list_dp2(LIST, ITEM, LIST_ITEM, ERR, ERROR,)
Determines if ITEM is in the given double precision real LIST. If it is LIST_ITEM is the index in the...
subroutine list_sort_dp2_array(A, KEY_DIMENSION, ERR, ERROR,)
Sorts an double precision array list of data dimension > 1 into ascending order.
subroutine list_item_set_intg1(LIST, LIST_ITEM, ITEM, ERR, ERROR,)
Sets an item in an integer list of data dimension 1.
subroutine list_item_get_sp2(LIST, LIST_ITEM, ITEM, ERR, ERROR,)
Returns the ITEM in a list at position LIST_ITEM in the given single precision LIST.
integer(intg), parameter list_sort_descending_type
Descending order for sort.
subroutine, public list_create_finish(LIST, ERR, ERROR,)
Finishes the creation of a list created with LIST_CREATE_START.
integer(intg), parameter, public list_sp_type
Single precision real data type for a list.
subroutine list_item_in_list_dp1(LIST, ITEM, LIST_ITEM, ERR, ERROR,)
Determines if ITEM is in the given double precision real LIST. If it is LIST_ITEM is the index in the...
subroutine list_sort_shell_c_int2_array(A, KEY_DIMENSION, ERR, ERROR,)
Sorts an integer array of data dimension > 1 list into either assending or descending order using the...
subroutine list_item_set_sp1(LIST, LIST_ITEM, ITEM, ERR, ERROR,)
Sets an item in a single precision real list of data dimension 1.
integer(intg), parameter list_shell_sort_method
Shell sort method.
Contains information on a list.
subroutine list_item_add_intg2(LIST, ITEM, ERR, ERROR,)
Adds an item to the end of an integer list of data dimension > 1.
subroutine list_sort_heap_intg1_array(A, ERR, ERROR,)
Sorts an integer array of data dimension 1 list into assending order using the heap sort method...
subroutine list_detach_and_destroy_intg2(LIST, NUMBER_IN_LIST, LIST_VALUES, ERR, ERROR,)
Detaches the list values from an integer list of data dimension > 1 and returns them as an array of b...
subroutine list_item_get_dp1(LIST, LIST_ITEM, ITEM, ERR, ERROR,)
Returns the ITEM in a list at position LIST_ITEM in the given double precision LIST.
subroutine list_finalise(LIST, ERR, ERROR,)
Finalises a list and deallocates all memory.
subroutine, public list_item_delete(LIST, LIST_ITEM, ERR, ERROR,)
Deletes the item given by the LIST_ITEM index from the given list.
Adds an item to the end of a list.
subroutine, public list_data_dimension_set(LIST, DATA_DIMENSION, ERR, ERROR,)
Sets/changes the data dimension for a list.
subroutine list_initialise(LIST, ERR, ERROR,)
Initialises a list and all its components.
subroutine, public list_mutable_set(LIST, MUTABLE, ERR, ERROR,)
Sets/changes the data dimension for a list.
subroutine list_sort_shell_intg1_array(A, ERR, ERROR,)
Sorts an integer array of data dimension 1 list into either assending or descending order using the s...
subroutine list_sort_shell_sp1_array(A, ERR, ERROR,)
Sorts a real single precision array of data dimension 1 list into either assending or descending orde...
Searches a list using the linear search method.
subroutine list_sort_bubble_intg1_array(A, ERR, ERROR,)
BUBBLE_SORT_INTG performs a bubble sort on an integer array of data dimension 1 list.
Returns an item in a list at a specififed position.
integer(intg), parameter list_sort_ascending_type
Ascending order for sort.
subroutine list_sort_shell_dp2_array(A, KEY_DIMENSION, ERR, ERROR,)
Sorts a real double precision array of data dimension 2 list into either assending or descending orde...
integer(intg), parameter list_heap_sort_method
Heap sort method.
Sorts a list into assending order using the heap sort method.
subroutine list_search_linear_intg_array(A, VALUE, POSITION, ERR, ERROR,)
Searches an integer array list A for VALUE using the linear search method. If the search is successfu...
subroutine list_detach_and_destroy_sp1(LIST, NUMBER_IN_LIST, LIST_VALUES, ERR, ERROR,)
Detaches the list values from a single precision real list of data dimension 1 and returns them as an...
subroutine, public list_create_start(LIST, ERR, ERROR,)
Starts the creation of a list and returns a pointer to the created list.
Checks whether an array is a subset of another array.
subroutine list_item_set_dp1(LIST, LIST_ITEM, ITEM, ERR, ERROR,)
Sets an item in a double precision real list of data dimension 1.
Searches a list for a given value and returns the position in the list if the value exists...
Sets an item in the list.
Sorts a list into either assending or descending order using the shell sort method.
subroutine list_sort_intg2_array(A, KEY_DIMENSION, ERR, ERROR,)
Sorts an integer array list of data dimension > 1 into ascending order.
Sets an item in the list.
Adds an item to the end of a list.
subroutine, public list_clearitems(list, err, error,)
Clears all the items from a list.
Sorts a list into either assending or descending order using the shell sort method.
subroutine list_sort_heap_intg2_array(A, KEY_DIMENSION, ERR, ERROR,)
Sorts an integer array of data dimension > 1 list into assending order using the heap sort method...
integer(intg), parameter single_real_type
Single precision real data type.
integer(intg), parameter, public list_dp_type
Double precision real data type for a list.
Implements lists of base types.
Detaches the list values from a list and returns them as a pointer to a array of base type before des...
subroutine, public list_data_type_set(LIST, DATA_TYPE, ERR, ERROR,)
Sets/changes the data type for a list.
subroutine, public list_destroy(LIST, ERR, ERROR,)
Destroys a list.
subroutine list_sort_sp1_array(A, ERR, ERROR,)
Sorts an single precision array list of data dimension 1 into ascending order.
subroutine list_detach_and_destroy_dp2(LIST, NUMBER_IN_LIST, LIST_VALUES, ERR, ERROR,)
Detaches the list values from a double precision real list of data dimension > 1 and returns them as ...
Returns an item in a list at a specififed position.
subroutine list_sort_c_int2_array(A, KEY_DIMENSION, ERR, ERROR,)
Sorts an integer array list of data dimension > 1 into ascending order.
subroutine list_item_in_list_intg2(LIST, ITEM, LIST_ITEM, ERR, ERROR,)
Determines if ITEM is in the given integer LIST. If it is LIST_ITEM is the index in the list...
integer(intg), parameter list_unsorted_type
Unsorted list type.
subroutine list_sort_bubble_sp2_array(A, KEY_DIMENSION, ERR, ERROR,)
BUBBLE_SORT_SP performs a bubble sort on a single precision array of data dimension > 1 list...
subroutine list_item_get_dp2(LIST, LIST_ITEM, ITEM, ERR, ERROR,)
Returns the ITEM in a list at position LIST_ITEM in the given double precision LIST.
subroutine list_search_linear_c_int_array(A, VALUE, POSITION, ERR, ERROR,)
Searches an integer array list A for VALUE using the linear search method. If the search is successfu...
subroutine list_item_add_sp2(LIST, ITEM, ERR, ERROR,)
Adds an item to the end of a single precision real list of data dimension > 1.
subroutine lists_subset_of_intg_array(A, B, SUBSET, ERR, ERROR,)
Finds out whether array A is a subset of array B.
Searches a list using the linear search method.
subroutine list_search_intg_array(A, VALUE, POSITION, ERR, ERROR,)
Searches an integer array list A for VALUE. If the search is successful POSITION contains the index o...
Flags an error condition.
subroutine list_item_set_sp2(LIST, LIST_ITEM, ITEM, ERR, ERROR,)
Sets an item in a single precision real list of data dimension > 1.
subroutine list_sort_dp1_array(A, ERR, ERROR,)
Sorts an double precision array list of data dimension 1 into ascending order.
integer(intg), parameter integer_type
Integer data type.
subroutine list_sort_shell_sp2_array(A, KEY_DIMENSION, ERR, ERROR,)
Sorts a real single precision array of data dimension > 1 list into either assending or descending or...
subroutine, public list_initial_size_set(LIST, INITIAL_SIZE, ERR, ERROR,)
Sets/changes the initial size for a list.
real(dp), parameter zero_tolerance
subroutine list_item_get_sp1(LIST, LIST_ITEM, ITEM, ERR, ERROR,)
Returns the ITEM in a list at position LIST_ITEM in the given single precision LIST.
This module contains all kind definitions.
subroutine list_sort_shell_intg2_array(A, KEY_DIMENSION, ERR, ERROR,)
Sorts an integer array of data dimension > 1 list into either assending or descending order using the...
subroutine list_search_c_int_array(A, VALUE, POSITION, ERR, ERROR,)
Searches an integer array list A for VALUE. If the search is successful POSITION contains the index o...
subroutine list_sort_heap_sp1_array(A, ERR, ERROR,)
Sorts a real single precision array of data dimension 1 list into assending order using the heap sort...
subroutine list_sort_bubble_c_int2_array(A, KEY_DIMENSION, ERR, ERROR,)
BUBBLE_SORT_C_INT performs a bubble sort on an integer array of data dimension > 1 list...
subroutine list_sort_bubble_sp1_array(A, ERR, ERROR,)
BUBBLE_SORT_SP performs a bubble sort on a single precision array of data dimension 1 list...
subroutine list_sort_shell_c_int1_array(A, ERR, ERROR,)
Sorts an integer array of data dimension 1 list into either assending or descending order using the s...
subroutine, public list_appendlist(list, appendedList, err, error,)
Appends a list to the end of this list.