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

Go to the source code of this file.

## Functions

bool operator< (const PSD::RadiusAndProbability &l, const Mdouble prob)

Mdouble operator== (PSD::RadiusAndProbability l, const Mdouble r)

std::istream & operator>> (std::istream &is, PSD::RadiusAndProbability &p)

std::ostream & operator<< (std::ostream &os, PSD::RadiusAndProbability &p)

## Function Documentation

 bool operator< ( const PSD::RadiusAndProbability & l, const PSD::RadiusAndProbability & 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 PSD::RadiusAndProbability is higher than a certain value from a vector of type PSD::RadiusAndProbability and FALSE in the opposite case.

Definition at line 801 of file PSD.cc.

802 {
803  return l.probability < r.probability;
804 }
Mdouble probability
Definition: PSD.h:90
 bool operator< ( const PSD::RadiusAndProbability & 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 PSD::RadiusAndProbability vector and FALSE in the opposite case.

Definition at line 812 of file PSD.cc.

813 {
814  return l.probability < prob;
815 }
Mdouble probability
Definition: PSD.h:90
 std::ostream& operator<< ( std::ostream & os, PSD::RadiusAndProbability & p )

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

Returns
a reference to an output stream.

Definition at line 841 of file PSD.cc.

842 {
843  os << p.radius << ' ' << p.probability << ' ';
844  return os;
845 }
Mdouble probability
Definition: PSD.h:90
 Mdouble operator== ( PSD::RadiusAndProbability 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.

Definition at line 821 of file PSD.cc.

822 {
824 }
 std::istream& operator>> ( std::istream & is, PSD::RadiusAndProbability & p )

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

Returns
a reference to an input stream.

Definition at line 830 of file PSD.cc.

831 {