55 aero_info_array%n_item = 0
56 allocate(aero_info_array%aero_info(0))
68 integer,
intent(in) :: n_item
72 aero_info_array%n_item = n_item
73 allocate(aero_info_array%aero_info(n_item))
90 do i = 1,aero_info_array%n_item
93 deallocate(aero_info_array%aero_info)
113 aero_info_array_from%n_item)
114 do i = 1,aero_info_array_from%n_item
116 aero_info_array_to%aero_info(i))
130 allocate(aero_info_array%aero_info(0))
131 aero_info_array%n_item = 0
148 integer,
intent(in) :: new_length
153 n_item = aero_info_array%n_item
154 call
assert(372938429, new_length >= n_item)
155 allocate(new_particles(new_length))
156 do i = 1,aero_info_array%n_item
161 deallocate(aero_info_array%aero_info)
162 aero_info_array%aero_info => new_particles
176 integer :: length, new_length
178 length =
size(aero_info_array%aero_info)
179 new_length = max(length * 2, length + 1)
192 integer,
intent(in) :: n
194 do while (
size(aero_info_array%aero_info) < n)
209 integer :: n_item, length, new_length
211 n_item = aero_info_array%n_item
212 length =
size(aero_info_array%aero_info)
213 new_length = length / 2
214 do while ((n_item <= new_length) .and. (length > 0))
216 length =
size(aero_info_array%aero_info)
217 new_length = length / 2
235 n = aero_info_array%n_item + 1
239 aero_info_array%n_item = aero_info_array%n_item + 1
252 integer,
intent(in) :: index
254 call
assert(213892348, index >= 1)
255 call
assert(953927392, index <= aero_info_array%n_item)
257 if (index < aero_info_array%n_item)
then
260 aero_info_array%aero_info(aero_info_array%n_item), &
261 aero_info_array%aero_info(index))
263 aero_info_array%aero_info(aero_info_array%n_item))
265 aero_info_array%n_item = aero_info_array%n_item - 1
274 aero_info_array_delta)
281 integer :: i, n, n_delta, n_new
283 n = aero_info_array%n_item
284 n_delta = aero_info_array_delta%n_item
290 aero_info_array%aero_info(n + i))
292 aero_info_array%n_item = n_new
304 integer :: i, total_size
309 total_size = total_size &
322 character,
intent(inout) :: buffer(:)
324 integer,
intent(inout) :: position
329 integer :: prev_position, i
331 prev_position = position
348 character,
intent(inout) :: buffer(:)
350 integer,
intent(inout) :: position
355 integer :: prev_position, i
358 prev_position = position
360 allocate(val%aero_info(val%n_item))
subroutine aero_info_copy(aero_info_from, aero_info_to)
Copies aero_info_from to aero_info_to, both of which must already be allocated.
subroutine pmc_mpi_unpack_aero_info_array(buffer, position, val)
Unpacks the given value from the buffer, advancing position.
integer function pmc_mpi_pack_size_integer(val)
Determines the number of bytes required to pack the given value.
subroutine aero_info_deallocate(aero_info)
Deallocates.
integer function pmc_mpi_pack_size_aero_info(val)
Determines the number of bytes required to pack the given value.
The aero_info_array_t structure and assoicated subroutines.
subroutine aero_info_array_copy(aero_info_array_from, aero_info_array_to)
Copies aero_info_array_from to aero_info_array_to, both of which must already be allocated.
subroutine aero_info_allocate(aero_info)
Allocates and initializes.
subroutine aero_info_array_allocate(aero_info_array)
Allocates the structure.
subroutine aero_info_array_deallocate(aero_info_array)
Deallocates.
subroutine aero_info_array_enlarge(aero_info_array)
Enlarges the given aero_info_array by at least one element.
subroutine aero_info_array_add_aero_info(aero_info_array, aero_info)
Adds the given aero_info to the end of the array.
subroutine aero_info_array_shrink(aero_info_array)
Possibly shrinks the storage of the given array, ensuring that it can still store the allocated parti...
subroutine pmc_mpi_pack_integer(buffer, position, val)
Packs the given value into the buffer, advancing position.
subroutine aero_info_array_enlarge_to(aero_info_array, n)
Enlarges the given array so that it is at least of size n.
subroutine aero_info_array_zero(aero_info_array)
Resets an aero_info_array to contain zero particles.
subroutine pmc_mpi_pack_aero_info_array(buffer, position, val)
Packs the given value into the buffer, advancing position.
Common utility subroutines.
1-D arrays of aero_info_t structure.
subroutine pmc_mpi_unpack_integer(buffer, position, val)
Unpacks the given value from the buffer, advancing position.
The aero_info_t structure and associated subroutines.
Wrapper functions for MPI.
subroutine aero_info_array_allocate_size(aero_info_array, n_item)
Allocates with the given size.
subroutine aero_info_array_remove_aero_info(aero_info_array, index)
Removes the aero_info at the given index.
subroutine aero_info_array_add(aero_info_array, aero_info_array_delta)
Adds aero_info_array_delta to the end of aero_info_array.
subroutine pmc_mpi_unpack_aero_info(buffer, position, val)
Unpacks the given value from the buffer, advancing position.
subroutine pmc_mpi_pack_aero_info(buffer, position, val)
Packs the given value into the buffer, advancing position.
Reading formatted text input.
integer function pmc_mpi_pack_size_aia(val)
Determines the number of bytes required to pack the given value.
subroutine assert(code, condition_ok)
Errors unless condition_ok is true.
subroutine aero_info_array_realloc(aero_info_array, new_length)
Changes the given aero_info_array to exactly the given new_length.
Information about removed particles describing the sink.