PartMC  2.2.1
Data Types | Public Member Functions
pmc_aero_particle_array Module Reference

The aero_particle_array_t structure and assoicated subroutines. More...

List of all members.

Data Types

type  aero_particle_array_t
 1-D arrays of particles, used by aero_state to build a ragged array. More...

Public Member Functions

subroutine aero_particle_array_allocate (aero_particle_array)
 Allocates and initializes.
subroutine aero_particle_array_allocate_size (aero_particle_array, n_part)
 Allocates and initializes to the given size.
subroutine aero_particle_array_deallocate (aero_particle_array)
 Deallocates.
subroutine aero_particle_array_copy (aero_particle_array_from, aero_particle_array_to)
 Copies aero_particle_array_from to aero_particle_array_to, both of which must already be allocated.
subroutine aero_particle_array_zero (aero_particle_array)
 Resets an aero_particle_array to contain zero particles.
subroutine aero_particle_array_realloc (aero_particle_array, new_length)
 Changes the given aero_particle_array to exactly the given new_length.
subroutine aero_particle_array_enlarge (aero_particle_array)
 Enlarges the given aero_particle_array by at least one element.
subroutine aero_particle_array_enlarge_to (aero_particle_array, n)
 Enlarges the given array so that it is at least of size n.
subroutine aero_particle_array_shrink (aero_particle_array)
 Possibly shrinks the storage of the given array, ensuring that it can still store the allocated particles.
subroutine aero_particle_array_add_particle (aero_particle_array, aero_particle)
 Adds the given particle to the end of the array.
subroutine aero_particle_array_remove_particle (aero_particle_array, index)
 Removes the particle at the given index.
integer function pmc_mpi_pack_size_apa (val)
 Determines the number of bytes required to pack the given value.
subroutine pmc_mpi_pack_aero_particle_array (buffer, position, val)
 Packs the given value into the buffer, advancing position.
subroutine pmc_mpi_unpack_aero_particle_array (buffer, position, val)
 Unpacks the given value from the buffer, advancing position.

Detailed Description

The aero_particle_array_t structure and assoicated subroutines.

Definition at line 9 of file aero_particle_array.F90.


Member Function/Subroutine Documentation

subroutine pmc_aero_particle_array::aero_particle_array_add_particle ( type(aero_particle_array_t), intent(inout)  aero_particle_array,
type(aero_particle_t), intent(in)  aero_particle 
)

Adds the given particle to the end of the array.

Parameters:
[in,out]aero_particle_arrayArray to add to.
[in]aero_particleParticle to add.

Definition at line 226 of file aero_particle_array.F90.

subroutine pmc_aero_particle_array::aero_particle_array_allocate ( type(aero_particle_array_t), intent(out)  aero_particle_array)

Allocates and initializes.

Parameters:
[out]aero_particle_arrayResult.

Definition at line 52 of file aero_particle_array.F90.

subroutine pmc_aero_particle_array::aero_particle_array_allocate_size ( type(aero_particle_array_t), intent(out)  aero_particle_array,
integer, intent(in)  n_part 
)

Allocates and initializes to the given size.

Parameters:
[out]aero_particle_arrayResult.
[in]n_partNumber of particles.

Definition at line 65 of file aero_particle_array.F90.

subroutine pmc_aero_particle_array::aero_particle_array_copy ( type(aero_particle_array_t), intent(in)  aero_particle_array_from,
type(aero_particle_array_t), intent(inout)  aero_particle_array_to 
)

Copies aero_particle_array_from to aero_particle_array_to, both of which must already be allocated.

Parameters:
[in]aero_particle_array_fromOrigin structure.
[in,out]aero_particle_array_toDestination structure.

Definition at line 103 of file aero_particle_array.F90.

subroutine pmc_aero_particle_array::aero_particle_array_deallocate ( type(aero_particle_array_t), intent(inout)  aero_particle_array)

Deallocates.

Parameters:
[in,out]aero_particle_arrayStructure to deallocate.

Definition at line 85 of file aero_particle_array.F90.

subroutine pmc_aero_particle_array::aero_particle_array_enlarge ( type(aero_particle_array_t), intent(inout)  aero_particle_array)

Enlarges the given aero_particle_array by at least one element.

Currently this doubles the length.

Parameters:
[in,out]aero_particle_arrayArray to enlarge.

Definition at line 172 of file aero_particle_array.F90.

subroutine pmc_aero_particle_array::aero_particle_array_enlarge_to ( type(aero_particle_array_t), intent(inout)  aero_particle_array,
integer, intent(in)  n 
)

Enlarges the given array so that it is at least of size n.

Parameters:
[in,out]aero_particle_arrayArray to enlarge.
[in]nMinimum new size of array.

Definition at line 188 of file aero_particle_array.F90.

subroutine pmc_aero_particle_array::aero_particle_array_realloc ( type(aero_particle_array_t), intent(inout)  aero_particle_array,
integer, intent(in)  new_length 
)

Changes the given aero_particle_array to exactly the given new_length.

This function should not be called directly, but rather use aero_particle_array_enlarge(), aero_particle_array_enlarge_to() or aero_particle_array_shrink().

Parameters:
[in,out]aero_particle_arrayArray to reallocate (must already be allocated on entry).
[in]new_lengthNew length of the array.

Definition at line 145 of file aero_particle_array.F90.

subroutine pmc_aero_particle_array::aero_particle_array_remove_particle ( type(aero_particle_array_t), intent(inout)  aero_particle_array,
integer, intent(in)  index 
)

Removes the particle at the given index.

Parameters:
[in,out]aero_particle_arrayArray to remove from.
[in]indexIndex of particle to remove.

Definition at line 248 of file aero_particle_array.F90.

subroutine pmc_aero_particle_array::aero_particle_array_shrink ( type(aero_particle_array_t), intent(inout)  aero_particle_array)

Possibly shrinks the storage of the given array, ensuring that it can still store the allocated particles.

Parameters:
[in,out]aero_particle_arrayArray to shrink.

Definition at line 205 of file aero_particle_array.F90.

subroutine pmc_aero_particle_array::aero_particle_array_zero ( type(aero_particle_array_t), intent(inout)  aero_particle_array)

Resets an aero_particle_array to contain zero particles.

Parameters:
[in,out]aero_particle_arrayStructure to reset.

Definition at line 126 of file aero_particle_array.F90.

subroutine pmc_aero_particle_array::pmc_mpi_pack_aero_particle_array ( character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  position,
type(aero_particle_array_t), intent(in)  val 
)

Packs the given value into the buffer, advancing position.

Parameters:
[in,out]bufferMemory buffer.
[in,out]positionCurrent buffer position.
[in]valValue to pack.

Definition at line 293 of file aero_particle_array.F90.

integer function pmc_aero_particle_array::pmc_mpi_pack_size_apa ( type(aero_particle_array_t), intent(in)  val)

Determines the number of bytes required to pack the given value.

Parameters:
[in]valValue to pack.

Definition at line 273 of file aero_particle_array.F90.

subroutine pmc_aero_particle_array::pmc_mpi_unpack_aero_particle_array ( character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  position,
type(aero_particle_array_t), intent(inout)  val 
)

Unpacks the given value from the buffer, advancing position.

Parameters:
[in,out]bufferMemory buffer.
[in,out]positionCurrent buffer position.
[in,out]valValue to pack.

Definition at line 319 of file aero_particle_array.F90.


The documentation for this module was generated from the following file: