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 handles the activated types in loaded densities, whereas get(type)Density disregards the activation state.

Public Functions

void addDensity(ref_ptr<Density> density)

Add new density to list.

Parameters:

density – density to add

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 particles/m^3, sum up densities from added densities

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:

Density of HI at given position in particles/m^3, sum up all HI densities from added densities

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:

Density of HII at given position in particles/m^3, sum up all HII densities from added densities

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:

Density of H2 at given position in particles/m^3, sum up all H2 densities from added densities

virtual double getNucleonDensity(const Vector3d &position) const

Get the density of nucleons. This is the number of nucleons per volume, summed up all activated density and weight molecular hydrogyen twice

Parameters:

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

Returns:

Density of nucleons at given position in particles/m^3, sum up all nucleon densities from added densities

virtual std::string getDescription()
inline virtual bool getIsForHI()
inline virtual bool getIsForHII()
inline virtual bool getIsForH2()
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