![]() |
Lethe Open-Source Library version 1.2.0
Developer Guide
|
#include <distributions.h>
Public Member Functions | |
| CustomDistribution (const std::vector< double > &d_list, const std::vector< double > &d_probabilities, const unsigned int &prn_seed, const double min_cutoff, const double max_cutoff, const Parameters::Lagrangian::DistributionWeightingType &distribution_weighting_type, const Parameters::Lagrangian::ProbabilityFunctionType &function_type_in, const bool interpolate) | |
| virtual std::vector< double > | particle_size_sampling (const unsigned int &number_of_particles) override |
| double | find_min_diameter () override |
| double | find_max_diameter () override |
| void | print_psd_declaration_string (const unsigned int particle_type, const ConditionalOStream &pcout) override |
| Public Member Functions inherited from Distribution | |
| virtual | ~Distribution ()=default |
Private Attributes | |
| const std::vector< double > | diameter_values |
| std::vector< double > | number_based_cdf |
| const bool | interpolate_diameter_values |
| std::mt19937 | gen |
| const Parameters::Lagrangian::ProbabilityFunctionType | function_type |
| std::vector< double > | fv |
| double | total_integral |
Additional Inherited Members | |
| Protected Member Functions inherited from Distribution | |
| Distribution (const Parameters::Lagrangian::DistributionWeightingType &distribution_weighting_type) | |
| Protected Attributes inherited from Distribution | |
| const Parameters::Lagrangian::DistributionWeightingType | weighting_type |
| double | dia_min_cutoff |
| double | dia_max_cutoff |
Definition at line 288 of file distributions.h.
| CustomDistribution::CustomDistribution | ( | const std::vector< double > & | d_list, |
| const std::vector< double > & | d_probabilities, | ||
| const unsigned int & | prn_seed, | ||
| const double | min_cutoff, | ||
| const double | max_cutoff, | ||
| const Parameters::Lagrangian::DistributionWeightingType & | distribution_weighting_type, | ||
| const Parameters::Lagrangian::ProbabilityFunctionType & | function_type_in, | ||
| const bool | interpolate ) |
The constructor stores the parameters necessary to define the histogram distribution.
| [in] | d_list | Vector of diameter values. |
| [in] | d_probabilities | Vector of probability values based on the volume fraction with respect to each diameter value. |
| [in] | prn_seed | Pseudo-random number seed for the diameter generation. |
| [in] | min_cutoff | Minimum cutoff diameter. |
| [in] | max_cutoff | Maximum cutoff diameter. |
| [in] | distribution_weighting_type | Weighting type of the distribution. |
| [in] | function_type_in | Defines whether the input probability values correspond to the PDF or the CDF. |
| [in] | interpolate | Indicates whether the diameter sampled values are linearly interpolated between input diameter and probability values. |
Definition at line 388 of file distributions.cc.
References Parameters::Lagrangian::CDF, Distribution::dia_max_cutoff, Distribution::dia_min_cutoff, diameter_values, Distribution::Distribution(), function_type, fv, gen, interpolate_diameter_values, Parameters::Lagrangian::number_based, number_based_cdf, Parameters::Lagrangian::PDF, total_integral, Parameters::Lagrangian::volume_based, and Distribution::weighting_type.
|
overridevirtual |
Find the maximum diameter of the custom distribution.
Implements Distribution.
Definition at line 870 of file distributions.cc.
References Distribution::dia_max_cutoff.
|
overridevirtual |
Find the minimum diameter of the custom distribution.
Implements Distribution.
Definition at line 864 of file distributions.cc.
References Distribution::dia_min_cutoff.
|
overridevirtual |
Carries out the size sampling of each particle inserted at an insertion time step for the histogram distribution.
| [in] | number_of_particles | Number of particles inserted at a given insertion time step. |
Implements Distribution.
Definition at line 702 of file distributions.cc.
References Distribution::dia_max_cutoff, Distribution::dia_min_cutoff, diameter_values, function_type, fv, gen, interpolate_diameter_values, number_based_cdf, Parameters::Lagrangian::PDF, total_integral, Parameters::Lagrangian::volume_based, and Distribution::weighting_type.
|
overridevirtual |
Print the declaration string relative to the particle size distribution used.
| particle_type | Particle type of the distribution |
| pcout | Parallel conditional output stream used to print the information |
Implements Distribution.
Definition at line 876 of file distributions.cc.
|
private |
Vector containing all the diameter values.
Definition at line 360 of file distributions.h.
|
private |
Defines if the custom distribution is a probability density function (PDF) or a cumulative density function (CDF).
Definition at line 384 of file distributions.h.
|
private |
Definition at line 389 of file distributions.h.
|
private |
Random number generator for the diameter selection.
Definition at line 378 of file distributions.h.
|
private |
Indicates whether the diameter values are interpolated between the input values during sampling.
Definition at line 373 of file distributions.h.
|
private |
Vector containing cumulative probabilities associated with the diameter_values vector. The stored values are based on the number-based CDF.
Definition at line 367 of file distributions.h.
|
private |
Definition at line 395 of file distributions.h.