Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
LogNormalDistribution Class Reference

#include <distributions.h>

Inheritance diagram for LogNormalDistribution:
[legend]

Public Member Functions

 LogNormalDistribution (const double &d_average, const double &d_standard_deviation, const unsigned int &prn_seed, double min_cutoff, double max_cutoff, const Parameters::Lagrangian::DistributionWeightingType &distribution_weighting_type)
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 double sigma_ln
double mu_ln
std::mt19937 gen

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

Detailed Description

Definition at line 153 of file distributions.h.

Constructor & Destructor Documentation

◆ LogNormalDistribution()

LogNormalDistribution::LogNormalDistribution ( const double & d_average,
const double & d_standard_deviation,
const unsigned int & prn_seed,
double min_cutoff,
double max_cutoff,
const Parameters::Lagrangian::DistributionWeightingType & distribution_weighting_type )

The constructor stores the parameters necessary to define the normal distribution.

Parameters
[in]d_averageAverage diameters for a certain normal distribution.
[in]d_standard_deviationStandard deviation of the diameter for a certain normal distribution.
[in]prn_seedPseudo-random number seed for the diameter generation.
[in]min_cutoffMinimum cutoff diameter.
[in]max_cutoffMaximum cutoff diameter.
[in]distribution_weighting_typeWeighting type of the distribution.

Definition at line 231 of file distributions.cc.

References Distribution::dia_max_cutoff, Distribution::dia_min_cutoff, Distribution::Distribution(), gen, mu_ln, Parameters::Lagrangian::number_based, sigma_ln, and Distribution::weighting_type.

Member Function Documentation

◆ find_max_diameter()

double LogNormalDistribution::find_max_diameter ( )
overridevirtual

Find the maximum diameter of the normal distribution.

Returns
The maximum diameter of the normal distribution.

Implements Distribution.

Definition at line 317 of file distributions.cc.

References Distribution::dia_max_cutoff.

◆ find_min_diameter()

double LogNormalDistribution::find_min_diameter ( )
overridevirtual

Find the minimum diameter a normal distribution.

Returns
The minimum diameter of a normal distribution.

Implements Distribution.

Definition at line 311 of file distributions.cc.

References Distribution::dia_min_cutoff.

◆ particle_size_sampling()

std::vector< double > LogNormalDistribution::particle_size_sampling ( const unsigned int & number_of_particles)
overridevirtual

Carries out the size sampling of each particle inserted at an insertion time step for the normal distribution.

Parameters
[in]number_of_particlesNumber of particles inserted at a given insertion time step.

Implements Distribution.

Definition at line 288 of file distributions.cc.

References Distribution::dia_max_cutoff, Distribution::dia_min_cutoff, gen, mu_ln, and sigma_ln.

◆ print_psd_declaration_string()

void LogNormalDistribution::print_psd_declaration_string ( const unsigned int particle_type,
const ConditionalOStream & pcout )
overridevirtual

Print the declaration string relative to the particle size distribution used.

Parameters
particle_typeParticle type of the distribution
pcoutParallel conditional output stream used to print the information

Implements Distribution.

Definition at line 323 of file distributions.cc.

References Distribution::dia_max_cutoff, Distribution::dia_min_cutoff, mu_ln, and sigma_ln.

Member Data Documentation

◆ gen

std::mt19937 LogNormalDistribution::gen
private

Random number generator for the diameter selection.

Definition at line 228 of file distributions.h.

◆ mu_ln

double LogNormalDistribution::mu_ln
private

Average diameter of the normal distribution.

Definition at line 223 of file distributions.h.

◆ sigma_ln

const double LogNormalDistribution::sigma_ln
private

Standard deviation of the normal distribution.

Definition at line 218 of file distributions.h.


The documentation for this class was generated from the following files: