19 #include "../base/base_uses.f90"
27 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
30 PUBLIC :: molecule_list_type, molecule_list_p_type, &
46 TYPE molecule_list_type
47 INTEGER :: ref_count = 0, n_els = 0
48 LOGICAL :: owns_els = .false.
49 TYPE(molecule_type),
DIMENSION(:),
POINTER :: els => null()
50 END TYPE molecule_list_type
59 TYPE molecule_list_p_type
60 TYPE(molecule_list_type),
POINTER :: list => null()
61 END TYPE molecule_list_p_type
80 TYPE(molecule_list_type),
POINTER,
OPTIONAL ::
list
81 TYPE(molecule_type),
DIMENSION(:),
POINTER,
OPTIONAL :: els_ptr
82 LOGICAL,
INTENT(in),
OPTIONAL :: owns_els
83 INTEGER,
INTENT(in),
OPTIONAL :: n_els
85 cpassert(
PRESENT(els_ptr) .OR.
PRESENT(n_els))
89 list%owns_els = .true.
91 IF (
PRESENT(owns_els))
list%owns_els = owns_els
93 IF (
PRESENT(els_ptr))
THEN
95 IF (
ASSOCIATED(els_ptr))
THEN
96 list%n_els =
SIZE(els_ptr)
99 IF (
PRESENT(n_els))
list%n_els = n_els
100 IF (.NOT.
ASSOCIATED(
list%els))
THEN
102 cpassert(
list%owns_els)
114 TYPE(molecule_list_type),
POINTER ::
list
116 cpassert(
ASSOCIATED(
list))
117 cpassert(
list%ref_count > 0)
129 TYPE(molecule_list_type),
POINTER ::
list
131 IF (
ASSOCIATED(
list))
THEN
132 cpassert(
list%ref_count > 0)
134 IF (
list%ref_count == 0)
THEN
135 IF (
list%owns_els)
THEN
136 IF (
ASSOCIATED(
list%els))
THEN
An array-based list which grows on demand. When the internal array is full, a new array of twice the ...
represent a simple array based list of the given type
subroutine, public molecule_list_retain(list)
retains a list (see doc/ReferenceCounting.html)
subroutine, public molecule_list_create(list, els_ptr, owns_els, n_els)
creates a list
subroutine, public molecule_list_release(list)
releases a list (see doc/ReferenceCounting.html)
Define the data structure for the molecule information.
subroutine, public deallocate_molecule_set(molecule_set)
Deallocate a molecule set.