PartMC  2.6.1
Data Types | Functions/Subroutines
pmc_aero_particle_array Module Reference

The aero_particle_array_t structure and assoicated subroutines. More...

Data Types

type  aero_particle_array_t
 1-D array of particles, used by aero_state to store the particles. More...
 

Functions/Subroutines

elemental integer function aero_particle_array_n_part (aero_particle_array)
 Return the current number of particles. More...
 
subroutine aero_particle_array_zero (aero_particle_array)
 Resets an aero_particle_array to contain zero particles. More...
 
subroutine aero_particle_array_realloc (aero_particle_array, new_length)
 Changes the given aero_particle_array to exactly the given new_length. More...
 
subroutine aero_particle_array_enlarge (aero_particle_array, n)
 Possibly enlarges the given array, ensuring that it is at least of size n. More...
 
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. More...
 
subroutine aero_particle_array_add_particle (aero_particle_array, aero_particle)
 Adds the given particle to the end of the array. More...
 
subroutine aero_particle_array_remove_particle (aero_particle_array, index)
 Removes the particle at the given index. More...
 
integer function pmc_mpi_pack_size_apa (val)
 Determines the number of bytes required to pack the given value. More...
 
subroutine pmc_mpi_pack_aero_particle_array (buffer, position, val)
 Packs the given value into the buffer, advancing position. More...
 
subroutine pmc_mpi_unpack_aero_particle_array (buffer, position, val)
 Unpacks the given value from the buffer, advancing position. More...
 
subroutine aero_particle_array_check (aero_particle_array, aero_data, continue_on_error)
 Check that the particle array data is consistent. More...
 

Detailed Description

The aero_particle_array_t structure and assoicated subroutines.

Function/Subroutine Documentation

◆ aero_particle_array_add_particle()

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 158 of file aero_particle_array.F90.

◆ aero_particle_array_check()

subroutine pmc_aero_particle_array::aero_particle_array_check ( type(aero_particle_array_t), intent(in)  aero_particle_array,
type(aero_data_t), intent(in)  aero_data,
logical, intent(in)  continue_on_error 
)

Check that the particle array data is consistent.

Parameters
[in]aero_particle_arrayAerosol particle array to check.
[in]aero_dataAerosol data.
[in]continue_on_errorWhether to continue despite error.

Definition at line 279 of file aero_particle_array.F90.

◆ aero_particle_array_enlarge()

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

Possibly enlarges the given array, ensuring 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 117 of file aero_particle_array.F90.

◆ aero_particle_array_n_part()

elemental integer function pmc_aero_particle_array::aero_particle_array_n_part ( type(aero_particle_array_t), intent(in)  aero_particle_array)

Return the current number of particles.

Parameters
[in]aero_particle_arrayAerosol particle array.

Definition at line 53 of file aero_particle_array.F90.

◆ aero_particle_array_realloc()

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() or aero_particle_array_shrink().

Parameters
[in,out]aero_particle_arrayArray to reallocate.
[in]new_lengthNew length of the array.

Definition at line 88 of file aero_particle_array.F90.

◆ aero_particle_array_remove_particle()

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 178 of file aero_particle_array.F90.

◆ aero_particle_array_shrink()

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 139 of file aero_particle_array.F90.

◆ aero_particle_array_zero()

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 69 of file aero_particle_array.F90.

◆ pmc_mpi_pack_aero_particle_array()

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 224 of file aero_particle_array.F90.

◆ pmc_mpi_pack_size_apa()

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 203 of file aero_particle_array.F90.

◆ pmc_mpi_unpack_aero_particle_array()

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 251 of file aero_particle_array.F90.