pmc_aero_state::aero_state_t Struct Reference

The current collection of aerosol particles. More...

List of all members.

Public Attributes

type(aero_particle_array_t),
dimension(:), pointer 
bin
 Bin arrays.
real *8 comp_vol
 Computational volume (m^3).
integer n_part
 Total number of particles.
type(aero_info_array_taero_info_array
 Information on removed particles.


Detailed Description

The current collection of aerosol particles.

The particles in aero_state_t are stored sorted per-bin, to improve efficiency of access and sampling. If a particle has total volume v then calling i_bin = bin_grid_particle_in_bin(bin_grid, v) finds the bin number i_bin where that particle should go. That particle is then stored as aero_state%bin(i_bin)%particle(i_part), where i_part is the index within the bin. aero_state%v(i_bin)%p(i_part)%vol(i_spec) is thus the volume of the i_spec-th species in the i_part-th particle in the i_bin-th bin.

Typically most of the bins have only a few particles, while a small number of bins have many particles. To avoid having too much storage allocated for the bins with only a few particles, we do dynamic allocation and deallocation of the storage per-bin. With Fortran 90 we can't have arrays of arrays, so we have to use an array of pointers, and then allocate each pointer.

To avoid doing allocation and deallocation every time we add or remove a particle to a bin, we always double or halve the bin storage as necessary. The actual number of particles stored in a bin will generally be less than the actual memory allocated for that bin, so we store the current number of particles in a bin in aero_state%bin(i_bin)%n_part. The allocated size of bin storage in aero_state%bin(i_bin)%particle is not stored explicitly, but can be obtained with the Fortran 90 SIZE() intrinsic function.

Every time we remove particles we keep track of the particle ID and the action performed in the aero_info_array_t structure. This is typically cleared each time we output data to disk.


Member Data Documentation

Bin arrays.

Computational volume (m^3).

Total number of particles.

Information on removed particles.


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

Generated on Mon Apr 26 17:13:31 2010 for PartMC by  doxygen 1.5.6