PartMC
2.2.1
|
The aero_sorted_t structure and assocated subroutines. More...
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. |
The aero_sorted_t structure and assocated subroutines.
Definition at line 9 of file aero_sorted.F90.
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.
[in,out] | aero_sorted | Sorted particle structure. |
[in,out] | aero_particle_array | Aerosol particles. |
[in] | aero_particle | Particle to add. |
[in] | n_group | Number of weight groups. |
[in] | allow_resort | Whether 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.
[out] | aero_sorted | Structure 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.
[out] | aero_sorted | Structure to initialize. |
[in] | n_bin | Number of bins. |
[in] | n_group | Number 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.
[in] | aero_sorted | Aerosol sorted to check. |
[in] | aero_particle_array | Aerosol particles. |
[in] | n_group | Number of weight groups. |
[in] | continue_on_error | Whether 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.
[in,out] | aero_sorted | Structure 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.
[in] | aero_sorted | Aerosol sorted. |
[in,out] | aero_particle_array | Aerosol 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.
[in,out] | aero_sorted | Aerosol sorted. |
[in] | i_part | Particle number to move. |
[in] | new_bin | New bin to move particle to. |
[in] | new_group | New 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.
[in] | aero_sorted | Aerosol sort. |
[in] | aero_particle | Particle. |
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.
[in,out] | aero_sorted | Aerosol sorted to (possibly) remake. |
[in,out] | aero_particle_array | Aerosol particles to sort. |
[in] | valid_sort | Whether the given aero_sorted is valid. |
[in] | n_group | Number of weight groups. |
[in] | bin_grid | An optional bin_grid to use for the sort. |
[in] | all_procs_same | Whether 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.
[in,out] | aero_sorted | Sorted particle structure. |
[in,out] | aero_particle_array | Aerosol particles. |
[in] | i_part | Index 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.
[in,out] | aero_sorted | Aerosol sorted. |
[in] | bin_grid | Bin grid. |
[in] | n_group | Number 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.
[in,out] | aero_sorted | Aerosol sorted. |
[in] | aero_particle_array | Aerosol 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.
[in,out] | aero_sorted | Structure 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.
[in,out] | buffer | Memory buffer. |
[in,out] | position | Current buffer position. |
[in] | val | Value 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.
[in] | val | Value 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.
[in,out] | buffer | Memory buffer. |
[in,out] | position | Current buffer position. |
[in,out] | val | Value to pack. |
Definition at line 558 of file aero_sorted.F90.
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.