PartMC  2.2.0
Data Types | Public Member Functions | Public Attributes
pmc_aero_sorted Module Reference

The aero_sorted_t structure and assocated subroutines. More...

List of all members.

Data Types

type  aero_sorted_t
 Bin index for particles sorted into bins. More...

Public Member Functions

subroutine aero_sorted_allocate (aero_sorted)
 Allocate an empty structure.
subroutine aero_sorted_allocate_size (aero_sorted, n_bin, n_group)
 Allocate a strcture with the given size.
subroutine aero_sorted_deallocate (aero_sorted)
 Deallocates a previously allocated structure.
subroutine aero_sorted_zero (aero_sorted)
 Resets an aero_sorted to have zero particles per bin.
subroutine aero_sorted_set_bin_grid (aero_sorted, bin_grid, n_group)
 Do a sorting of a set of aerosol particles.
subroutine aero_sorted_discard_outside_grid (aero_sorted, aero_particle_array)
 Discard particles that don't fit the bin grid.
subroutine aero_sorted_sort_particles (aero_sorted, aero_particle_array)
 Sort the particles.
subroutine aero_sorted_remake_if_needed (aero_sorted, aero_particle_array, valid_sort, n_group, bin_grid, all_procs_same)
 Remake a sorting if particles are getting too close to the edges.
integer function aero_sorted_particle_in_bin (aero_sorted, aero_particle)
 Find the bin number that contains a given particle.
subroutine aero_sorted_add_particle (aero_sorted, aero_particle_array, aero_particle, n_group, allow_resort)
 Add a new particle to both an aero_sorted and the corresponding aero_particle_array.
subroutine aero_sorted_remove_particle (aero_sorted, aero_particle_array, i_part)
 Remove a particle from both an aero_sorted and the corresponding aero_particle_array.
subroutine aero_sorted_move_particle (aero_sorted, i_part, new_bin, new_group)
 Move a particle to a different bin and group.
subroutine aero_sorted_check (aero_sorted, aero_particle_array, n_group, continue_on_error)
 Check sorting.
integer function pmc_mpi_pack_size_aero_sorted (val)
 Determines the number of bytes required to pack the given value.
subroutine pmc_mpi_pack_aero_sorted (buffer, position, val)
 Packs the given value into the buffer, advancing position.
subroutine pmc_mpi_unpack_aero_sorted (buffer, position, val)
 Unpacks the given value from the buffer, advancing position.

Public Attributes

real(kind=dp), parameter AERO_SORTED_BINS_PER_DECADE = 10d0
 How many size bins to use per decade of particle radius.
real(kind=dp), parameter AERO_SORTED_BIN_OVER_FACTOR = 10d0
 Factor to extend size grid beyond largest/smallest particles.
real(kind=dp), parameter AERO_SORTED_BIN_SAFETY_FACTOR = 3d0
 Size grid extension factor when we should regenerate grid.

Detailed Description

The aero_sorted_t structure and assocated subroutines.

Definition at line 9 of file aero_sorted.F90.


Member Function/Subroutine Documentation

subroutine pmc_aero_sorted::aero_sorted_add_particle ( type(aero_sorted_t), intent(inout)  aero_sorted,
type(aero_particle_array_t), intent(inout)  aero_particle_array,
type(aero_particle_t), intent(in)  aero_particle,
integer, intent(in)  n_group,
logical, intent(in), optional  allow_resort 
)

Add a new particle to both an aero_sorted and the corresponding aero_particle_array.

Parameters:
[in,out]aero_sortedSorted particle structure.
[in,out]aero_particle_arrayAerosol particles.
[in]aero_particleParticle to add.
[in]n_groupNumber of weight groups.
[in]allow_resortWhether to allow a resort due to the add.

Definition at line 366 of file aero_sorted.F90.

subroutine pmc_aero_sorted::aero_sorted_allocate ( type(aero_sorted_t), intent(out)  aero_sorted)

Allocate an empty structure.

Parameters:
[out]aero_sortedStructure to initialize.

Definition at line 59 of file aero_sorted.F90.

subroutine pmc_aero_sorted::aero_sorted_allocate_size ( type(aero_sorted_t), intent(out)  aero_sorted,
integer, intent(in)  n_bin,
integer, intent(in)  n_group 
)

Allocate a strcture with the given size.

Parameters:
[out]aero_sortedStructure to initialize.
[in]n_binNumber of bins.
[in]n_groupNumber of weight groups.

Definition at line 76 of file aero_sorted.F90.

subroutine pmc_aero_sorted::aero_sorted_check ( type(aero_sorted_t), intent(in)  aero_sorted,
type(aero_particle_array_t), intent(in)  aero_particle_array,
integer, intent(in), optional  n_group,
logical, intent(in)  continue_on_error 
)

Check sorting.

Parameters:
[in]aero_sortedAerosol sorted to check.
[in]aero_particle_arrayAerosol particles.
[in]n_groupNumber of weight groups.
[in]continue_on_errorWhether to continue despite error.

Definition at line 456 of file aero_sorted.F90.

subroutine pmc_aero_sorted::aero_sorted_deallocate ( type(aero_sorted_t), intent(inout)  aero_sorted)

Deallocates a previously allocated structure.

Parameters:
[in,out]aero_sortedStructure to deallocate.

Definition at line 97 of file aero_sorted.F90.

subroutine pmc_aero_sorted::aero_sorted_discard_outside_grid ( type(aero_sorted_t), intent(in)  aero_sorted,
type(aero_particle_array_t), intent(inout)  aero_particle_array 
)

Discard particles that don't fit the bin grid.

Parameters:
[in]aero_sortedAerosol sorted.
[in,out]aero_particle_arrayAerosol particles to discard from.

Definition at line 155 of file aero_sorted.F90.

subroutine pmc_aero_sorted::aero_sorted_move_particle ( type(aero_sorted_t), intent(inout)  aero_sorted,
integer, intent(in)  i_part,
integer, intent(in)  new_bin,
integer, intent(in)  new_group 
)

Move a particle to a different bin and group.

Parameters:
[in,out]aero_sortedAerosol sorted.
[in]i_partParticle number to move.
[in]new_binNew bin to move particle to.
[in]new_groupNew group to move particle to.

Definition at line 437 of file aero_sorted.F90.

integer function pmc_aero_sorted::aero_sorted_particle_in_bin ( type(aero_sorted_t), intent(in)  aero_sorted,
type(aero_particle_t), intent(in)  aero_particle 
)

Find the bin number that contains a given particle.

Parameters:
[in]aero_sortedAerosol sort.
[in]aero_particleParticle.

Definition at line 349 of file aero_sorted.F90.

subroutine pmc_aero_sorted::aero_sorted_remake_if_needed ( type(aero_sorted_t), intent(inout)  aero_sorted,
type(aero_particle_array_t), intent(inout)  aero_particle_array,
logical, intent(in)  valid_sort,
integer, intent(in), optional  n_group,
type(bin_grid_t), intent(in), optional  bin_grid,
logical, intent(in), optional  all_procs_same 
)

Remake a sorting if particles are getting too close to the edges.

Parameters:
[in,out]aero_sortedAerosol sorted to (possibly) remake.
[in,out]aero_particle_arrayAerosol particles to sort.
[in]valid_sortWhether the given aero_sorted is valid.
[in]n_groupNumber of weight groups.
[in]bin_gridAn optional bin_grid to use for the sort.
[in]all_procs_sameWhether all processors should use the same bin grid.

Definition at line 211 of file aero_sorted.F90.

subroutine pmc_aero_sorted::aero_sorted_remove_particle ( type(aero_sorted_t), intent(inout)  aero_sorted,
type(aero_particle_array_t), intent(inout)  aero_particle_array,
integer, intent(in)  i_part 
)

Remove a particle from both an aero_sorted and the corresponding aero_particle_array.

Parameters:
[in,out]aero_sortedSorted particle structure.
[in,out]aero_particle_arrayAerosol particles.
[in]i_partIndex of particle to remove.

Definition at line 417 of file aero_sorted.F90.

subroutine pmc_aero_sorted::aero_sorted_set_bin_grid ( type(aero_sorted_t), intent(inout)  aero_sorted,
type(bin_grid_t), intent(in)  bin_grid,
integer, intent(in), optional  n_group 
)

Do a sorting of a set of aerosol particles.

Parameters:
[in,out]aero_sortedAerosol sorted.
[in]bin_gridBin grid.
[in]n_groupNumber of weight groups.

Definition at line 130 of file aero_sorted.F90.

subroutine pmc_aero_sorted::aero_sorted_sort_particles ( type(aero_sorted_t), intent(inout)  aero_sorted,
type(aero_particle_array_t), intent(in)  aero_particle_array 
)

Sort the particles.

Parameters:
[in,out]aero_sortedAerosol sorted.
[in]aero_particle_arrayAerosol particles to sort.

Definition at line 185 of file aero_sorted.F90.

subroutine pmc_aero_sorted::aero_sorted_zero ( type(aero_sorted_t), intent(inout)  aero_sorted)

Resets an aero_sorted to have zero particles per bin.

Parameters:
[in,out]aero_sortedStructure to zero.

Definition at line 114 of file aero_sorted.F90.

subroutine pmc_aero_sorted::pmc_mpi_pack_aero_sorted ( character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  position,
type(aero_sorted_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 531 of file aero_sorted.F90.

integer function pmc_aero_sorted::pmc_mpi_pack_size_aero_sorted ( type(aero_sorted_t), intent(in)  val)

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

Parameters:
[in]valValue to pack.

Definition at line 509 of file aero_sorted.F90.

subroutine pmc_aero_sorted::pmc_mpi_unpack_aero_sorted ( character, dimension(:), intent(inout)  buffer,
integer, intent(inout)  position,
type(aero_sorted_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 558 of file aero_sorted.F90.


Member Data Documentation

real(kind=dp), parameter pmc_aero_sorted::AERO_SORTED_BIN_OVER_FACTOR = 10d0

Factor to extend size grid beyond largest/smallest particles.

Definition at line 50 of file aero_sorted.F90.

real(kind=dp), parameter pmc_aero_sorted::AERO_SORTED_BIN_SAFETY_FACTOR = 3d0

Size grid extension factor when we should regenerate grid.

Definition at line 52 of file aero_sorted.F90.

real(kind=dp), parameter pmc_aero_sorted::AERO_SORTED_BINS_PER_DECADE = 10d0

How many size bins to use per decade of particle radius.

Definition at line 48 of file aero_sorted.F90.


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