The SKIRT project
advanced radiative transfer for astrophysics
ConicalAngularDistribution Class Reference

#include <ConicalAngularDistribution.hpp>

Inheritance diagram for ConicalAngularDistribution:

Public Member Functions

double generateInclinationCosine () const override
double openingAngle () const
double probabilityForInclinationCosine (double costheta) const override
Public Member Functions inherited from AxAngularDistribution
int dimension () const override
Direction generateDirection () const override
double probabilityForDirection (Direction bfk) const override
double symmetryX () const
double symmetryY () const
double symmetryZ () 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 AngularDistributionInterface
virtual ~AngularDistributionInterface ()

Protected Member Functions

 ConicalAngularDistribution ()
void setupSelfBefore () override
Protected Member Functions inherited from AxAngularDistribution
 AxAngularDistribution ()
Protected Member Functions inherited from AngularDistribution
 AngularDistribution ()
Randomrandom () const
Protected Member Functions inherited from SimulationItem
 SimulationItem ()
virtual bool offersInterface (const std::type_info &interfaceTypeInfo) const
virtual void setupSelfAfter ()
Protected Member Functions inherited from Item
 Item ()
Protected Member Functions inherited from AngularDistributionInterface
 AngularDistributionInterface ()

Private Types

using BaseType
using ItemType

Private Attributes

double _cosDelta
double _openingAngle

Friends

class ItemRegistry

Detailed Description

The ConicalAngularDistribution class describes anisotropic emission that can represent a simple model for an AGN: the emission is isotropic within a cone around the symmetry axis (on both sides), and completely blocked outside this cone. The (half) opening angle \(\Delta\) of the cone is the only free parameter. The emission pattern is axisymmetric relative to an arbitrary symmetry axis configured in the base class.

Constructor & Destructor Documentation

◆ ConicalAngularDistribution()

ConicalAngularDistribution::ConicalAngularDistribution ( )
inlineprotected

Default constructor for concrete Item subclass ConicalAngularDistribution: "an anisotropic conical emission profile".

Member Function Documentation

◆ generateInclinationCosine()

double ConicalAngularDistribution::generateInclinationCosine ( ) const
overridevirtual

This function generates a random inclination cosine \(\cos\theta\) according to an isotropic distribution within a cone with (half) opening angle \(Delta\). This can be easily obtained by picking a uniform deviate \({\cal{X}}\) and setting

\[ \theta = \begin{cases} \;\arccos\left[ 1-2{\cal{X}}(1-\cos\Delta)\right] & \qquad\text{if $0\le {\cal{X}} < \dfrac{\pi}{2}$} \\ \;\arccos\left[ 1-2\cos\Delta - 2{\cal{X}}(1-\cos\Delta) \right] & \qquad\text{if $\dfrac12 \le {\cal{X}} < 1$} \end{cases} \]

Implements AxAngularDistribution.

◆ openingAngle()

double ConicalAngularDistribution::openingAngle ( ) const
inline

This function returns the value of the discoverable double property openingAngle: "the (half) opening angle of the cone".

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

The minimum value for this property is "]0 deg".

The maximum value for this property is "90 deg]".

◆ probabilityForInclinationCosine()

double ConicalAngularDistribution::probabilityForInclinationCosine ( double costheta) const
overridevirtual

This function returns the normalized probability for a given inclination cosine \(\cos\theta\) according to an isotropic emission within a cone with (half) opening angle \(\Delta\). We have

\[ p({\theta}) = \frac{1}{1-\cos\Delta}\times\begin{cases}\; 1 & \qquad\text{if $0\le\theta<\Delta$} \\ \;0 & \qquad\text{if $\Delta\le\theta<\pi-\Delta$} \\ \;1 & \qquad\text{if $\pi-\Delta\le\theta\le\pi$} \end{cases} \]

Implements AxAngularDistribution.

◆ setupSelfBefore()

void ConicalAngularDistribution::setupSelfBefore ( )
overrideprotectedvirtual

This function calculates the cosine of the opening angle for later use.

Reimplemented from AxAngularDistribution.


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