The SKIRT project
advanced radiative transfer for astrophysics
DustMixFragment Class Reference

#include <DustMixFragment.hpp>

Inheritance diagram for DustMixFragment:

Public Member Functions

 DustMixFragment (SimulationItem *parent, ScatteringMode scatteringMode, const GrainPopulation *population)
 DustMixFragment (SimulationItem *parent, ScatteringMode scatteringMode, const GrainPopulation *population, double amin, double amax, double normalization)
double grainRadius () const
bool isGraphite () const
ScatteringMode scatteringMode () const override
Public Member Functions inherited from MultiGrainDustMix
Array emissivity (const Array &Jv) const override
bool hasStochasticDustEmission () const override
int numPopulations () const override
const GrainPopulationpopulation (int c) const
double populationBulkDensity (int c) const override
string populationGrainType (int c) const override
double populationMass (int c) const override
double populationNormalization (int c) const
const GrainSizeDistributionpopulationSizeDistribution (int c) const override
Range populationSizeRange (int c) const override
double totalMass () const override
Public Member Functions inherited from DustMix
double asymmpar (double lambda) const override
Array emissionSpectrum (const MaterialState *state, const Array &Jv) const override
DisjointWavelengthGridemissionWavelengthGrid () const override
bool hasContinuumEmission () const override
double indicativeTemperature (const MaterialState *state, const Array &Jv) const override
double mass () const override
MaterialType materialType () const override
double opacityAbs (double lambda, const MaterialState *state, const PhotonPacket *pp) const override
double opacityExt (double lambda, const MaterialState *state, const PhotonPacket *pp) const override
double opacitySca (double lambda, const MaterialState *state, const PhotonPacket *pp) const override
bool peeloffScattering (double &I, double &Q, double &U, double &V, double &lambda, Direction bfkobs, Direction bfky, const MaterialState *state, const PhotonPacket *pp) const override
void performScattering (double lambda, const MaterialState *state, PhotonPacket *pp) const override
double sectionAbs (double lambda) const override
double sectionExt (double lambda) const override
const ArraysectionsAbs (double lambda) const override
const ArraysectionsAbspol (double lambda) const override
double sectionSca (double lambda) const override
vector< StateVariablespecificStateVariableInfo () const override
const ArraythetaGrid () const override
Public Member Functions inherited from MaterialMix
virtual DynamicStateType hasDynamicMediumState () const
virtual bool hasExtraSpecificState () const
virtual bool hasLineEmission () const
virtual bool hasNegativeExtinction () const
virtual bool hasPolarizedAbsorption () const
virtual bool hasPolarizedEmission () const
virtual bool hasPolarizedScattering () const
virtual bool hasResonantScattering () const
virtual bool hasScatteringDispersion () const
virtual void initializeSpecificState (MaterialState *state, double metallicity, double temperature, const Array &params) const
bool isDust () const
bool isElectrons () const
bool isGas () const
virtual bool isSpecificStateConverged (int numCells, int numUpdated, int numNotConverged, MaterialState *currentAggregate, MaterialState *previousAggregate) const
virtual Array lineEmissionCenters () const
virtual Array lineEmissionMasses () const
virtual Array lineEmissionSpectrum (const MaterialState *state, const Array &Jv) const
virtual vector< SnapshotParameterparameterInfo () const
virtual bool scatteringEmulatesSecondaryEmission () const
virtual UpdateStatus updateSpecificState (MaterialState *state, const Array &Jv) const
Public Member Functions inherited from SimulationItem
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
Public Member Functions inherited from Item
 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 ItemgetItemProperty (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)
Itemoperator= (const Item &)=delete
Itemparent () 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)
Public Member Functions inherited from MultiGrainPopulationInterface
virtual ~MultiGrainPopulationInterface ()

Protected Member Functions

void setupSelfAfter () override
void setupSelfBefore () override
string type () const override
Protected Member Functions inherited from MultiGrainDustMix
 MultiGrainDustMix ()
void addPopulation (const GrainPopulation *population)
void addPopulation (GrainComposition *composition, GrainSizeDistribution *sizeDistribution, int numSizes, GrainPopulation::NormalizationType normType, double normValue)
double getOpticalProperties (const Array &lambdav, const Array &thetav, Array &sigmaabsv, Array &sigmascav, Array &asymmparv, Table< 2 > &S11vv, Table< 2 > &S12vv, Table< 2 > &S33vv, Table< 2 > &S34vv, ArrayTable< 2 > &sigmaabsvv, ArrayTable< 2 > &sigmaabspolvv) override
size_t initializeExtraProperties (const Array &lambdav) override
Protected Member Functions inherited from DustMix
 DustMix ()
void informAvailableWavelengthRange (Range available)
Protected Member Functions inherited from MaterialMix
 MaterialMix ()
Configurationconfig () const
Randomrandom () const
void setupSelfBefore () override
Protected Member Functions inherited from SimulationItem
 SimulationItem ()
virtual bool offersInterface (const std::type_info &interfaceTypeInfo) const
Protected Member Functions inherited from Item
 Item ()
Protected Member Functions inherited from MultiGrainPopulationInterface
 MultiGrainPopulationInterface ()

Private Attributes

double _grainRadius
bool _isGraphite
const GrainPopulation_population
ScatteringMode _scatteringMode

Additional Inherited Members

Public Types inherited from DustMix
enum class  ScatteringMode { HenyeyGreenstein , MaterialPhaseFunction , SphericalPolarization , SpheroidalPolarization }
Public Types inherited from MaterialMix
enum class  DynamicStateType { None , Primary , Secondary , PrimaryIfMergedIterations }
enum class  MaterialType { Dust , Electrons , Gas }

Detailed Description

DustMixFragment is a helper class that represents a single grain population created by another dust mix. It is used by the FragmentDustMixDecorator class to represent a fragment of a MultiGrainDustMix instance.

DustMixFragment itself inherits from MultiGrainDustMix as well, so that it can use the full power of this base class (albeit for just a single dust population). Although DustMixFragment indirectly inherits from SimulationItem, and thus can be part of the simulation hierarchy, its instances can only be constructed programmatically as opposed to being configured as part of a ski file.

Constructor & Destructor Documentation

◆ DustMixFragment() [1/2]

DustMixFragment::DustMixFragment ( SimulationItem * parent,
ScatteringMode scatteringMode,
const GrainPopulation * population )
explicit

This constructor programmatically constructs a DustMixFragment instance from an existing grain population (there are no provisions for creation through the ski file). The resulting object represents a fully functional "multi-grain" dust mix defined by the specified single grain population. The GrainPopulation object must be kept alive by the caller as long as the DustMixFragment instance lives.

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), the specified grain population has been passed to the MultiGrainDustMix base class, and the setup() function has been called.

◆ DustMixFragment() [2/2]

DustMixFragment::DustMixFragment ( SimulationItem * parent,
ScatteringMode scatteringMode,
const GrainPopulation * population,
double amin,
double amax,
double normalization )
explicit

This constructor programmatically constructs a DustMixFragment instance from a given size bin of an existing grain population (there are no provisions for creation through the ski file). The resulting object represents a fully functional "multi-grain" dust mix defined by the specified single grain population, limited to the specified grain size range. The last argument specifies the grain size distribution normalization factor for the population. The GrainPopulation object must be kept alive by the caller as long as the DustMixFragment instance lives.

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), the size-limited grain population has been passed to the MultiGrainDustMix base class, and the setup() function has been called.

Member Function Documentation

◆ grainRadius()

double DustMixFragment::grainRadius ( ) const

This function returns the average radius of a dust grain in the population represented by this fragment.

◆ isGraphite()

bool DustMixFragment::isGraphite ( ) const

This function returns true if the human-readable identifier for the type of grain material represented by this fragment contains "Gra", "PAH" or "CM20", and false otherwise.

◆ scatteringMode()

ScatteringMode DustMixFragment::scatteringMode ( ) const
overridevirtual

This function returns the scattering mode supported by this dust mix fragment as passed to the constructor.

Reimplemented from DustMix.

◆ setupSelfAfter()

void DustMixFragment::setupSelfAfter ( )
overrideprotectedvirtual

This function calculates and stores some derived properties of the dust population represented by this fragment, intended for use by dust destruction/allocation recipes.

Reimplemented from DustMix.

◆ setupSelfBefore()

void DustMixFragment::setupSelfBefore ( )
overrideprotectedvirtual

This function adds the grain population specified in the constructor to the multi-grain dust mix through the appropriate base class function.

Reimplemented from SimulationItem.

◆ type()

string DustMixFragment::type ( ) const
overrideprotectedvirtual

This function returns the name of the item's type and is usually automatically provided through the ITEM macro's that define the metadata for a simulation item. Because DustMixFragment cannot be configured in a ski file, that metadata is not needed and we explicitly define the type() function instead. It returns the name of the FragmentDustMixDecorator class for which DustMixFragment serves under the hood.

Reimplemented from Item.


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