PartMC  2.6.1
Public Attributes | List of all members
pmc_aero_particle_array::aero_particle_array_t Type Reference

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

Public Attributes

integer n_part
 Number of particles. More...
 
type(aero_particle_t), dimension(:), allocatable particle
 Particle array. More...
 

Detailed Description

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

To give a reasonable tradeoff between frequent re-allocs and memory usage, the length of an aero_particle_array is generally a bit longer than the number of particles stored in it. When the array is full then a larger array is allocated with new extra space. As a balance between memory usage and frequency of re-allocs the length of the array is currently doubled when necessary and halved when possible.

The true allocated length of the aero_particle_array can be obtained by size(aero_particle_array%particle), while the number of used particle slots in it is given by aero_particle_array%n_part. It must be that aero_particle_array%n_part is less than or equal to size(aero_particle_array%particle). In user code, the aero_particle_array_n_part() getter function should be used.q

For internal usage, if particle is not allocated then n_part is invalid. If particle is allocated then n_part must be valid.

Definition at line 41 of file aero_particle_array.F90.

Member Data Documentation

◆ n_part

integer pmc_aero_particle_array::aero_particle_array_t::n_part

Number of particles.

Definition at line 43 of file aero_particle_array.F90.

◆ particle

type(aero_particle_t), dimension(:), allocatable pmc_aero_particle_array::aero_particle_array_t::particle

Particle array.

Definition at line 45 of file aero_particle_array.F90.


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