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

#include <CenteredSource.hpp>

Inheritance diagram for CenteredSource:
Inheritance graph
[legend]

Public Member Functions

double centerX () const
 
double centerY () const
 
double centerZ () const
 
int geometryDimension () const override
 
virtual int intrinsicDimension () const =0
 
- Public Member Functions inherited from SpecialtySource
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
 
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
 
- Public Member Functions inherited from VelocityInterface
virtual ~VelocityInterface ()
 
virtual Vec velocity () const =0
 

Protected Member Functions

 CenteredSource ()
 
- Protected Member Functions inherited from SpecialtySource
 SpecialtySource ()
 
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 ()
 
- Protected Member Functions inherited from VelocityInterface
 VelocityInterface ()
 

Private Types

using BaseType = SpecialtySource
 
using ItemType = CenteredSource
 

Private Attributes

double _centerX
 
double _centerY
 
double _centerZ
 

Friends

class ItemRegistry
 

Detailed Description

CenteredSource is an abstract class for representing specialty radiation sources that have a configurable central point in space, but cannot be implemented as a GeometricSource because of emission anisotropies. A typical example is a primary source that provides a homogeneous background radiation field in a well-defined spatial region.

This class allows the user to configure the central location, and through its base class, it offer user configuration of the SED and luminosity normalization, and possibly a bulk velocity.

This item type is displayed only if the Boolean expression "Level2" evaluates to true after replacing the names by true or false depending on their presence.

Constructor & Destructor Documentation

◆ CenteredSource()

CenteredSource::CenteredSource ( )
inlineprotected

Default constructor for abstract Item subclass CenteredSource : "a centered primary source" .

Member Function Documentation

◆ centerX()

CenteredSource::centerX ( ) const
inline

This function returns the value of the discoverable double property centerX : "the center of the source, x component" .

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

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

When a value is entered for this property, the names provided by the conditional value expression "centerX:Dimension3" are inserted into the name sets used for evaluating Boolean expressions.

◆ centerY()

CenteredSource::centerY ( ) const
inline

This function returns the value of the discoverable double property centerY : "the center of the source, y component" .

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

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

When a value is entered for this property, the names provided by the conditional value expression "centerY:Dimension3" are inserted into the name sets used for evaluating Boolean expressions.

◆ centerZ()

CenteredSource::centerZ ( ) const
inline

This function returns the value of the discoverable double property centerZ : "the center of the source, z component" .

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

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

When a value is entered for this property, the names provided by the conditional value expression "centerZ:Dimension2" are inserted into the name sets used for evaluating Boolean expressions.

◆ geometryDimension()

int CenteredSource::geometryDimension ( ) const
overridevirtual

This function returns the dimension of the geometry of the source, which is the same as the instrinsic dimension (to be provided by the subclass) except if the center is not in the coordinate system origin.

Implements SpecialtySource.

◆ intrinsicDimension()

virtual int CenteredSource::intrinsicDimension ( ) const
pure virtual

This function returns the intrinsic dimension of the spatial distribution implemented by the subclass, taking into account anisotropic emission or polarization, if any, but assuming that the center is in the coordinate system origin (and ignoring any bulk velocity). The function must be implemented in a subclass.

Implemented in CubicalBackgroundSource, SphericalBackgroundSource, and StellarSurfaceSource.


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