The SKIRT project
advanced radiative transfer for astrophysics
TriaxialGeometryDecorator Class Reference

#include <TriaxialGeometryDecorator.hpp>

Inheritance diagram for TriaxialGeometryDecorator:

Public Member Functions

double density (Position bfr) const override
double flatteningY () const
double flatteningZ () const
Position generatePosition () const override
SpheGeometrygeometry () const
double SigmaX () const override
double SigmaY () const override
double SigmaZ () const override
Public Member Functions inherited from GenGeometry
int dimension () const override
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

Protected Member Functions

 TriaxialGeometryDecorator ()
Protected Member Functions inherited from GenGeometry
 GenGeometry ()
Protected Member Functions inherited from Geometry
 Geometry ()
Randomrandom () const
void setupSelfBefore () override
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 ()

Private Types

using BaseType
using ItemType

Private Attributes

double _flatteningY
double _flatteningZ
SpheGeometry_geometry
const double & _p
const double & _q

Friends

class ItemRegistry

Detailed Description

The TriaxialGeometryDecorator class is a geometry decorator that constructs a triaxial geometry based on a spherical geometry. The properties of an TriaxialGeometryDecorator object are a reference to the SpheGeometry object being decorated and the flattening parameters \(p\) and \(q\). If the original spherical geometry is characterized by the density profile \(\rho_{\text{s}}(r) \), the new geometry has as density

\[ \rho(x,y,z) = \frac{1}{p\,q}\, \rho_{\text{s}}\left(\sqrt{x^2 + \frac{y^2}{p^2} + \frac{z^2}{q^2}}\right). \]

This new geometry is also normalized to one. Note that the flattening parameters can have any value \(p>0, q>0\).

Constructor & Destructor Documentation

◆ TriaxialGeometryDecorator()

TriaxialGeometryDecorator::TriaxialGeometryDecorator ( )
inlineprotected

Default constructor for concrete Item subclass TriaxialGeometryDecorator: "a decorator that constructs a triaxial variant of any spherical geometry".

Member Function Documentation

◆ density()

double TriaxialGeometryDecorator::density ( Position bfr) const
overridevirtual

This function returns the density \(\rho({\bf{r}})\) at the position \({\bf{r}}\). It just implements the analytical formula.

Implements Geometry.

◆ flatteningY()

double TriaxialGeometryDecorator::flatteningY ( ) const
inline

This function returns the value of the discoverable double property flatteningY: "the flattening parameter p (along the y-axis)".

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

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

◆ flatteningZ()

double TriaxialGeometryDecorator::flatteningZ ( ) const
inline

This function returns the value of the discoverable double property flatteningZ: "the flattening parameter q (along the z-axis)".

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

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

◆ generatePosition()

Position TriaxialGeometryDecorator::generatePosition ( ) const
overridevirtual

This function generates a random position from the geometry, by drawing a random point from the three-dimensional probability density \(p({\bf{r}})\, {\text{d}}{\bf{r}} = \rho({\bf{r}})\, {\text{d}}{\bf{r}}\). It first generates a random position \({\bf{r}}_{\text{s}}\) by calling the generatePosition() function of the geometry being decorated and applies a simple linear transformation to the coordinates, \(x = x_{\text{s}}, y = p\,y_{\text{s}}, z = q\,z_{\text{s}}\).

Implements Geometry.

◆ geometry()

SpheGeometry * TriaxialGeometryDecorator::geometry ( ) const
inline

This function returns the value of the discoverable item property geometry: "the spherical geometry to be made triaxial".

◆ SigmaX()

double TriaxialGeometryDecorator::SigmaX ( ) const
overridevirtual

This function returns the X-axis surface density, i.e. the integration of the density along the entire X-axis,

\[ \Sigma_X = \int_{-\infty}^\infty \rho(x,0,0)\,{\text{d}}x. \]

We easily obtain

\[ \Sigma_X = \frac{2}{p\,q} \int_{-\infty}^\infty \rho_{\text{orig}}(x)\,{\text{d}}x = \frac{2}{p\,q}\,\Sigma_{r,{\text{orig}}}. \]

Implements Geometry.

◆ SigmaY()

double TriaxialGeometryDecorator::SigmaY ( ) const
overridevirtual

This function returns the Y-axis surface density, i.e. the integration of the density along the entire Y-axis,

\[ \Sigma_Y = \int_{-\infty}^\infty \rho(0,y,0)\,{\text{d}}y. \]

We easily obtain

\[ \Sigma_Y = \frac{2}{p\,q} \int_{-\infty}^\infty \rho_{\text{orig}} \left(\frac{y}{p}\right)\,{\text{d}}y = \frac{2}{q}\,\Sigma_{r,{\text{orig}}}. \]

Implements Geometry.

◆ SigmaZ()

double TriaxialGeometryDecorator::SigmaZ ( ) const
overridevirtual

This function returns the Z-axis surface density, i.e. the integration of the density along the entire Z-axis,

\[ \Sigma_Z = \int_{-\infty}^\infty \rho(0,0,z)\,{\text{d}}z. \]

We easily obtain

\[ \Sigma_Z = \frac{2}{p\,q} \int_{-\infty}^\infty \rho_{\text{orig}} \left(\frac{z}{q}\right)\,{\text{d}}z = \frac{2}{p}\,\Sigma_{r,{\text{orig}}}. \]

Implements Geometry.


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