PartMC  2.3.0
Data Types | Public Member Functions | Public Attributes | List of all members
pmc_aero_sorted Module Reference

The aero_sorted_t structure and assocated subroutines. More...

Data Types

type  aero_sorted_t
 Sorting of particles into bins. More...
 

Public Member Functions

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

Public Attributes

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

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,
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]allow_resortWhether to allow a resort due to the add.

Definition at line 444 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 77 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,
integer, intent(in)  n_class 
)

Allocate a strcture with the given size.

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

Definition at line 96 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,
integer, intent(in), optional  n_class,
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]n_classNumber of weight classes.
[in]continue_on_errorWhether to continue despite error.

Definition at line 541 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 121 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 215 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,
integer, intent(in)  new_class 
)

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 weight group to move particle to.
[in]new_classNew weight class to move particle to.

Definition at line 517 of file aero_sorted.F90.

integer function pmc_aero_sorted::aero_sorted_n_bin ( type(aero_sorted_t), intent(in)  aero_sorted)

Returns the number of size bins.

Parameters
[in]aero_sortedAerosol sorting to use.

Definition at line 158 of file aero_sorted.F90.

integer function pmc_aero_sorted::aero_sorted_n_class ( type(aero_sorted_t), intent(in)  aero_sorted)

Returns the number of weight classes.

Parameters
[in]aero_sortedAerosol sorting to use.

Definition at line 182 of file aero_sorted.F90.

integer function pmc_aero_sorted::aero_sorted_n_group ( type(aero_sorted_t), intent(in)  aero_sorted)

Returns the number of weight groups.

Parameters
[in]aero_sortedAerosol sorting to use.

Definition at line 170 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 428 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,
integer, intent(in), optional  n_class,
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]n_classNumber of weight classes.
[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 271 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 497 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)  n_group,
integer, intent(in)  n_class 
)

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.
[in]n_classNumber of weight classes.

Definition at line 194 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 245 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 140 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 628 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 605 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 656 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 68 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 70 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 66 of file aero_sorted.F90.


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