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

double getDensity(const Vector3d &position) const

Return
density in parts/m^3, sum up all activated parts
Parameters
  • position: position in galactic coordinates with Earth at (-8.5kpc, 0, 0)

double getHIDensity(const Vector3d &position) const

Return
(constant) density of HI in parts/m^3
Parameters
  • position: position in galactic coordinates with Earth at (-8.5kpc, 0, 0)

double getHIIDensity(const Vector3d &position) const

Return
(constant) density of HII in parts/m^3
Parameters
  • position: position in galactic coordinates with Earth at (-8.5kpc, 0, 0)

double getH2Density(const Vector3d &position) const

Return
(constant) density of H2 in parts/m^3
Parameters
  • position: position in galactic coordinates with Earth at (-8.5kpc, 0, 0)

double getNucleonDensity(const Vector3d &position) const

Return
number of nucleons/m^3, sum up all activated parts and weights H2 twice
Parameters
  • position: position in galactic coordinates with Earth at (-8.5kpc, 0, 0)

bool getIsForHI()

Return
activation status of HI

bool getIsForHII()

Return
activation status of HII

bool getIsForH2()

Return
activation status of H2

void setHI(bool activate, double densitynumber)

change HI status and density number

Parameters
  • activate: new activation status
  • densitynumber: new densitynumber

void setHI(bool activate)

change HI status and keep density number as it is

Parameters
  • activate: new activation status

void setHI(double densitynumber)

change HI density number and keep status as it is

Parameters
  • densitynumber: new densitynumber

void setHII(bool activate, double densitynumber)

change HII status and density number

Parameters
  • activate: new activation status

void setHII(bool activate)

change HII status and keep dansity number as it is

Parameters
  • activate: new activation status

void setHII(double densitynumber)

change HII dendisty number and keep status as it is

Parameters
  • densitynumber: new densitynumber

void setH2(bool activate, double densitynumber)

change H2 status and denstiy number

Parameters
  • activate: new activation status

void setH2(bool activate)

change H2 status and keep density number as it is

Parameters
  • activate: new activation status

void setH2(double densitynumber)

change H2 density number and keep status as it is

Parameters
  • densitynumber: new densitynumber

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

Protected Attributes

size_t _referenceCount