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

#include <AxAngularDistribution.hpp>

Inheritance diagram for AxAngularDistribution:
Inheritance graph
[legend]

Public Member Functions

int dimension () const override
 
Direction generateDirection () const override
 
virtual double generateInclinationCosine () const =0
 
double probabilityForDirection (Direction bfk) const override
 
virtual double probabilityForInclinationCosine (double costheta) const =0
 
double symmetryX () const
 
double symmetryY () const
 
double symmetryZ () const
 
virtual int dimension () const =0
 
virtual Direction generateDirection () const =0
 
- 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 AngularDistributionInterface
virtual ~AngularDistributionInterface ()
 
virtual double probabilityForDirection (Direction bfk) const =0
 

Protected Member Functions

 AxAngularDistribution ()
 
void setupSelfBefore () override
 
- Protected Member Functions inherited from AngularDistribution
 AngularDistribution ()
 
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 AngularDistributionInterface
 AngularDistributionInterface ()
 

Private Types

using BaseType = AngularDistribution
 
using ItemType = AxAngularDistribution
 

Private Attributes

Direction _sym
 
double _symmetryX
 
double _symmetryY
 
double _symmetryZ
 

Friends

class ItemRegistry
 

Detailed Description

AxAngularDistribution is an intermediate abstract class for representing axisymmetric angular distributions with an optionally tilted symmetry axis. The class essentially translates the directions of the general 3D base class to inclinations for use by subclasses. More specifically, it implements all functions required by the AngularDistribution base class, and expects subclasses to implement the probabilityForInclination() and generateInclination() functions instead.

When an item of this type is used, the names provided by the conditional value expression "Dimension2" are inserted into the name sets used for evaluating Boolean expressions.

Constructor & Destructor Documentation

◆ AxAngularDistribution()

AxAngularDistribution::AxAngularDistribution ( )
inlineprotected

Default constructor for abstract Item subclass AxAngularDistribution : "an axisymmetric angular emission profile" .

Member Function Documentation

◆ dimension()

int AxAngularDistribution::dimension ( ) const
overridevirtual

This function returns the dimension of the angular distribution, which is 2 if the symmetry axis equals the Z-axis, and 3 otherwise.

Implements AngularDistribution.

◆ generateDirection()

Direction AxAngularDistribution::generateDirection ( ) const
overridevirtual

This function first calls on the subclass to generate a random inclination from its distribution, and then generates a 3D direction with that inclination relative to the symmetry axis and a random azimuth.

Implements AngularDistribution.

◆ generateInclinationCosine()

virtual double AxAngularDistribution::generateInclinationCosine ( ) const
pure virtual

This function, to be implemented in a subclass, generates a random inclination cosine relative to the symmetry axis of the axisymmetric angular distribution.

Implemented in ConicalAngularDistribution, LaserAngularDistribution, and NetzerAngularDistribution.

◆ probabilityForDirection()

double AxAngularDistribution::probabilityForDirection ( Direction  bfk) const
overridevirtual

This function returns the normalized probability for a given direction. It determines the angle between the symmetry axis and the specified direction, and then calls on the subclass to obtain the probability corresponding to this inclination.

Implements AngularDistributionInterface.

◆ probabilityForInclinationCosine()

virtual double AxAngularDistribution::probabilityForInclinationCosine ( double  costheta) const
pure virtual

This function, to be implemented in a subclass, returns the normalized probability for a given inclination cosine relative to the symmetry axis of the axisymmetric angular distribution.

Implemented in ConicalAngularDistribution, LaserAngularDistribution, and NetzerAngularDistribution.

◆ setupSelfBefore()

void AxAngularDistribution::setupSelfBefore ( )
overrideprotectedvirtual

This function caches a normalized version of the direction of the symmetry axis for later use.

Reimplemented from AngularDistribution.

Reimplemented in ConicalAngularDistribution, and NetzerAngularDistribution.

◆ symmetryX()

AxAngularDistribution::symmetryX ( ) const
inline

This function returns the value of the discoverable double property symmetryX : "the direction of the positive symmetry axis, 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 "symmetryX:Dimension3" are inserted into the name sets used for evaluating Boolean expressions.

◆ symmetryY()

AxAngularDistribution::symmetryY ( ) const
inline

This function returns the value of the discoverable double property symmetryY : "the direction of the positive symmetry axis, 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 "symmetryY:Dimension3" are inserted into the name sets used for evaluating Boolean expressions.

◆ symmetryZ()

AxAngularDistribution::symmetryZ ( ) const
inline

This function returns the value of the discoverable double property symmetryZ : "the direction of the positive symmetry axis, z component" .

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

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


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