#include <ContGasSecondarySource.hpp>
Public Member Functions | |
ContGasSecondarySource (SimulationItem *parent, int h) | |
void | launch (PhotonPacket *pp, size_t historyIndex, double L) const override |
double | prepareLuminosities () override |
void | preparePacketMap (size_t firstIndex, size_t numIndices) override |
![]() | |
SecondarySource (SimulationItem *parent) | |
virtual void | launch (PhotonPacket *pp, size_t historyIndex, double L) const =0 |
virtual double | prepareLuminosities ()=0 |
virtual void | preparePacketMap (size_t firstIndex, size_t numIndices)=0 |
![]() | |
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 |
Private Attributes | |
Configuration * | _config |
int | _h |
vector< size_t > | _Iv |
Array | _Lv |
const EmittingGasMix * | _mix |
MediumSystem * | _ms |
Random * | _random |
Array | _Wv |
Additional Inherited Members | |
![]() | |
SimulationItem () | |
virtual bool | offersInterface (const std::type_info &interfaceTypeInfo) const |
virtual void | setupSelfAfter () |
virtual void | setupSelfBefore () |
![]() | |
Item () | |
ContGasSecondarySource is a helper class that launches secondary emission photon packets from continuum emission for a given gas medium component. An instance of this class should be constructed only if secondary emission from gas is enabled for the simulation.
For more information on the operation of this class, see the SecondarySourceSystem class.
|
explicit |
This constructor creates a ContGasSecondarySource instance for the medium component with the specified index. This medium component must have a material mix that derives from the abstract EmittingGasMix class. 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).
|
overridevirtual |
This function causes the photon packet pp to be launched from one of the cells in the spatial grid using the given history index. Because photon packets launched from a given spatial cell are usually handled consecutively by the same execution thread, this function can and does calculate the emission spectrum for a given cell only once. It preserves the relevant information from one invocation of the function to the next in a helper object allocated with thread-local storage scope. As a result, memory requirements are limited to storing the information for only a single cell per execution thread, and the calculation is still performed only once per cell.
Once the emission spectrum for the current cell is known, the function randomly generates a wavelength either from this emission spectrum or from the configured bias wavelength distribution, adjusting the launch weight with the proper bias factor. It then generates a random position uniformly within the spatial cell. The function obtains the bulk velocity of the cell for application of the appropriate macroscopic Doppler shift; other than this the emission is assumed to be unpolarized and isotropic in the comoving frame.
Finally, the function actually initializes the photon packet with this information.
Implements SecondarySource.
|
overridevirtual |
This function calculates and stores the bolometric luminosities for this source in each spatial cell of the simulation, and returns the total bolometric luminosity.
Implements SecondarySource.
|
overridevirtual |
This function prepares the mapping of history indices to spatial cells, given the range of history indices allocated to this source.
Implements SecondarySource.