The SKIRT project
advanced radiative transfer for astrophysics
Public Member Functions | Protected Member Functions | Private Types | Private Attributes | Friends | List of all members
PhotonPacketOptions Class Reference

#include <PhotonPacketOptions.hpp>

Inheritance diagram for PhotonPacketOptions:
Inheritance graph
[legend]

Public Member Functions

bool explicitAbsorption () const
 
bool forceScattering () const
 
int minScattEvents () const
 
double minWeightReduction () const
 
double pathLengthBias () 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
 

Protected Member Functions

 PhotonPacketOptions ()
 
- Protected Member Functions inherited from SimulationItem
 SimulationItem ()
 
virtual bool offersInterface (const std::type_info &interfaceTypeInfo) const
 
virtual void setupSelfAfter ()
 
virtual void setupSelfBefore ()
 
- Protected Member Functions inherited from Item
 Item ()
 

Private Types

using BaseType = SimulationItem
 
using ItemType = PhotonPacketOptions
 

Private Attributes

bool _explicitAbsorption
 
bool _forceScattering
 
int _minScattEvents
 
double _minWeightReduction
 
double _pathLengthBias
 

Friends

class ItemRegistry
 

Detailed Description

The PhotonPacketOptions class simply offers a number of configuration options related to the Monte Carlo photon packet life cycle. These options are relevant as soon as there is a medium in the configuration.

Several variations of the photon life cycle implementation can be configured:

The remaining three options serve to further configure the detailed behavior of the forced scattering photon cycle. The first two options determine when the photon life cycle will be terminated, i.e. after the weight of photon packet has decreased to some insignificant fraction of its original weight (luminosity) through interaction with the medium, with a given minimum number of scattering events if so desired.

The last option configures the path length stretching mechanism. When determining the next interaction location of a photon packet with the medium, this technique samples in part from a distribution representing unphysically long path segments, correcting this deviation through a bias factor on the photon packet's weight. This allows a photon packet to more easily skip through high optical depth regions. The value configured for this option determines the fraction of path lengths sampled from the unphysical distribution. A value of zero disables the mechanism altogether.

The path length stretching mechanism cannot be used for models where the photon packet wavelength may change during its life cycle, for example during scattering or as a result of bulk motions in the medium. This is so because the unphysically long distances between interactions would no longer correctly sample the effects on the wavelength. Also, path length stretching is currently not implemented for photon cycles without forced scattering. In all these cases, the path length stretching mechanism will automatically be disabled during setup. As a result, these simulations will lack the potential optimization brought by the path length technique. In particulatar, penetrating regions of high optical depth may require many scattering events with correspondingly longer running times.

Constructor & Destructor Documentation

◆ PhotonPacketOptions()

PhotonPacketOptions::PhotonPacketOptions ( )
inlineprotected

Default constructor for concrete Item subclass PhotonPacketOptions : "a set of options related to the photon packet lifecycle" .

Member Function Documentation

◆ explicitAbsorption()

PhotonPacketOptions::explicitAbsorption ( ) const
inline

This function returns the value of the discoverable Boolean property explicitAbsorption : "use explicit absorption to allow negative absorption (stimulated emission)" .

The default value for this property is given by the conditional value expression "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.

◆ forceScattering()

PhotonPacketOptions::forceScattering ( ) const
inline

This function returns the value of the discoverable Boolean property forceScattering : "use forced scattering to reduce noise" .

The default value for this property is given by the conditional value expression "Lya:false;true" .

This property is relevant only if the Boolean expression "!(Emission|IteratePrimary)" 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.

When a value is entered for this property, the names provided by the conditional value expression "Emission|IteratePrimary|forceScattering:ForceScattering" are inserted into the name sets used for evaluating Boolean expressions.

◆ minScattEvents()

PhotonPacketOptions::minScattEvents ( ) const
inline

This function returns the value of the discoverable integer property minScattEvents : "the minimum number of forced scattering events before a photon packet is terminated" .

The minimum value for this property is "0" .

The maximum value for this property is "1000" .

The default value for this property is given by the conditional value expression "0" .

This property is relevant only if the Boolean expression "ForceScattering" 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.

◆ minWeightReduction()

PhotonPacketOptions::minWeightReduction ( ) const
inline

This function returns the value of the discoverable double property minWeightReduction : "the minimum weight reduction factor before a photon packet is terminated" .

The minimum value for this property is "[1e3" .

The default value for this property is given by the conditional value expression "1e4" .

This property is relevant only if the Boolean expression "ForceScattering" 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.

◆ pathLengthBias()

PhotonPacketOptions::pathLengthBias ( ) const
inline

This function returns the value of the discoverable double property pathLengthBias : "the fraction of path lengths sampled from a stretched distribution" .

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 "(ForceScattering)&(!Lya):0.5;0" .

This property is relevant only if the Boolean expression "(ForceScattering)&(!Lya)" 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.


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