The SKIRT project
advanced radiative transfer for astrophysics
SpecialtySource Class Referenceabstract

#include <SpecialtySource.hpp>

Inheritance diagram for SpecialtySource:

Public Member Functions

int dimension () const override
virtual int geometryDimension () const =0
bool hasVelocity () const override
void launchNormalized (PhotonPacket *pp, size_t historyIndex, double lambda, double Lw) const override
virtual void launchSpecialty (PhotonPacket *pp, size_t historyIndex, double lambda, double Lw, VelocityInterface *bvi) const =0
Vec velocity () const override
double velocityX () const
double velocityY () const
double velocityZ () const
Public Member Functions inherited from NormalizedSource
void launch (PhotonPacket *pp, size_t historyIndex, double L) const override
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 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 ()
Public Member Functions inherited from VelocityInterface
virtual ~VelocityInterface ()

Protected Member Functions

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

Private Types

using BaseType
using ItemType

Private Attributes

VelocityInterface_bvi
double _velocityX
double _velocityY
double _velocityZ

Friends

class ItemRegistry

Detailed Description

SpecialtySource is an abstract class representing a primary radiation source characterized by a single SED object and a single bulk velocity, i.e. both the spectrum and the bulk velocity are identical in all locations. This combination is suitable for specialty sources for which a velocity field makes no sense.

Subclasses must handle the spatial distribution of the source, and can optionally add 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

◆ SpecialtySource()

SpecialtySource::SpecialtySource ( )
inlineprotected

Default constructor for abstract Item subclass SpecialtySource: "a primary source with a single bulk velocity".

Member Function Documentation

◆ dimension()

int SpecialtySource::dimension ( ) const
overridevirtual

This function returns the dimension of the source, which is the same as the dimension of its spatial distribution (to be provided by the subclass), except if there is a nonzero bulk velocity.

Implements Source.

◆ geometryDimension()

virtual int SpecialtySource::geometryDimension ( ) const
pure virtual

This function returns the dimension of the spatial distribution implemented by the subclass, taking into account anisotropic emission or polarization, if any. It must be implemented in a subclass.

Implemented in CenteredSource, and PointSource.

◆ hasVelocity()

bool SpecialtySource::hasVelocity ( ) const
overridevirtual

This function returns true if the velocity of the source is nonzero.

Implements Source.

◆ launchNormalized()

void SpecialtySource::launchNormalized ( PhotonPacket * pp,
size_t historyIndex,
double lambda,
double Lw ) const
overridevirtual

This function causes the photon packet pp to be launched from the source. It passes the request through to the subclass, adding the redshift interface for the configured bulk velocity to the list of arguments.

Implements NormalizedSource.

◆ launchSpecialty()

virtual void SpecialtySource::launchSpecialty ( PhotonPacket * pp,
size_t historyIndex,
double lambda,
double Lw,
VelocityInterface * bvi ) const
pure virtual

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

Implemented in CubicalBackgroundSource, PointSource, SphericalBackgroundSource, and StellarSurfaceSource.

◆ setupSelfBefore()

void SpecialtySource::setupSelfBefore ( )
overrideprotectedvirtual

This function creates a private object offering the velocity interface if the bulk velocity is nonzero.

Reimplemented from NormalizedSource.

◆ velocity()

Vec SpecialtySource::velocity ( ) const
overridevirtual

This function implements the VelocityInterface interface. It returns the bulk velocity of this source, as configured by the user.

Implements VelocityInterface.

◆ velocityX()

double SpecialtySource::velocityX ( ) const
inline

This function returns the value of the discoverable double property velocityX: "the bulk velocity of the source, x component".

This property represents a physical quantity of type "velocity".

The minimum value for this property is "[-100000 km/s".

The maximum value for this property is "100000 km/s]".

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

This property is relevant only if the Boolean expression "Panchromatic" evaluates to true after replacing the names by true or false depending on their presence.

This property is displayed only if the Boolean expression "Level2" 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 "Panchromatic&velocityX:Dimension3" are inserted into the name sets used for evaluating Boolean expressions.

◆ velocityY()

double SpecialtySource::velocityY ( ) const
inline

This function returns the value of the discoverable double property velocityY: "the bulk velocity of the source, y component".

This property represents a physical quantity of type "velocity".

The minimum value for this property is "[-100000 km/s".

The maximum value for this property is "100000 km/s]".

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

This property is relevant only if the Boolean expression "Panchromatic" evaluates to true after replacing the names by true or false depending on their presence.

This property is displayed only if the Boolean expression "Level2" 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 "Panchromatic&velocityY:Dimension3" are inserted into the name sets used for evaluating Boolean expressions.

◆ velocityZ()

double SpecialtySource::velocityZ ( ) const
inline

This function returns the value of the discoverable double property velocityZ: "the bulk velocity of the source, z component".

This property represents a physical quantity of type "velocity".

The minimum value for this property is "[-100000 km/s".

The maximum value for this property is "100000 km/s]".

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

This property is relevant only if the Boolean expression "Panchromatic" evaluates to true after replacing the names by true or false depending on their presence.

This property is displayed only if the Boolean expression "Level2" 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 "Panchromatic&velocityZ:Dimension2" are inserted into the name sets used for evaluating Boolean expressions.


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