11 USE cp_array_utils,
ONLY: cp_3d_r_cp_type, cp_3d_c_cp_type, cp_1d_r_cp_type, cp_1d_c_cp_type
13 #include "../base/base_uses.f90"
32 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
36 PUBLIC :: cp_sll_3d_r_type, cp_sll_3d_r_p_type
37 PUBLIC :: cp_sll_3d_c_type, cp_sll_3d_c_p_type
38 PUBLIC :: cp_sll_1d_r_type, cp_sll_1d_r_p_type
39 PUBLIC :: cp_sll_1d_c_type, cp_sll_1d_c_p_type
40 PUBLIC :: cp_sll_rs_type, cp_sll_rs_p_type
43 PUBLIC :: cp_create, cp_dealloc, cp_next
45 PUBLIC :: cp_get_first_el, cp_get_rest, cp_get_length, cp_get_element_at, cp_to_array
47 PUBLIC :: cp_set_element_at
49 PUBLIC :: cp_insert, cp_remove_first_el, cp_remove_el, cp_remove_all
124 INTERFACE cp_get_first_el
132 INTERFACE cp_get_rest
140 INTERFACE cp_get_length
148 INTERFACE cp_get_element_at
156 INTERFACE cp_set_element_at
171 INTERFACE cp_insert_at
179 INTERFACE cp_remove_el
192 INTERFACE cp_remove_first_el
200 INTERFACE cp_remove_all
208 INTERFACE cp_to_array
238 TYPE cp_sll_3d_r_type
239 REAL(kind=
dp),
dimension(:,:,:),
pointer,
contiguous :: first_el => null()
240 TYPE(cp_sll_3d_r_type),
POINTER :: rest => null()
241 END TYPE cp_sll_3d_r_type
264 TYPE cp_sll_3d_c_type
265 COMPLEX(kind=dp),
dimension(:,:,:),
pointer,
contiguous :: first_el => null()
266 TYPE(cp_sll_3d_c_type),
POINTER :: rest => null()
267 END TYPE cp_sll_3d_c_type
290 TYPE cp_sll_1d_r_type
291 REAL(kind=
dp),
dimension(:),
pointer,
contiguous :: first_el => null()
292 TYPE(cp_sll_1d_r_type),
POINTER :: rest => null()
293 END TYPE cp_sll_1d_r_type
316 TYPE cp_sll_1d_c_type
317 COMPLEX(kind=dp),
dimension(:),
pointer,
contiguous :: first_el => null()
318 TYPE(cp_sll_1d_c_type),
POINTER :: rest => null()
319 END TYPE cp_sll_1d_c_type
343 type(realspace_grid_type),
pointer :: first_el => null()
344 TYPE(cp_sll_rs_type),
POINTER :: rest => null()
345 END TYPE cp_sll_rs_type
354 TYPE cp_sll_3d_r_p_type
355 TYPE(cp_sll_3d_r_type),
POINTER :: list => null()
356 END TYPE cp_sll_3d_r_p_type
364 TYPE cp_sll_3d_c_p_type
365 TYPE(cp_sll_3d_c_type),
POINTER :: list => null()
366 END TYPE cp_sll_3d_c_p_type
374 TYPE cp_sll_1d_r_p_type
375 TYPE(cp_sll_1d_r_type),
POINTER :: list => null()
376 END TYPE cp_sll_1d_r_p_type
384 TYPE cp_sll_1d_c_p_type
385 TYPE(cp_sll_1d_c_type),
POINTER :: list => null()
386 END TYPE cp_sll_1d_c_p_type
394 TYPE cp_sll_rs_p_type
395 TYPE(cp_sll_rs_type),
POINTER :: list => null()
396 END TYPE cp_sll_rs_p_type
413 TYPE(cp_sll_3d_r_type),
POINTER :: sll
414 REAL(kind=
dp),
dimension(:,:,:),
pointer,
contiguous,
OPTIONAL :: first_el
415 TYPE(cp_sll_3d_r_type),
POINTER,
OPTIONAL :: rest
417 IF (.NOT.
PRESENT(first_el))
THEN
419 IF (
PRESENT(rest)) sll => rest
422 sll%first_el =>first_el
424 IF (
PRESENT(rest)) sll%rest => rest
437 TYPE(cp_sll_3d_c_type),
POINTER :: sll
438 COMPLEX(kind=dp),
dimension(:,:,:),
pointer,
contiguous,
OPTIONAL :: first_el
439 TYPE(cp_sll_3d_c_type),
POINTER,
OPTIONAL :: rest
441 IF (.NOT.
PRESENT(first_el))
THEN
443 IF (
PRESENT(rest)) sll => rest
446 sll%first_el =>first_el
448 IF (
PRESENT(rest)) sll%rest => rest
461 TYPE(cp_sll_1d_r_type),
POINTER :: sll
462 REAL(kind=
dp),
dimension(:),
pointer,
contiguous,
OPTIONAL :: first_el
463 TYPE(cp_sll_1d_r_type),
POINTER,
OPTIONAL :: rest
465 IF (.NOT.
PRESENT(first_el))
THEN
467 IF (
PRESENT(rest)) sll => rest
470 sll%first_el =>first_el
472 IF (
PRESENT(rest)) sll%rest => rest
485 TYPE(cp_sll_1d_c_type),
POINTER :: sll
486 COMPLEX(kind=dp),
dimension(:),
pointer,
contiguous,
OPTIONAL :: first_el
487 TYPE(cp_sll_1d_c_type),
POINTER,
OPTIONAL :: rest
489 IF (.NOT.
PRESENT(first_el))
THEN
491 IF (
PRESENT(rest)) sll => rest
494 sll%first_el =>first_el
496 IF (
PRESENT(rest)) sll%rest => rest
509 TYPE(cp_sll_rs_type),
POINTER :: sll
510 type(realspace_grid_type),
pointer,
OPTIONAL :: first_el
511 TYPE(cp_sll_rs_type),
POINTER,
OPTIONAL :: rest
513 IF (.NOT.
PRESENT(first_el))
THEN
515 IF (
PRESENT(rest)) sll => rest
518 sll%first_el =>first_el
520 IF (
PRESENT(rest)) sll%rest => rest
536 TYPE(cp_sll_3d_r_type),
POINTER :: sll
552 TYPE(cp_sll_3d_c_type),
POINTER :: sll
568 TYPE(cp_sll_1d_r_type),
POINTER :: sll
584 TYPE(cp_sll_1d_c_type),
POINTER :: sll
600 TYPE(cp_sll_rs_type),
POINTER :: sll
614 SUBROUTINE cp_sll_3d_r_dealloc_node(sll)
615 TYPE(cp_sll_3d_r_type),
POINTER :: sll
618 END SUBROUTINE cp_sll_3d_r_dealloc_node
626 SUBROUTINE cp_sll_3d_c_dealloc_node(sll)
627 TYPE(cp_sll_3d_c_type),
POINTER :: sll
630 END SUBROUTINE cp_sll_3d_c_dealloc_node
638 SUBROUTINE cp_sll_1d_r_dealloc_node(sll)
639 TYPE(cp_sll_1d_r_type),
POINTER :: sll
642 END SUBROUTINE cp_sll_1d_r_dealloc_node
650 SUBROUTINE cp_sll_1d_c_dealloc_node(sll)
651 TYPE(cp_sll_1d_c_type),
POINTER :: sll
654 END SUBROUTINE cp_sll_1d_c_dealloc_node
662 SUBROUTINE cp_sll_rs_dealloc_node(sll)
663 TYPE(cp_sll_rs_type),
POINTER :: sll
666 END SUBROUTINE cp_sll_rs_dealloc_node
679 TYPE(cp_sll_3d_r_type),
POINTER :: sll
680 REAL(kind=
dp),
dimension(:,:,:),
pointer,
contiguous :: res
693 TYPE(cp_sll_3d_c_type),
POINTER :: sll
694 COMPLEX(kind=dp),
dimension(:,:,:),
pointer,
contiguous :: res
707 TYPE(cp_sll_1d_r_type),
POINTER :: sll
708 REAL(kind=
dp),
dimension(:),
pointer,
contiguous :: res
721 TYPE(cp_sll_1d_c_type),
POINTER :: sll
722 COMPLEX(kind=dp),
dimension(:),
pointer,
contiguous :: res
735 TYPE(cp_sll_rs_type),
POINTER :: sll
736 type(realspace_grid_type),
pointer :: res
754 TYPE(cp_sll_3d_r_type),
POINTER :: sll
755 INTEGER,
OPTIONAL :: iter
757 TYPE(cp_sll_3d_r_type),
POINTER :: res
761 IF (.NOT.
ASSOCIATED(sll))
THEN
764 IF (
PRESENT(iter))
THEN
767 IF (
ASSOCIATED(res%rest))
THEN
770 cpabort(
"tried to go past end")
775 IF (.NOT.
ASSOCIATED(res%rest))
EXIT
797 TYPE(cp_sll_3d_c_type),
POINTER :: sll
798 INTEGER,
OPTIONAL :: iter
800 TYPE(cp_sll_3d_c_type),
POINTER :: res
804 IF (.NOT.
ASSOCIATED(sll))
THEN
807 IF (
PRESENT(iter))
THEN
810 IF (
ASSOCIATED(res%rest))
THEN
813 cpabort(
"tried to go past end")
818 IF (.NOT.
ASSOCIATED(res%rest))
EXIT
840 TYPE(cp_sll_1d_r_type),
POINTER :: sll
841 INTEGER,
OPTIONAL :: iter
843 TYPE(cp_sll_1d_r_type),
POINTER :: res
847 IF (.NOT.
ASSOCIATED(sll))
THEN
850 IF (
PRESENT(iter))
THEN
853 IF (
ASSOCIATED(res%rest))
THEN
856 cpabort(
"tried to go past end")
861 IF (.NOT.
ASSOCIATED(res%rest))
EXIT
883 TYPE(cp_sll_1d_c_type),
POINTER :: sll
884 INTEGER,
OPTIONAL :: iter
886 TYPE(cp_sll_1d_c_type),
POINTER :: res
890 IF (.NOT.
ASSOCIATED(sll))
THEN
893 IF (
PRESENT(iter))
THEN
896 IF (
ASSOCIATED(res%rest))
THEN
899 cpabort(
"tried to go past end")
904 IF (.NOT.
ASSOCIATED(res%rest))
EXIT
926 TYPE(cp_sll_rs_type),
POINTER :: sll
927 INTEGER,
OPTIONAL :: iter
929 TYPE(cp_sll_rs_type),
POINTER :: res
933 IF (.NOT.
ASSOCIATED(sll))
THEN
936 IF (
PRESENT(iter))
THEN
939 IF (
ASSOCIATED(res%rest))
THEN
942 cpabort(
"tried to go past end")
947 IF (.NOT.
ASSOCIATED(res%rest))
EXIT
968 TYPE(cp_sll_3d_r_type),
pointer :: sll
971 TYPE(cp_sll_3d_r_type),
POINTER :: iterator
976 IF (
ASSOCIATED(iterator))
THEN
978 iterator => iterator%rest
995 TYPE(cp_sll_3d_c_type),
pointer :: sll
998 TYPE(cp_sll_3d_c_type),
POINTER :: iterator
1003 IF (
ASSOCIATED(iterator))
THEN
1005 iterator => iterator%rest
1022 TYPE(cp_sll_1d_r_type),
pointer :: sll
1025 TYPE(cp_sll_1d_r_type),
POINTER :: iterator
1030 IF (
ASSOCIATED(iterator))
THEN
1032 iterator => iterator%rest
1049 TYPE(cp_sll_1d_c_type),
pointer :: sll
1052 TYPE(cp_sll_1d_c_type),
POINTER :: iterator
1057 IF (
ASSOCIATED(iterator))
THEN
1059 iterator => iterator%rest
1076 TYPE(cp_sll_rs_type),
pointer :: sll
1079 TYPE(cp_sll_rs_type),
POINTER :: iterator
1084 IF (
ASSOCIATED(iterator))
THEN
1086 iterator => iterator%rest
1105 REAL(kind=
dp),
dimension(:,:,:),
pointer,
contiguous :: res
1106 TYPE(cp_sll_3d_r_type),
POINTER :: sll
1107 INTEGER,
INTENT(in) :: index
1109 TYPE(cp_sll_3d_r_type),
POINTER :: pos
1111 IF (index == -1)
THEN
1116 cpassert(
ASSOCIATED(pos))
1132 COMPLEX(kind=dp),
dimension(:,:,:),
pointer,
contiguous :: res
1133 TYPE(cp_sll_3d_c_type),
POINTER :: sll
1134 INTEGER,
INTENT(in) :: index
1136 TYPE(cp_sll_3d_c_type),
POINTER :: pos
1138 IF (index == -1)
THEN
1143 cpassert(
ASSOCIATED(pos))
1159 REAL(kind=
dp),
dimension(:),
pointer,
contiguous :: res
1160 TYPE(cp_sll_1d_r_type),
POINTER :: sll
1161 INTEGER,
INTENT(in) :: index
1163 TYPE(cp_sll_1d_r_type),
POINTER :: pos
1165 IF (index == -1)
THEN
1170 cpassert(
ASSOCIATED(pos))
1186 COMPLEX(kind=dp),
dimension(:),
pointer,
contiguous :: res
1187 TYPE(cp_sll_1d_c_type),
POINTER :: sll
1188 INTEGER,
INTENT(in) :: index
1190 TYPE(cp_sll_1d_c_type),
POINTER :: pos
1192 IF (index == -1)
THEN
1197 cpassert(
ASSOCIATED(pos))
1213 type(realspace_grid_type),
pointer :: res
1214 TYPE(cp_sll_rs_type),
POINTER :: sll
1215 INTEGER,
INTENT(in) :: index
1217 TYPE(cp_sll_rs_type),
POINTER :: pos
1219 IF (index == -1)
THEN
1224 cpassert(
ASSOCIATED(pos))
1242 REAL(kind=
dp),
dimension(:,:,:),
pointer,
contiguous ::
value
1243 TYPE(cp_sll_3d_r_type),
POINTER :: sll
1244 INTEGER,
INTENT(in) :: index
1246 TYPE(cp_sll_3d_r_type),
POINTER :: pos
1248 IF (index == -1)
THEN
1253 cpassert(
ASSOCIATED(pos))
1255 pos%first_el =>
value
1270 COMPLEX(kind=dp),
dimension(:,:,:),
pointer,
contiguous :: value
1271 TYPE(cp_sll_3d_c_type),
POINTER :: sll
1272 INTEGER,
INTENT(in) :: index
1274 TYPE(cp_sll_3d_c_type),
POINTER :: pos
1276 IF (index == -1)
THEN
1281 cpassert(
ASSOCIATED(pos))
1283 pos%first_el =>
value
1298 REAL(kind=
dp),
dimension(:),
pointer,
contiguous ::
value
1299 TYPE(cp_sll_1d_r_type),
POINTER :: sll
1300 INTEGER,
INTENT(in) :: index
1302 TYPE(cp_sll_1d_r_type),
POINTER :: pos
1304 IF (index == -1)
THEN
1309 cpassert(
ASSOCIATED(pos))
1311 pos%first_el =>
value
1326 COMPLEX(kind=dp),
dimension(:),
pointer,
contiguous :: value
1327 TYPE(cp_sll_1d_c_type),
POINTER :: sll
1328 INTEGER,
INTENT(in) :: index
1330 TYPE(cp_sll_1d_c_type),
POINTER :: pos
1332 IF (index == -1)
THEN
1337 cpassert(
ASSOCIATED(pos))
1339 pos%first_el =>
value
1354 type(realspace_grid_type),
pointer :: value
1355 TYPE(cp_sll_rs_type),
POINTER :: sll
1356 INTEGER,
INTENT(in) :: index
1358 TYPE(cp_sll_rs_type),
POINTER :: pos
1360 IF (index == -1)
THEN
1365 cpassert(
ASSOCIATED(pos))
1367 pos%first_el =>
value
1383 TYPE(cp_sll_3d_r_type),
POINTER :: iterator
1384 REAL(kind=
dp),
dimension(:,:,:),
pointer,
contiguous,
OPTIONAL :: el_att
1387 IF (
ASSOCIATED(iterator))
THEN
1389 if (
present(el_att)) el_att =>iterator%first_el
1390 iterator => iterator%rest
1406 TYPE(cp_sll_3d_c_type),
POINTER :: iterator
1407 COMPLEX(kind=dp),
dimension(:,:,:),
pointer,
contiguous,
OPTIONAL :: el_att
1410 IF (
ASSOCIATED(iterator))
THEN
1412 if (
present(el_att)) el_att =>iterator%first_el
1413 iterator => iterator%rest
1429 TYPE(cp_sll_1d_r_type),
POINTER :: iterator
1430 REAL(kind=
dp),
dimension(:),
pointer,
contiguous,
OPTIONAL :: el_att
1433 IF (
ASSOCIATED(iterator))
THEN
1435 if (
present(el_att)) el_att =>iterator%first_el
1436 iterator => iterator%rest
1452 TYPE(cp_sll_1d_c_type),
POINTER :: iterator
1453 COMPLEX(kind=dp),
dimension(:),
pointer,
contiguous,
OPTIONAL :: el_att
1456 IF (
ASSOCIATED(iterator))
THEN
1458 if (
present(el_att)) el_att =>iterator%first_el
1459 iterator => iterator%rest
1475 TYPE(cp_sll_rs_type),
POINTER :: iterator
1476 type(realspace_grid_type),
pointer,
OPTIONAL :: el_att
1479 IF (
ASSOCIATED(iterator))
THEN
1481 if (
present(el_att)) el_att =>iterator%first_el
1482 iterator => iterator%rest
1502 TYPE(cp_sll_3d_r_type),
POINTER :: sll
1503 REAL(kind=
dp),
dimension(:,:,:),
pointer,
contiguous:: el
1505 TYPE(cp_sll_3d_r_type),
POINTER :: newslot
1525 TYPE(cp_sll_3d_c_type),
POINTER :: sll
1526 COMPLEX(kind=dp),
dimension(:,:,:),
pointer,
contiguous:: el
1528 TYPE(cp_sll_3d_c_type),
POINTER :: newslot
1548 TYPE(cp_sll_1d_r_type),
POINTER :: sll
1549 REAL(kind=
dp),
dimension(:),
pointer,
contiguous:: el
1551 TYPE(cp_sll_1d_r_type),
POINTER :: newslot
1571 TYPE(cp_sll_1d_c_type),
POINTER :: sll
1572 COMPLEX(kind=dp),
dimension(:),
pointer,
contiguous:: el
1574 TYPE(cp_sll_1d_c_type),
POINTER :: newslot
1594 TYPE(cp_sll_rs_type),
POINTER :: sll
1595 type(realspace_grid_type),
pointer:: el
1597 TYPE(cp_sll_rs_type),
POINTER :: newslot
1616 TYPE(cp_sll_3d_r_type),
POINTER :: sll
1618 TYPE(cp_sll_3d_r_type),
POINTER :: node_to_rm
1621 IF (
ASSOCIATED(sll))
THEN
1623 CALL cp_sll_3d_r_dealloc_node(node_to_rm)
1625 cpabort(
"tried to remove first el of an empty list")
1638 TYPE(cp_sll_3d_c_type),
POINTER :: sll
1640 TYPE(cp_sll_3d_c_type),
POINTER :: node_to_rm
1643 IF (
ASSOCIATED(sll))
THEN
1645 CALL cp_sll_3d_c_dealloc_node(node_to_rm)
1647 cpabort(
"tried to remove first el of an empty list")
1660 TYPE(cp_sll_1d_r_type),
POINTER :: sll
1662 TYPE(cp_sll_1d_r_type),
POINTER :: node_to_rm
1665 IF (
ASSOCIATED(sll))
THEN
1667 CALL cp_sll_1d_r_dealloc_node(node_to_rm)
1669 cpabort(
"tried to remove first el of an empty list")
1682 TYPE(cp_sll_1d_c_type),
POINTER :: sll
1684 TYPE(cp_sll_1d_c_type),
POINTER :: node_to_rm
1687 IF (
ASSOCIATED(sll))
THEN
1689 CALL cp_sll_1d_c_dealloc_node(node_to_rm)
1691 cpabort(
"tried to remove first el of an empty list")
1704 TYPE(cp_sll_rs_type),
POINTER :: sll
1706 TYPE(cp_sll_rs_type),
POINTER :: node_to_rm
1709 IF (
ASSOCIATED(sll))
THEN
1711 CALL cp_sll_rs_dealloc_node(node_to_rm)
1713 cpabort(
"tried to remove first el of an empty list")
1730 REAL(kind=
dp),
dimension(:,:,:),
pointer,
contiguous :: el
1731 INTEGER,
INTENT(in) :: index
1732 TYPE(cp_sll_3d_r_type),
POINTER :: sll
1734 TYPE(cp_sll_3d_r_type),
POINTER :: pos
1736 IF (index == 1)
THEN
1739 IF (index == -1)
THEN
1744 cpassert(
ASSOCIATED(pos))
1761 COMPLEX(kind=dp),
dimension(:,:,:),
pointer,
contiguous :: el
1762 INTEGER,
INTENT(in) :: index
1763 TYPE(cp_sll_3d_c_type),
POINTER :: sll
1765 TYPE(cp_sll_3d_c_type),
POINTER :: pos
1767 IF (index == 1)
THEN
1770 IF (index == -1)
THEN
1775 cpassert(
ASSOCIATED(pos))
1792 REAL(kind=
dp),
dimension(:),
pointer,
contiguous :: el
1793 INTEGER,
INTENT(in) :: index
1794 TYPE(cp_sll_1d_r_type),
POINTER :: sll
1796 TYPE(cp_sll_1d_r_type),
POINTER :: pos
1798 IF (index == 1)
THEN
1801 IF (index == -1)
THEN
1806 cpassert(
ASSOCIATED(pos))
1823 COMPLEX(kind=dp),
dimension(:),
pointer,
contiguous :: el
1824 INTEGER,
INTENT(in) :: index
1825 TYPE(cp_sll_1d_c_type),
POINTER :: sll
1827 TYPE(cp_sll_1d_c_type),
POINTER :: pos
1829 IF (index == 1)
THEN
1832 IF (index == -1)
THEN
1837 cpassert(
ASSOCIATED(pos))
1854 type(realspace_grid_type),
pointer :: el
1855 INTEGER,
INTENT(in) :: index
1856 TYPE(cp_sll_rs_type),
POINTER :: sll
1858 TYPE(cp_sll_rs_type),
POINTER :: pos
1860 IF (index == 1)
THEN
1863 IF (index == -1)
THEN
1868 cpassert(
ASSOCIATED(pos))
1884 TYPE(cp_sll_3d_r_type),
POINTER :: sll
1885 INTEGER,
INTENT(in)::index
1887 TYPE(cp_sll_3d_r_type),
POINTER :: pos
1889 IF (index == 1)
THEN
1892 IF (index == -1)
THEN
1897 cpassert(
ASSOCIATED(pos))
1912 TYPE(cp_sll_3d_c_type),
POINTER :: sll
1913 INTEGER,
INTENT(in)::index
1915 TYPE(cp_sll_3d_c_type),
POINTER :: pos
1917 IF (index == 1)
THEN
1920 IF (index == -1)
THEN
1925 cpassert(
ASSOCIATED(pos))
1940 TYPE(cp_sll_1d_r_type),
POINTER :: sll
1941 INTEGER,
INTENT(in)::index
1943 TYPE(cp_sll_1d_r_type),
POINTER :: pos
1945 IF (index == 1)
THEN
1948 IF (index == -1)
THEN
1953 cpassert(
ASSOCIATED(pos))
1968 TYPE(cp_sll_1d_c_type),
POINTER :: sll
1969 INTEGER,
INTENT(in)::index
1971 TYPE(cp_sll_1d_c_type),
POINTER :: pos
1973 IF (index == 1)
THEN
1976 IF (index == -1)
THEN
1981 cpassert(
ASSOCIATED(pos))
1996 TYPE(cp_sll_rs_type),
POINTER :: sll
1997 INTEGER,
INTENT(in)::index
1999 TYPE(cp_sll_rs_type),
POINTER :: pos
2001 IF (index == 1)
THEN
2004 IF (index == -1)
THEN
2009 cpassert(
ASSOCIATED(pos))
2024 TYPE(cp_sll_3d_r_type),
POINTER :: sll
2026 TYPE(cp_sll_3d_r_type),
POINTER :: next_node, actual_node
2030 IF (.NOT.
ASSOCIATED(actual_node))
EXIT
2031 next_node => actual_node%rest
2032 CALL cp_sll_3d_r_dealloc_node(actual_node)
2033 actual_node => next_node
2047 TYPE(cp_sll_3d_c_type),
POINTER :: sll
2049 TYPE(cp_sll_3d_c_type),
POINTER :: next_node, actual_node
2053 IF (.NOT.
ASSOCIATED(actual_node))
EXIT
2054 next_node => actual_node%rest
2055 CALL cp_sll_3d_c_dealloc_node(actual_node)
2056 actual_node => next_node
2070 TYPE(cp_sll_1d_r_type),
POINTER :: sll
2072 TYPE(cp_sll_1d_r_type),
POINTER :: next_node, actual_node
2076 IF (.NOT.
ASSOCIATED(actual_node))
EXIT
2077 next_node => actual_node%rest
2078 CALL cp_sll_1d_r_dealloc_node(actual_node)
2079 actual_node => next_node
2093 TYPE(cp_sll_1d_c_type),
POINTER :: sll
2095 TYPE(cp_sll_1d_c_type),
POINTER :: next_node, actual_node
2099 IF (.NOT.
ASSOCIATED(actual_node))
EXIT
2100 next_node => actual_node%rest
2101 CALL cp_sll_1d_c_dealloc_node(actual_node)
2102 actual_node => next_node
2116 TYPE(cp_sll_rs_type),
POINTER :: sll
2118 TYPE(cp_sll_rs_type),
POINTER :: next_node, actual_node
2122 IF (.NOT.
ASSOCIATED(actual_node))
EXIT
2123 next_node => actual_node%rest
2124 CALL cp_sll_rs_dealloc_node(actual_node)
2125 actual_node => next_node
2140 TYPE(cp_sll_3d_r_type),
POINTER :: sll
2141 type(cp_3d_r_cp_type),
DIMENSION(:),
POINTER :: res
2145 TYPE(cp_sll_3d_r_type),
POINTER :: iter
2151 res(i) %array=>iter%first_el
2153 cpassert(ok .OR. i == len)
2166 TYPE(cp_sll_3d_c_type),
POINTER :: sll
2167 type(cp_3d_c_cp_type),
DIMENSION(:),
POINTER :: res
2171 TYPE(cp_sll_3d_c_type),
POINTER :: iter
2177 res(i) %array=>iter%first_el
2179 cpassert(ok .OR. i == len)
2192 TYPE(cp_sll_1d_r_type),
POINTER :: sll
2193 type(cp_1d_r_cp_type),
DIMENSION(:),
POINTER :: res
2197 TYPE(cp_sll_1d_r_type),
POINTER :: iter
2203 res(i) %array=>iter%first_el
2205 cpassert(ok .OR. i == len)
2218 TYPE(cp_sll_1d_c_type),
POINTER :: sll
2219 type(cp_1d_c_cp_type),
DIMENSION(:),
POINTER :: res
2223 TYPE(cp_sll_1d_c_type),
POINTER :: iter
2229 res(i) %array=>iter%first_el
2231 cpassert(ok .OR. i == len)
2244 TYPE(cp_sll_rs_type),
POINTER :: sll
2245 type(realspace_grid_p_type),
DIMENSION(:),
POINTER :: res
2249 TYPE(cp_sll_rs_type),
POINTER :: iter
2255 res(i) %rs_grid=>iter%first_el
2257 cpassert(ok .OR. i == len)
various utilities that regard array of different kinds: output, allocation,... maybe it is not a good...
subroutine, public cp_sll_3d_c_rm_el_at(sll, index)
removes the element at the given index
integer function, public cp_sll_1d_r_get_length(sll)
returns the length of the list
real(kind=dp) function, dimension(:), pointer, contiguous, public cp_sll_1d_r_get_el_at(sll, index)
returns the element at the given index
subroutine, public cp_sll_1d_r_insert_el_at(sll, el, index)
inserts the element at the given index
subroutine, public cp_sll_1d_c_dealloc(sll)
deallocates the singly linked list starting at sll. Does not work if loops are present!
integer function, public cp_sll_3d_r_get_length(sll)
returns the length of the list
integer function, public cp_sll_3d_c_get_length(sll)
returns the length of the list
subroutine, public cp_sll_rs_insert_el(sll, el)
insert an element at the beginning of the list
subroutine, public cp_sll_3d_r_insert_el_at(sll, el, index)
inserts the element at the given index
subroutine, public cp_sll_3d_r_set_el_at(sll, index, value)
sets the element at the given index
subroutine, public cp_sll_1d_r_rm_first_el(sll)
remove the first element of the linked list
type(cp_3d_r_cp_type) function, dimension(:), pointer, public cp_sll_3d_r_to_array(sll)
returns a newly allocated array with the same contents as the linked list
subroutine, public cp_sll_1d_r_dealloc(sll)
deallocates the singly linked list starting at sll. Does not work if loops are present!
subroutine, public cp_sll_1d_c_insert_el(sll, el)
insert an element at the beginning of the list
subroutine, public cp_sll_rs_rm_all_el(sll)
removes all the elements from the list
subroutine, public cp_sll_3d_c_set_el_at(sll, index, value)
sets the element at the given index
subroutine, public cp_sll_3d_r_rm_all_el(sll)
removes all the elements from the list
subroutine, public cp_sll_1d_c_set_el_at(sll, index, value)
sets the element at the given index
subroutine, public cp_sll_3d_c_create(sll, first_el, rest)
allocates and initializes a single linked list
subroutine, public cp_sll_3d_c_rm_first_el(sll)
remove the first element of the linked list
type(cp_1d_r_cp_type) function, dimension(:), pointer, public cp_sll_1d_r_to_array(sll)
returns a newly allocated array with the same contents as the linked list
type(cp_sll_1d_r_type) function, pointer, public cp_sll_1d_r_get_rest(sll, iter)
returns the rest of the list
real(kind=dp) function, dimension(:), pointer, contiguous, public cp_sll_1d_r_get_first_el(sll)
returns the first element stored in the list
subroutine, public cp_sll_1d_c_rm_all_el(sll)
removes all the elements from the list
subroutine, public cp_sll_rs_dealloc(sll)
deallocates the singly linked list starting at sll. Does not work if loops are present!
subroutine, public cp_sll_3d_c_insert_el_at(sll, el, index)
inserts the element at the given index
logical function, public cp_sll_3d_c_next(iterator, el_att)
returns true if the actual element is valid (i.e. iterator ont at end) moves the iterator to the next...
integer function, public cp_sll_rs_get_length(sll)
returns the length of the list
type(realspace_grid_type) function, pointer, public cp_sll_rs_get_first_el(sll)
returns the first element stored in the list
subroutine, public cp_sll_1d_r_rm_el_at(sll, index)
removes the element at the given index
subroutine, public cp_sll_1d_c_rm_el_at(sll, index)
removes the element at the given index
real(kind=dp) function, dimension(:,:,:), pointer, contiguous, public cp_sll_3d_r_get_el_at(sll, index)
returns the element at the given index
subroutine, public cp_sll_rs_rm_first_el(sll)
remove the first element of the linked list
complex(kind=dp) function, dimension(:,:,:), pointer, contiguous, public cp_sll_3d_c_get_el_at(sll, index)
returns the element at the given index
logical function, public cp_sll_rs_next(iterator, el_att)
returns true if the actual element is valid (i.e. iterator ont at end) moves the iterator to the next...
logical function, public cp_sll_1d_r_next(iterator, el_att)
returns true if the actual element is valid (i.e. iterator ont at end) moves the iterator to the next...
subroutine, public cp_sll_3d_c_rm_all_el(sll)
removes all the elements from the list
complex(kind=dp) function, dimension(:), pointer, contiguous, public cp_sll_1d_c_get_first_el(sll)
returns the first element stored in the list
subroutine, public cp_sll_1d_r_set_el_at(sll, index, value)
sets the element at the given index
complex(kind=dp) function, dimension(:), pointer, contiguous, public cp_sll_1d_c_get_el_at(sll, index)
returns the element at the given index
subroutine, public cp_sll_3d_r_rm_el_at(sll, index)
removes the element at the given index
subroutine, public cp_sll_3d_r_insert_el(sll, el)
insert an element at the beginning of the list
subroutine, public cp_sll_1d_c_create(sll, first_el, rest)
allocates and initializes a single linked list
subroutine, public cp_sll_rs_rm_el_at(sll, index)
removes the element at the given index
subroutine, public cp_sll_1d_c_rm_first_el(sll)
remove the first element of the linked list
subroutine, public cp_sll_3d_c_dealloc(sll)
deallocates the singly linked list starting at sll. Does not work if loops are present!
logical function, public cp_sll_3d_r_next(iterator, el_att)
returns true if the actual element is valid (i.e. iterator ont at end) moves the iterator to the next...
subroutine, public cp_sll_rs_insert_el_at(sll, el, index)
inserts the element at the given index
subroutine, public cp_sll_rs_create(sll, first_el, rest)
allocates and initializes a single linked list
integer function, public cp_sll_1d_c_get_length(sll)
returns the length of the list
complex(kind=dp) function, dimension(:,:,:), pointer, contiguous, public cp_sll_3d_c_get_first_el(sll)
returns the first element stored in the list
type(cp_sll_1d_c_type) function, pointer, public cp_sll_1d_c_get_rest(sll, iter)
returns the rest of the list
type(realspace_grid_p_type) function, dimension(:), pointer, public cp_sll_rs_to_array(sll)
returns a newly allocated array with the same contents as the linked list
type(cp_3d_c_cp_type) function, dimension(:), pointer, public cp_sll_3d_c_to_array(sll)
returns a newly allocated array with the same contents as the linked list
real(kind=dp) function, dimension(:,:,:), pointer, contiguous, public cp_sll_3d_r_get_first_el(sll)
returns the first element stored in the list
type(cp_1d_c_cp_type) function, dimension(:), pointer, public cp_sll_1d_c_to_array(sll)
returns a newly allocated array with the same contents as the linked list
type(cp_sll_3d_c_type) function, pointer, public cp_sll_3d_c_get_rest(sll, iter)
returns the rest of the list
subroutine, public cp_sll_1d_r_insert_el(sll, el)
insert an element at the beginning of the list
subroutine, public cp_sll_3d_c_insert_el(sll, el)
insert an element at the beginning of the list
subroutine, public cp_sll_rs_set_el_at(sll, index, value)
sets the element at the given index
subroutine, public cp_sll_1d_c_insert_el_at(sll, el, index)
inserts the element at the given index
subroutine, public cp_sll_1d_r_rm_all_el(sll)
removes all the elements from the list
subroutine, public cp_sll_3d_r_rm_first_el(sll)
remove the first element of the linked list
subroutine, public cp_sll_1d_r_create(sll, first_el, rest)
allocates and initializes a single linked list
type(cp_sll_3d_r_type) function, pointer, public cp_sll_3d_r_get_rest(sll, iter)
returns the rest of the list
subroutine, public cp_sll_3d_r_dealloc(sll)
deallocates the singly linked list starting at sll. Does not work if loops are present!
type(cp_sll_rs_type) function, pointer, public cp_sll_rs_get_rest(sll, iter)
returns the rest of the list
type(realspace_grid_type) function, pointer, public cp_sll_rs_get_el_at(sll, index)
returns the element at the given index
logical function, public cp_sll_1d_c_next(iterator, el_att)
returns true if the actual element is valid (i.e. iterator ont at end) moves the iterator to the next...
subroutine, public cp_sll_3d_r_create(sll, first_el, rest)
allocates and initializes a single linked list
Defines the basic variable types.
integer, parameter, public dp