CUnits Class Reference

Class containing all info concerning units. More...

#include <CUtilities.hpp>

List of all members.

Public Member Functions

 CUnits ()
void computeDerivedUnits ()
void setLength (const double &length)
void setVelocity (const double &velocity)
void setMass (const double &mass)
void setTime (const double &time)
void setHubbleParameter (const double &h)
double velocity () const
double time () const
double mass () const
double length () const
double hubbleParameter () const

Public Attributes

double density
double energy
double specificEnergy
double lengthInKpc
double massInSolarMass
double timeInGyr
double kpcInCm
double solarMassInG
double yrInS
double gyrInS
double gamma

Private Attributes

double _length
double _velocity
double _time
double _mass
double _hubbleParameter


Detailed Description

Class containing all info concerning units.

Class for printing info when constructing/destroying.

Contains two static routines with content depending on an ifdef. If VERBOSE_CONSDESTR is defined the class outputs some info to the terminal. If not the class just silently keeps track of the number of allocated and destroyed objects (which is also done in the verbose case).


Constructor & Destructor Documentation

CUnits::CUnits (  ) 

Constructor


Member Function Documentation

void CUnits::computeDerivedUnits (  ) 

Compute derived units

void CUnits::setLength ( const double &  length  ) 

getters and setters


Member Data Documentation

double CUnits::_hubbleParameter [private]

Hubble parameter h (with H0 = 100 * h km/s/Mpc)

double CUnits::_length [private]

unit of length (in cm)

double CUnits::_mass [private]

unit of mass (in g)

double CUnits::_time [private]

unit of time (in s)

double CUnits::_velocity [private]

unit of velocity (in cm/s)

unit of density (in g/cm^3)

unit of energy (in g cm^2 / s^2)

double CUnits::gamma

gas stuff constant (default: 5/3)

one gigayear in s (i.e. seconds/Gyr)

one kiloparsec in cm

unit of length in kpc

unit of mass in solar masses

one solar mass in g

unit of specific energy (in cm^2 / s^2)

unit of time in Gyr

double CUnits::yrInS

one year in s


The documentation for this class was generated from the following files:

Generated on Fri Oct 16 18:59:58 2009 for HYPLOT by  doxygen 1.5.8