The SKIRT project
advanced radiative transfer for astrophysics
SingleGrainDustMix Class Referenceabstract

#include <SingleGrainDustMix.hpp>

Inheritance diagram for SingleGrainDustMix:

Protected Member Functions

 SingleGrainDustMix ()
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
virtual string resourceNameForMuellerMatrix () const
virtual string resourceNameForOpticalProps () const =0
Protected Member Functions inherited from DustMix
 DustMix ()
void informAvailableWavelengthRange (Range available)
virtual size_t initializeExtraProperties (const Array &lambdav)
void setupSelfAfter () override
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 ()

Private Types

using BaseType
using ItemType

Friends

class ItemRegistry

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 }
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
Array emissivity (const Array &Jv) 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
virtual ScatteringMode scatteringMode () const
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 bool hasStochasticDustEmission () 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)
virtual string type () const

Detailed Description

SingleGrainDustMix is an abstract class implementing a dust mix described by a single representative grain, with or without support for polarization by scattering. This base class includes the implementations of the required functions to retrieve the optical properties from stored table resources. Subclasses must merely provide the names of the relevant resource files and implement the scatteringMode() function if they support a scattering mode other than Henyey-Greenstein.

This item type is allowed only if the Boolean expression "!StochasticDustEmission" evaluates to true after replacing the names by true or false depending on their presence.

Constructor & Destructor Documentation

◆ SingleGrainDustMix()

SingleGrainDustMix::SingleGrainDustMix ( )
inlineprotected

Default constructor for abstract Item subclass SingleGrainDustMix: "a dust mix described by a single representative grain".

Member Function Documentation

◆ getOpticalProperties()

double SingleGrainDustMix::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 )
overrideprotectedvirtual

This function is invoked by the DustMix base class to obtain the representative grain optical properties for this dust mix. The first two arguments respectively specify the wavelength grid and (if applicable) the scattering angle grid on which the properties must be tabulated. The output arrays and tables will already have the appropriate size (corresponding to the input wavelength grids) when the function gets called.

For this class, this function first invokes the resourceNameForOpticalProps() function provided by each subclass to obtain the appropriate resource name for the basic optical properties. It opens the associated stored table resource, retrieves the optical properties on the requested wavelength grid, and stores them into the corresponding output arrays.

Subsequently, for scattering modes other than HenyeyGreenstein, the function invokes the resourceNameForMuellerMatrix() function provided by each subclass to obtain the appropriate resource name for the Mueller matrix coefficients. For the SphericalPolarization scattering mode, the function fills all four tables. For the MaterialPhaseFunction scattering mode, the function fills only the first table and leaves the other tables untouched.

Finally, the function returns the dust mass per hydrogen atom for the dust mix.

Implements DustMix.

◆ resourceNameForMuellerMatrix()

virtual string SingleGrainDustMix::resourceNameForMuellerMatrix ( ) const
protectedvirtual

This function must be implemented in a subclass to return the name of the stored table resource tabulating the coefficients of the Mueller matrix as a function of wavelength and scattering angle. This function is invoked for the MaterialPhaseFunction scattering mode (to obtain \(S_{11}\) ) and for the SphericalPolarization (to obtain all four \(S_{xx}\) coefficients). The default implementation in this base class returns the empty string, which is acceptable only with the HenyeyGreenstein scattering mode.

Reimplemented in MeanPinteBenchmarkDustMix, and MeanTrustBenchmarkDustMix.

◆ resourceNameForOpticalProps()

virtual string SingleGrainDustMix::resourceNameForOpticalProps ( ) const
protectedpure virtual

This function must be implemented in a subclass to return the name of the stored table resource tabulating the basic optical properties (cross sections and asymmetry parameter) as a function of wavelength. The asymmetry parameter values are used only with the HenyeyGreenstein scattering mode (although they might be exposed to the user by a Probe).

Implemented in MeanInterstellarDustMix, MeanIvezicBenchmarkDustMix, MeanPascucciBenchmarkDustMix, MeanPinteBenchmarkDustMix, and MeanTrustBenchmarkDustMix.


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