#include <FragmentDustMixDecorator.hpp>
Public Member Functions | |
double | asymmpar (double lambda) const override |
MultiGrainDustMix * | dustMix () const |
Array | emissionSpectrum (const MaterialState *state, const Array &Jv) const override |
DisjointWavelengthGrid * | emissionWavelengthGrid () const override |
Array | emissivity (const Array &Jv) const override |
bool | fragmentSizeBins () const |
bool | hasContinuumEmission () const override |
bool | hasDynamicDensities () const |
bool | hasExtraSpecificState () const override |
bool | hasPolarizedScattering () const override |
bool | hasStochasticDustEmission () const override |
double | indicativeTemperature (const MaterialState *state, const Array &Jv) const override |
double | initialDensityFraction () const |
void | initializeSpecificState (MaterialState *state, double metallicity, double temperature, const Array ¶ms) const override |
double | mass () const override |
MaterialType | materialType () const override |
int | numPopulations () 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 |
vector< SnapshotParameter > | parameterInfo () const override |
void | 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 | populationBulkDensity (int f) const override |
double | populationGrainRadius (int f) const |
string | populationGrainType (int f) const override |
bool | populationIsGraphite (int f) const |
double | populationMass (int f) const override |
double | populationNumberDensity (int f, const MaterialState *state) const |
double | populationOpacityExt (int f, double lambda, const MaterialState *state) const |
const GrainSizeDistribution * | populationSizeDistribution (int f) const override |
Range | populationSizeRange (int f) const override |
double | populationTemperature (int f, const Array &Jv) const |
double | sectionAbs (double lambda) const override |
double | sectionExt (double lambda) const override |
double | sectionSca (double lambda) const override |
vector< StateVariable > | specificStateVariableInfo () const override |
double | totalMass () const override |
![]() | |
virtual double | asymmpar (double lambda) const |
virtual Array | emissionSpectrum (const MaterialState *state, const Array &Jv) const |
virtual DisjointWavelengthGrid * | emissionWavelengthGrid () const |
virtual Array | emissivity (const Array &Jv) const |
virtual bool | hasContinuumEmission () const |
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 double | indicativeTemperature (const MaterialState *state, const Array &Jv) const |
virtual void | initializeSpecificState (MaterialState *state, double metallicity, double temperature, const Array ¶ms) 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 double | mass () const =0 |
virtual MaterialType | materialType () const =0 |
virtual double | opacityAbs (double lambda, const MaterialState *state, const PhotonPacket *pp) const =0 |
virtual double | opacityExt (double lambda, const MaterialState *state, const PhotonPacket *pp) const =0 |
virtual double | opacitySca (double lambda, const MaterialState *state, const PhotonPacket *pp) const =0 |
virtual vector< SnapshotParameter > | parameterInfo () const |
virtual void | peeloffScattering (double &I, double &Q, double &U, double &V, double &lambda, Direction bfkobs, Direction bfky, const MaterialState *state, const PhotonPacket *pp) const =0 |
virtual void | performScattering (double lambda, const MaterialState *state, PhotonPacket *pp) const =0 |
virtual double | sectionAbs (double lambda) const =0 |
virtual double | sectionExt (double lambda) const =0 |
virtual const Array & | sectionsAbs (double lambda) const |
virtual const Array & | sectionsAbspol (double lambda) const |
virtual double | sectionSca (double lambda) const =0 |
virtual vector< StateVariable > | specificStateVariableInfo () const =0 |
virtual const Array & | thetaGrid () const |
virtual UpdateStatus | updateSpecificState (MaterialState *state, const Array &Jv) 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 |
![]() | |
virtual | ~MultiGrainPopulationInterface () |
virtual int | numPopulations () const =0 |
virtual double | populationBulkDensity (int c) const =0 |
virtual string | populationGrainType (int c) const =0 |
virtual double | populationMass (int c) const =0 |
virtual const GrainSizeDistribution * | populationSizeDistribution (int c) const =0 |
virtual Range | populationSizeRange (int c) const =0 |
virtual double | totalMass () const =0 |
Protected Member Functions | |
FragmentDustMixDecorator () | |
void | setupSelfAfter () override |
![]() | |
MaterialMix () | |
Configuration * | config () const |
Random * | random () const |
void | setupSelfBefore () override |
![]() | |
SimulationItem () | |
virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
virtual void | setupSelfAfter () |
virtual void | setupSelfBefore () |
![]() | |
Item () | |
![]() | |
MultiGrainPopulationInterface () | |
Private Types | |
using | BaseType = MaterialMix |
using | ItemType = FragmentDustMixDecorator |
Private Attributes | |
MultiGrainDustMix * | _dustMix |
vector< const DustMixFragment * > | _fragments |
bool | _fragmentSizeBins |
bool | _hasDynamicDensities |
double | _initialDensityFraction |
int | _numFrags |
Friends | |
class | ItemRegistry |
Additional Inherited Members | |
![]() | |
enum class | DynamicStateType { None , Primary , Secondary , PrimaryIfMergedIterations } |
enum class | MaterialType { Dust , Electrons , Gas } |
A FragmentDustMixDecorator instance aggregates a fixed number of predefined dust populations, called fragments, and provides a way to manage the relative weight of each of those fragments during the simulation. The aggregated fragments are defined by specifying a MultiGrainDustMix instance as part of the user configuration. Depending on a user configuration flag, the specified multi-grain dust mix is fragmented into its underlying dust populations or into the individual grain size bins for those populations. A fragment dust mix decorator thus essentially splits a multi-grain dust mix into its underlying fragments. The dust mix being fragmented can be a turn-key multi-grain mix (e.g., ZubkoDustMix) or a fully user-configured dust mix (ConfigurableDustMix), offering nearly limitless possibilities.
The specific medium state for a fragmented dust mix consists of a weight factor for each fragment. To construct the aggregated dust mix represented by the fragmented dust mix for a given spatial cell, the dust mass represented by each fragment in the original dust mix is multiplied by its corresponding weight factor in the specific state. In other words, a weight factor of one means that the fragment's mass remains unchanged from the original dust mix.
Initialization of the specific medium state proceeds as follows. If the fragmented dust mix is configured as part of a geometric medium component, all fragment weight factors are set to a value of one, thus preserving the relative weigths of the fragments in the original dust mix. If the fragmented dust mix is configured as part of an imported medium component, the fragment weight factors are imported from the snapshot.
FragmentDustMixDecorator inherits directly from MaterialMix rather than from DustMix or MultiGrainDustMix so that it cannot be nested inside another fragment dust mix decorator or inside a SelectDustMixFamily instance.
When an item of this type is used, the names provided by the conditional value expression "CustomMediumState" are inserted into the name sets used for evaluating Boolean expressions.
This item type is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.
|
inlineprotected |
Default constructor for concrete Item subclass FragmentDustMixDecorator : "a dust mix decorator that manages separate densities for fragments of another dust mix" .
|
overridevirtual |
This function returns the scattering asymmetry parameter
Reimplemented from MaterialMix.
|
inline |
This function returns the value of the discoverable item property dustMix : "the dust mix to be fragmented" .
The default value for this property is given by the conditional value expression "ThemisDustMix" .
|
overridevirtual |
This function returns the emission spectrum (radiated power per unit of solid angle) in the spatial cell and medium component represented by the specified material state and the receiving material mix when it would be embedded in the specified radiation field. The returned spectrum takes into account the weigths of the various fragments in the mix in addition to the number density of the material in the specified cell.
The input and output arrays are discretized on the wavelength grids returned by the Configuration::radiationFieldWLG() and Configuration::dustEmissionWLG() functions, repectively.
Reimplemented from MaterialMix.
|
overridevirtual |
This function returns the wavelength grid on which dust emission is discretized, i.e. the wavelength grid returned by the Configuration::dustEmissionWLG() function.
Reimplemented from MaterialMix.
This function returns the emissivity spectrum
The input and output arrays are discretized on the wavelength grids returned by the Configuration::radiationFieldWLG() and Configuration::dustEmissionWLG() functions, repectively.
Reimplemented from MaterialMix.
|
inline |
This function returns the value of the discoverable Boolean property fragmentSizeBins : "fragment each dust population into its grain size bins" .
The default value for this property is given by the conditional value expression "false" .
|
overridevirtual |
This function returns true for this class because all dust mixes support secondary continuum emission.
Reimplemented from MaterialMix.
|
inline |
This function returns the value of the discoverable Boolean property hasDynamicDensities : "allow the fragment densities to be adjusted dynamically" .
This property is relevant only if the Boolean expression "DynamicState" evaluates to true after replacing the names by true or false depending on their presence.
The default value for this property is given by the conditional value expression "DynamicState:true;false" .
This property is displayed only if the Boolean expression "Level3" evaluates to true after replacing the names by true or false depending on their presence.
|
overridevirtual |
This function returns true, indicating that the cross sections returned by the fragment dust mix decorator depend on the values of specific state variables other than the number density, in this case the fragment weight factors.
Reimplemented from MaterialMix.
|
overridevirtual |
This function returns a flag indicating whether the material mix supports polarization during scattering events or not. For the fragment dust mix decorator, the function returns the value returned by the corresponding function for the dust mix being fragmented.
Reimplemented from MaterialMix.
|
overridevirtual |
This function returns a flag indicating whether this material mix supports stochastic heating of dust grains. For the fragment dust mix decorator, the function returns true because all dust mixes being fragmented support stochastic heating by definition.
Reimplemented from MaterialMix.
|
overridevirtual |
This function returns an indicative temperature of the fragmented dust mix when it would be embedded in a given radiation field, averaging over the fragments using the fragment weights in the material state as described in the class header.
Reimplemented from MaterialMix.
|
inline |
This function returns the value of the discoverable double property initialDensityFraction : "the initial value of the dynamic density fraction" .
The minimum value for this property is "[0" .
The maximum value for this property is "1]" .
The default value for this property is given by the conditional value expression "0" .
This property is relevant only if the Boolean expression "DynamicState&hasDynamicDensities" evaluates to true after replacing the names by true or false depending on their presence.
This property is displayed only if the Boolean expression "Level3" evaluates to true after replacing the names by true or false depending on their presence.
|
overridevirtual |
This function initializes the specific state variables requested by this fragmented dust mix through the specificStateVariableInfo() function except for the number density. If the params array is nonempty, the function assumes that the array contains the appropriate number of imported parameter values as requested through the parameterInfo() function, i.e. a weight factor per fragment. It then copies these weights into the corresponding specific state variables. If the params array is empty, the function sets all the weights in the specific state to a value of one. The metallicity and temperature arguments are ignored.
Reimplemented from MaterialMix.
|
overridevirtual |
This function returns the dust mass
Implements MaterialMix.
|
overridevirtual |
This function returns the fundamental material type represented by this material mix. For the fragment dust mix decorator, it returns MaterialType::Dust.
Implements MaterialMix.
|
overridevirtual |
This function returns the number of fragments (with indices
Implements MultiGrainPopulationInterface.
|
overridevirtual |
This function returns the absorption opacity
Implements MaterialMix.
|
overridevirtual |
This function returns the extinction opacity
Implements MaterialMix.
|
overridevirtual |
This function returns the scattering opacity
Implements MaterialMix.
|
overridevirtual |
This function returns the number and type of import parameters required by this fragmented dust mix as a list of SnapshotParameter objects. Specifically, the function returns a parameter description for each fragment corresponding to the weight factor to be assigned to that fragment. The parameters imported for each spatial cell end up in the state for the medium component associated with this fragmented dust mix. For more information, see the specificStateVariableInfo() and initializeSpecificState() functions.
Reimplemented from MaterialMix.
|
overridevirtual |
This function calculates the contribution of the medium component associated with this material mix to the peel-off photon luminosity, polarization state, and wavelength shift for the given wavelength, geometry, material state, and photon properties. The relative weight of each fragment's contribution is adjusted by the relative scattering opacity of the fragment. The contributions to the Stokes vector components are stored in the I, Q, U, V arguments, which are guaranteed to be initialized to zero by the caller. For dust mixes, the wavelength remains unchanged.
Implements MaterialMix.
|
overridevirtual |
This function performs a scattering event on the specified photon packet in the spatial cell and medium component represented by the specified material state. Specifically, it randomly selects one of the fragments in the fragmented dust mix, weighted by their relative scattering opacity, and then causes this fragment to perform the scattering event.
Implements MaterialMix.
|
overridevirtual |
This function returns the bulk mass density
Implements MultiGrainPopulationInterface.
double FragmentDustMixDecorator::populationGrainRadius | ( | int | f | ) | const |
This function returns the average radius of a dust grain in the dust population represented by the fragment with index
|
overridevirtual |
This function returns a brief human-readable identifier for the type of grain material represented by the fragment with index
Implements MultiGrainPopulationInterface.
bool FragmentDustMixDecorator::populationIsGraphite | ( | int | f | ) | const |
This function returns true if the human-readable identifier for the type of grain material represented by the fragment with index
|
overridevirtual |
This function returns the dust mass
Implements MultiGrainPopulationInterface.
double FragmentDustMixDecorator::populationNumberDensity | ( | int | f, |
const MaterialState * | state | ||
) | const |
This function returns the number density of the dust population represented by the fragment with index
double FragmentDustMixDecorator::populationOpacityExt | ( | int | f, |
double | lambda, | ||
const MaterialState * | state | ||
) | const |
This function returns the extinction opacity of the dust population represented by the fragment with index
|
overridevirtual |
This function returns the grain size distribution object for the fragment with index
Implements MultiGrainPopulationInterface.
|
overridevirtual |
This function returns the minimum and maximum grain sizes
Implements MultiGrainPopulationInterface.
double FragmentDustMixDecorator::populationTemperature | ( | int | f, |
const Array & | Jv | ||
) | const |
This function returns the equilibrium temperature of the dust population represented by the fragment with index
|
overridevirtual |
This function returns the absorption cross section per entity
Implements MaterialMix.
|
overridevirtual |
This function returns the total extinction cross section per entity
Implements MaterialMix.
|
overridevirtual |
This function returns the scattering cross section per entity
Implements MaterialMix.
|
overrideprotectedvirtual |
This function creates and remembers a dust mix fragment for each grain population in the multi-grain dust mix being fragmented or, if requested by the user, for each size bin in each of those grain populations.
Reimplemented from SimulationItem.
|
overridevirtual |
This function returns a list of StateVariable objects describing the specific state variables used by this fragmented dust mix. Specifically, in addition to a description for the overall number density, the function returns a custom state variable description for each fragment corresponding to the weight factor for that fragment. For more information, see the parameterInfo() and initializeSpecificState() functions.
Implements MaterialMix.
|
overridevirtual |
This function returns the total dust mass
Implements MultiGrainPopulationInterface.