#include <SepAxGeometry.hpp>
Public Member Functions | |
Position | generatePosition () const override |
virtual double | randomCylRadius () const =0 |
virtual double | randomZ () const =0 |
Public Member Functions inherited from AxGeometry | |
virtual double | density (double R, double z) const =0 |
double | density (Position bfr) const override |
int | dimension () const override |
virtual double | SigmaR () const =0 |
double | SigmaX () const override |
double | SigmaY () const override |
Public Member Functions inherited from Geometry | |
virtual double | density (Position bfr) const =0 |
virtual int | dimension () const =0 |
virtual Position | generatePosition () const =0 |
virtual double | SigmaX () const =0 |
virtual double | SigmaY () const =0 |
virtual double | SigmaZ () 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 Item * | getItemProperty (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) |
Item & | operator= (const Item &)=delete |
Item * | parent () 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 | |
SepAxGeometry () | |
Protected Member Functions inherited from AxGeometry | |
AxGeometry () | |
Protected Member Functions inherited from Geometry | |
Geometry () | |
Random * | random () 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 () | |
Private Types | |
using | BaseType = AxGeometry |
using | ItemType = SepAxGeometry |
Friends | |
class | ItemRegistry |
The SepAxGeometry class is an abstract subclass of the AxGeometry class, and serves as a base class for axisymmetric geometries, where the density is a separable function of \(R\) and \(z\). This means that we can write it as
\[ \rho({\bf{r}}) = \rho_R(R)\,\rho_z(z), \]
with \(\rho_R\) and \(\rho_z\) functions that satisfy the normalization
\[ 2\pi \int_0^\infty \rho_R(R)\, R\, {\text{d}}R = \int_{-\infty}^\infty \rho_z(z)\, {\text{d}}z = 1. \]
|
inlineprotected |
Default constructor for abstract Item subclass SepAxGeometry : "a separable axisymmetric geometry" .
|
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}}\). In a separable axisymmetric geometry, this three-dimensional probability density is separable into a cylindrical, an azimuthal and a vertical component:
\[ p({\bf{r}})\, {\text{d}}{\bf{r}} = \left[ 2\pi\,\rho_R(R)\,R\,{\text{d}}R \right] \left[ \frac{{\text{d}}\phi}{2\pi} \right] \left[ \rho_z(z)\,{\text{d}}z \right]. \]
A random position can hence be constructed by combining random cylindrical coordinates, each chosen from their own probability distributions. A random azimuth \(\phi\) is readily found by chosing a random deviate \({\cal{X}}\) and setting \( \phi = 2\pi {\cal{X}} \). A random cylindrical radius and height can be found through the member functions randomR() and randomz(), which have to be provided for each class derived from the SepAxGeometry class.
Implements Geometry.
|
pure virtual |
This pure virtual function returns the cylindrical radius \(R\) of a random position. For any axisymmetric geometry in which the density is separable in \(R\) and \(z\), this can be achieved by generating a random \(R\) from the one-dimensional probability distribution
\[ p(R)\, {\text{d}}R = 2\pi\, \rho_R(R)\, R\, {\text{d}}R. \]
Implemented in AnnulusGeometry, BrokenExpDiskGeometry, ExpDiskGeometry, and RingGeometry.
|
pure virtual |
This pure virtual function returns the height \(z\) of a random position. For any axisymmetric geometry in which the density is separable in \(R\) and \(z\), this can be achieved by generating a random \(z\) from the one-dimensional probability distribution
\[ p(z)\, {\text{d}}z = \rho_z(z)\, {\text{d}}z. \]
Implemented in AnnulusGeometry, BrokenExpDiskGeometry, ExpDiskGeometry, and RingGeometry.