#include <GrainPopulation.hpp>
Public Types | |
enum class | NormalizationType : int { DustMassPerHydrogenAtom , DustMassPerHydrogenMass , FactorOnSizeDistribution } |
Public Member Functions | |
GrainPopulation (SimulationItem *parent, GrainComposition *composition, GrainSizeDistribution *sizeDistribution, int numSizes, NormalizationType normType, double normValue) | |
GrainComposition * | composition () const |
double | dustMassPerHydrogenAtom () const |
double | dustMassPerHydrogenMass () const |
double | factorOnSizeDistribution () const |
NormalizationType | normalizationType () const |
int | numSizes () const |
GrainSizeDistribution * | sizeDistribution () const |
![]() | |
template<class T > | |
T * | find (bool setup=true) const |
template<class T > | |
T * | interface (int levels=-999999, bool setup=true) const |
virtual string | itemName () const |
void | setup () |
string | typeAndName () const |
![]() | |
Item (const Item &)=delete | |
virtual | ~Item () |
void | addChild (Item *child) |
const vector< Item * > & | children () const |
virtual void | clearItemListProperty (const PropertyDef *property) |
void | destroyChild (Item *child) |
virtual bool | getBoolProperty (const PropertyDef *property) const |
virtual vector< double > | getDoubleListProperty (const PropertyDef *property) const |
virtual double | getDoubleProperty (const PropertyDef *property) const |
virtual string | getEnumProperty (const PropertyDef *property) const |
virtual int | getIntProperty (const PropertyDef *property) const |
virtual vector< Item * > | getItemListProperty (const PropertyDef *property) const |
virtual Item * | getItemProperty (const PropertyDef *property) const |
virtual string | getStringProperty (const PropertyDef *property) const |
int | getUtilityProperty (string name) const |
virtual void | insertIntoItemListProperty (const PropertyDef *property, int index, Item *item) |
Item & | operator= (const Item &)=delete |
Item * | parent () const |
virtual void | removeFromItemListProperty (const PropertyDef *property, int index) |
virtual void | setBoolProperty (const PropertyDef *property, bool value) |
virtual void | setDoubleListProperty (const PropertyDef *property, vector< double > value) |
virtual void | setDoubleProperty (const PropertyDef *property, double value) |
virtual void | setEnumProperty (const PropertyDef *property, string value) |
virtual void | setIntProperty (const PropertyDef *property, int value) |
virtual void | setItemProperty (const PropertyDef *property, Item *item) |
virtual void | setStringProperty (const PropertyDef *property, string value) |
void | setUtilityProperty (string name, int value) |
virtual string | type () const |
Protected Member Functions | |
GrainPopulation () | |
![]() | |
SimulationItem () | |
virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
virtual void | setupSelfAfter () |
virtual void | setupSelfBefore () |
![]() | |
Item () | |
Private Types | |
using | BaseType = SimulationItem |
using | ItemType = GrainPopulation |
Private Attributes | |
GrainComposition * | _composition |
double | _dustMassPerHydrogenAtom |
double | _dustMassPerHydrogenMass |
double | _factorOnSizeDistribution |
NormalizationType | _normalizationType |
int | _numSizes |
GrainSizeDistribution * | _sizeDistribution |
Friends | |
class | ItemRegistry |
GrainPopulation is simple class that represents a particular dust grain population. A grain population is essentially defined by the combination of a grain composition (an instance of a GrainComposition subclass) providing the optical and calorimetric properties of the grain material, and a grain size distribution (an instance of a GrainSizeDistribution subclass). In addition, the amount of dust contained in the population is specified, in one of three ways: as an absolute dust mass per hydrogen atom, as a ratio of dust mass per hydrogen mass, or by using a given proportionality factor on the size distribution (which in that case should have some known normalization).
Finally, a grain population specifies the number of grain size bins (on a logarithmic scale) that should be used when calculating emission spectra for the grain population. Because the emissivity is nonlinear as a function of grain size, the calculation is performed for a representative grain in each bin. A larger number of bins results in higher accuracy. On the other hand, the required computation time and memory consumption increase roughly linearly with the number of bins.
|
strong |
The enumeration type indicating the mechanism for specifying the amount of dust in the population.
DustMassPerHydrogenAtom : "an absolute dust mass per hydrogen atom" .
DustMassPerHydrogenMass : "a ratio of dust mass per hydrogen mass" .
FactorOnSizeDistribution : "a proportionality factor on the size distribution" .
|
inlineprotected |
Default constructor for concrete Item subclass GrainPopulation : "a dust grain population" .
|
explicit |
This constructor can be invoked by classes that wish to hard-code the creation of a new grain population object (as opposed to creation through the ski file). Before the constructor returns, the newly created object is hooked up as a child to the specified parent in the simulation hierarchy (so it will automatically be deleted), its properties have been set to the values specified in the constructor, and its setup() function has been called. The caller must guarantee that the lifetime of the specified composition and size distribution objects is as least as long as the lifetime of the newly created grain population object.
The normValue argument specifies the normalization value corresponding to the specified normalization type, i.e. dustMassPerHydrogenAtom (in kg), dustMassPerHydrogenMass (dimensionless ratio), or factorOnSizeDistribution (dimensionless factor).
|
inline |
This function returns the value of the discoverable item property composition : "the dust grain composition" .
The default value for this property is given by the conditional value expression "DraineGraphiteGrainComposition" .
|
inline |
This function returns the value of the discoverable double property dustMassPerHydrogenAtom : "the dust mass per hydrogen atom" .
This property represents a physical quantity of type "mass" .
The minimum value for this property is "[0" .
This property is relevant only if the Boolean expression "normalizationTypeDustMassPerHydrogenAtom" evaluates to true after replacing the names by true or false depending on their presence.
|
inline |
This function returns the value of the discoverable double property dustMassPerHydrogenMass : "the dust mass per hydrogen mass" .
The minimum value for this property is "[0" .
The maximum value for this property is "1[" .
This property is relevant only if the Boolean expression "normalizationTypeDustMassPerHydrogenMass" evaluates to true after replacing the names by true or false depending on their presence.
|
inline |
This function returns the value of the discoverable double property factorOnSizeDistribution : "the proportionality factor on the size distribution" .
The minimum value for this property is "[0" .
The default value for this property is given by the conditional value expression "1" .
This property is relevant only if the Boolean expression "normalizationTypeFactorOnSizeDistribution" evaluates to true after replacing the names by true or false depending on their presence.
|
inline |
This function returns the value of the discoverable NormalizationType enumeration property normalizationType : "the mechanism for specifying the amount of dust in the population" .
The default value for this property is given by the conditional value expression "DustMassPerHydrogenMass" .
|
inline |
This function returns the value of the discoverable integer property numSizes : "the number of grain size bins" .
The minimum value for this property is "1" .
The maximum value for this property is "1000" .
The default value for this property is given by the conditional value expression "8" .
|
inline |
This function returns the value of the discoverable item property sizeDistribution : "the dust grain size distribution" .
The default value for this property is given by the conditional value expression "PowerLawGrainSizeDistribution" .