Class ConstantDensity

Inheritance Relationships

Base Type

Class Documentation

class ConstantDensity : public Density

Public Functions

ConstantDensity(double HI, double HII, double H2)

Constructor for constant density

Parameters:
  • HI – density for atomic hydrogen

  • HII – density for ionised hydrogen

  • H2 – density for molecular hydrogen

virtual double getDensity(const Vector3d &position) const

Get density at a given position.

Parameters:

position – position in galactic coordinates with Earth at (-8.5 kpc, 0, 0)

Returns:

Density in parts/m^3, sum up all activated parts

virtual double getHIDensity(const Vector3d &position) const

Get HI density at a given position.

Parameters:

position – position in galactic coordinates with Earth at (-8.5 kpc, 0, 0)

Returns:

(constant) density of HI in parts/m^3

virtual double getHIIDensity(const Vector3d &position) const

Get HII density at a given position.

Parameters:

position – position in galactic coordinates with Earth at (-8.5 kpc, 0, 0)

Returns:

(constant) density of HII in parts/m^3

virtual double getH2Density(const Vector3d &position) const

Get H2 density at a given position.

Parameters:

position – position in galactic coordinates with Earth at (-8.5 kpc, 0, 0)

Returns:

(constant) density of H2 in parts/m^3

virtual double getNucleonDensity(const Vector3d &position) const

Get density at a given position.

Parameters:

position – position in galactic coordinates with Earth at (-8.5 kpc, 0, 0)

Returns:

number of nucleons/m^3, sum up all activated parts and weights H2 twice

virtual bool getIsForHI()

Status of HI — active or not.

Returns:

Boolean flag with activation status of HI

virtual bool getIsForHII()

Status of HII — active or not.

Returns:

Boolean flag with activation status of HII

virtual bool getIsForH2()

Status of H2 — active or not.

Returns:

Boolean flag with activation status of H2

void setHI(bool activate, double densityNumber)

Change HI status and the value of the density.

Parameters:
  • activate – new activation status

  • densityNumber – new density [in units of 1/meter ^ 3]

void setHI(bool activate)

Change HI status and keep density unaltered.

Parameters:

activate – new activation status

void setHI(double densityNumber)

Change HI density and keep activation status unaltered

Parameters:

densityNumber – new density [in units of 1/meter ^ 3]

void setHII(bool activate, double densityNumber)

Change HII status and the value of the density.

Parameters:
  • activate – new activation status

  • densityNumber – new density [in units of 1/meter ^ 3]

void setHII(bool activate)

Change HII status and keep density unaltered.

Parameters:

activate – new activation status

void setHII(double densityNumber)

Change HII density and keep activation status unaltered

Parameters:

densityNumber – new density [in units of 1/meter ^ 3]

void setH2(bool activate, double densityNumber)

Change H2 status and the value of the density.

Parameters:
  • activate – new activation status

  • densityNumber – new density [in units of 1/meter ^ 3]

void setH2(bool activate)

Change H2 status and keep density unaltered.

Parameters:

activate – new activation status

void setH2(double densityNumber)

Change H2 density and keep activation status unaltered

Parameters:

densityNumber – new density [in units of 1/meter ^ 3]

virtual std::string getDescription()
inline size_t addReference() const
inline size_t removeReference() const
inline int removeReferenceNoDelete() const
inline size_t getReferenceCount() const

Protected Attributes

mutable size_t _referenceCount