The SKIRT project
advanced radiative transfer for astrophysics
NormalizedSource Class Referenceabstract

#include <NormalizedSource.hpp>

Inheritance diagram for NormalizedSource:

Public Member Functions

void launch (PhotonPacket *pp, size_t historyIndex, double L) const override
virtual void launchNormalized (PhotonPacket *pp, size_t historyIndex, double lambda, double Lw) const =0
double luminosity () const override
LuminosityNormalizationnormalization () const
SEDsed () const
double specificLuminosity (double wavelength) const override
Range wavelengthRange () const override
Public Member Functions inherited from Source
virtual int dimension () const =0
virtual bool hasVelocity () const =0
virtual void prepareForLaunch (double sourceBias, size_t firstIndex, size_t numIndices)
double sourceWeight () const
double wavelengthBias () const
WavelengthDistributionwavelengthBiasDistribution () 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
Public Member Functions inherited from WavelengthRangeInterface
virtual ~WavelengthRangeInterface ()

Protected Member Functions

 NormalizedSource ()
void setupSelfAfter () override
void setupSelfBefore () override
Protected Member Functions inherited from Source
 Source ()
void informAvailableWavelengthRange (Range available, string itemType)
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 SourceWavelengthRangeInterface
 SourceWavelengthRangeInterface ()
Protected Member Functions inherited from WavelengthRangeInterface
 WavelengthRangeInterface ()

Private Types

using BaseType
using ItemType

Private Attributes

WavelengthDistribution_biasDistribution
ContSED_contsed
LuminosityNormalization_normalization
bool _oligochromatic
SED_sed
double _xi

Friends

class ItemRegistry

Detailed Description

NormalizedSource is an abstract class representing a primary radiation source characterized by a single SED object, i.e. the spectral distribution is identical in all spatial locations. The bolometric power of the source is characterized by a LuminosityNormalization object.

Subclasses must handle the spatial distribution of the source and can optionally add bulk velocity, anisotropy and/or polarization.

Properties of sub-types of this type are listed in user interfaces somewhere in between the properties of this type.

Constructor & Destructor Documentation

◆ NormalizedSource()

NormalizedSource::NormalizedSource ( )
inlineprotected

Default constructor for abstract Item subclass NormalizedSource: "a primary source with a single SED".

Member Function Documentation

◆ launch()

void NormalizedSource::launch ( PhotonPacket * pp,
size_t historyIndex,
double L ) const
overridevirtual

This function causes the photon packet pp to be launched from the source using the given history index and luminosity contribution. In this abstract class, the function handles the wavelength sampling and normalization, relying on the subclass to determine the position and propagation direction of the emission from the geometry of the source.

Implements Source.

◆ launchNormalized()

virtual void NormalizedSource::launchNormalized ( PhotonPacket * pp,
size_t historyIndex,
double lambda,
double Lw ) const
pure virtual

This function causes the photon packet pp to be launched from the source using the given history index, wavelength and weighted luminosity contribution. It must be implemented in a subclass to handle the spatial distribution of the source, optionally adding bulk velocity, anisotropy and/or polarization.

Implemented in GeometricSource, and SpecialtySource.

◆ luminosity()

double NormalizedSource::luminosity ( ) const
overridevirtual

This function returns the luminosity \(L\) (i.e. radiative power) of the source integrated over the wavelength range of primary sources (configured for the source system as a whole) and across its complete spatial domain.

Implements Source.

◆ normalization()

LuminosityNormalization * NormalizedSource::normalization ( ) const
inline

This function returns the value of the discoverable item property normalization: "the type of luminosity normalization for the source".

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

◆ sed()

SED * NormalizedSource::sed ( ) const
inline

This function returns the value of the discoverable item property sed: "the spectral energy distribution for the source".

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

◆ setupSelfAfter()

void NormalizedSource::setupSelfAfter ( )
overrideprotectedvirtual

This function warns the user if this source's intrinsic wavelength range does not fully cover the configured wavelength range.

Reimplemented from SimulationItem.

◆ setupSelfBefore()

void NormalizedSource::setupSelfBefore ( )
overrideprotectedvirtual

This function caches some wavelength information.

Reimplemented from SimulationItem.

Reimplemented in SpecialtySource.

◆ specificLuminosity()

double NormalizedSource::specificLuminosity ( double wavelength) const
overridevirtual

This function returns the specific luminosity \(L_\lambda\) (i.e. radiative power per unit of wavelength) of the source at the specified wavelength, or zero if the wavelength is outside the wavelength range of primary sources (configured for the source system as a whole) or if the source simply does not emit at the wavelength. Discrete line emission (i.e. with zero line width) is ignored.

Implements Source.

◆ wavelengthRange()

Range NormalizedSource::wavelengthRange ( ) const
overridevirtual

This function returns the wavelength range for this source. Outside this range, all luminosities are zero. This source's wavelength range is determined as the intersection of the simulation's source wavelength range (obtained from the simulation configuration) and the intrinsic wavelength range of the SED associated with the source.

This function implements the SourceWavelengthRangeInterface interface.

Implements WavelengthRangeInterface.


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