Class DensityList

Inheritance Relationships

Base Type

Class Documentation

class DensityList : public Density

Superposition of density models. the addDensity function adds a new density to the list. The getDensity function cares about acitvated types in loaded densitys. The get(typ)Density doesn’t care.

Public Functions

void addDensity(ref_ptr<Density> density)

add new density to list

Parameters
  • density: density to add

double getDensity(const Vector3d &position) const

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

double getHIDensity(const Vector3d &position) const

Return
density of HI at given position in parts/m^3, sum up all HI densities from added densities
Parameters
  • position: position in galactic coordinates with Earth at (-8.5kpc, 0, 0)

double getHIIDensity(const Vector3d &position) const

Return
density of HII at given position in parts/m^3, sum up all HII densities from added densities
Parameters
  • position: position in galactic coordinates with Earth at (-8.5kpc, 0, 0)

double getH2Density(const Vector3d &position) const

Return
density of H2 at given position in parts/m^3, sum up all H2 densities from added densities
Parameters
  • position: position in galactic coordinates with Earth at (-8.5kpc, 0, 0)

double getNucleonDensity(const Vector3d &position) const

NucleonDensity is the number of nucleons per Volume, sum up all activated density and weight molecular hydrogyen twice

Return
density of nucleons at given position in parts/m^3, sum up all nucleon densities from added densities
Parameters
  • position: position in galactic coordinates with Earth at (-8.5kpc, 0, 0)

virtual bool getIsForHI()
virtual bool getIsForHII()
virtual bool getIsForH2()
size_t addReference() const
size_t removeReference() const
int removeReferenceNoDelete() const
size_t getReferenceCount() const

Protected Attributes

size_t _referenceCount