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

#include <distributions.h>

Inheritance diagram for NormalDistribution:
[legend]

Public Member Functions

 NormalDistribution (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

double diameter_average
double standard_deviation
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 74 of file distributions.h.

Constructor & Destructor Documentation

◆ NormalDistribution()

NormalDistribution::NormalDistribution ( 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 19 of file distributions.cc.

References Distribution::dia_max_cutoff, Distribution::dia_min_cutoff, diameter_average, Distribution::Distribution(), gen, Parameters::Lagrangian::number_based, standard_deviation, and Distribution::weighting_type.

Member Function Documentation

◆ find_max_diameter()

double NormalDistribution::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 198 of file distributions.cc.

References Distribution::dia_max_cutoff.

◆ find_min_diameter()

double NormalDistribution::find_min_diameter ( )
overridevirtual

Find the minimum diameter a normal distribution.

Returns
The minimum diameter of a normal distribution.

Implements Distribution.

Definition at line 192 of file distributions.cc.

References Distribution::dia_min_cutoff.

◆ particle_size_sampling()

std::vector< double > NormalDistribution::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 169 of file distributions.cc.

References Distribution::dia_max_cutoff, Distribution::dia_min_cutoff, diameter_average, gen, and standard_deviation.

◆ print_psd_declaration_string()

void NormalDistribution::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 204 of file distributions.cc.

References Distribution::dia_max_cutoff, Distribution::dia_min_cutoff, diameter_average, and standard_deviation.

Member Data Documentation

◆ diameter_average

double NormalDistribution::diameter_average
private

Average diameter of the normal distribution.

Definition at line 139 of file distributions.h.

◆ gen

std::mt19937 NormalDistribution::gen
private

Random number generator for the diameter selection.

Definition at line 149 of file distributions.h.

◆ standard_deviation

double NormalDistribution::standard_deviation
private

Standard deviation of the normal distribution.

Definition at line 144 of file distributions.h.


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