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

#include <GeometricSource.hpp>

Inheritance diagram for GeometricSource:
Inheritance graph
[legend]

Public Member Functions

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

Protected Member Functions

 GeometricSource ()
 
void setupSelfBefore () override
 
- Protected Member Functions inherited from NormalizedSource
 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
 
virtual void setupSelfAfter ()
 
virtual void setupSelfBefore ()
 
- 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 = NormalizedSource
 
using ItemType = GeometricSource
 

Private Attributes

Geometry_geometry
 
bool _hasVelocity
 
VectorField_velocityDistribution
 
double _velocityMagnitude
 

Friends

class ItemRegistry
 

Detailed Description

GeometricSource represents a primary radiation source for which the spatial luminosity distribution is characterized by a Geometry object. The spectral distribution is identical in all locations and is characterized by an SED object. The bolometric output is characterized by a LuminosityNormalization object. The emitted radiation is isotropic and unpolarized. The source can also be assigned a vector field determining the bulk velocity in each location.

Constructor & Destructor Documentation

◆ GeometricSource()

GeometricSource::GeometricSource ( )
inlineprotected

Default constructor for concrete Item subclass GeometricSource : "a primary source with a built-in geometry" .

Member Function Documentation

◆ dimension()

int GeometricSource::dimension ( ) const
overridevirtual

This function returns the dimension of the source, which is the same as the dimension of its spatial distribution combined with the dimension of the velocity field, if there is one.

Implements Source.

◆ geometry()

GeometricSource::geometry ( ) const
inline

This function returns the value of the discoverable item property geometry : "the geometry of the spatial luminosity distribution for the source" .

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

◆ hasVelocity()

bool GeometricSource::hasVelocity ( ) const
overridevirtual

This function returns true if the source has a nonzero velocity field.

Implements Source.

◆ launchNormalized()

void GeometricSource::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 using the given history index, wavelength, weighted luminosity contribution, and redshift interface. The position of the emission is determined randomly from the geometry configured for the source, and the bulk velocity is derived from the assigned velocity field, if there is one. The emission is unpolarized and isotropic; the emission direction is simply sampled from a uniform distribution on the unit sphere.

Implements NormalizedSource.

◆ setupSelfBefore()

void GeometricSource::setupSelfBefore ( )
overrideprotectedvirtual

This function caches a flag indicating whether there is a nonzero velocity field.

Reimplemented from SimulationItem.

◆ velocityDistribution()

GeometricSource::velocityDistribution ( ) const
inline

This function returns the value of the discoverable item property velocityDistribution : "the spatial distribution of the velocity, if any" .

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

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.

◆ velocityMagnitude()

GeometricSource::velocityMagnitude ( ) const
inline

This function returns the value of the discoverable double property velocityMagnitude : "the magnitude of the velocity (multiplier)" .

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]" .

This property is relevant only if the Boolean expression "Panchromatic&velocityDistribution" 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 "velocityDistribution&velocityMagnitude:SourceVelocity" are inserted into the name sets used for evaluating Boolean expressions.


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