PSD.cc File Reference
#include <DPMBase.h>
#include "PSD.h"

Functions

bool operator< (const DistributionElements &l, const DistributionElements &r)
 
bool operator< (const DistributionElements &l, const Mdouble prob)
 
Mdouble operator== (DistributionElements l, const Mdouble r)
 
std::istream & operator>> (std::istream &is, DistributionElements &p)
 
std::ostream & operator<< (std::ostream &os, DistributionElements &p)
 

Function Documentation

◆ operator<() [1/2]

bool operator< ( const DistributionElements l,
const DistributionElements r 
)

Required to use std::lower_bound for finding when the probability is higher than a certain value.

Returns
TRUE if probability from a vector of type DistributionElements is higher than a certain value from a vector of type DistributionElements and FALSE in the opposite case.
1021 {
1022  return l.probability < r.probability;
1023 }
Mdouble probability
Definition: DistributionElements.h:37

◆ operator<() [2/2]

bool operator< ( const DistributionElements l,
const Mdouble  prob 
)

required to use std::lower_bound for finding when the probability provided as a double is higher than a certain value.

Returns
TRUE if probability as double is higher than a certain value from a DistributionElements vector and FALSE in the opposite case.
1032 {
1033  return l.probability < prob;
1034 }

◆ operator<<()

std::ostream& operator<< ( std::ostream &  os,
DistributionElements p 
)

Writes to output stream. This function is used for restart files.

Returns
a reference to an output stream.
1061 {
1062  os << p.internalVariable << ' ' << p.probability << ' ';
1063  return os;
1064 }
Mdouble internalVariable
Definition: DistributionElements.h:36

◆ operator==()

Mdouble operator== ( DistributionElements  l,
const Mdouble  r 
)

Required to use std::distance to find the index of the PSD size class in which a particle has to be inserted

Returns
A double which determines the size class (radius) a particle will be inserted to.
1041 {
1042  return l.internalVariable == r;
1043 }

◆ operator>>()

std::istream& operator>> ( std::istream &  is,
DistributionElements p 
)

reads from input stream. This function is used for restart files.

Returns
a reference to an input stream.
1050 {
1051  is >> p.internalVariable;
1052  is >> p.probability;
1053  return is;
1054 }