00001
00009 #ifndef __CUTILITIES_HPP__
00010 #define __CUTILITIES_HPP__
00011
00012 #include <string>
00013 #include <map>
00014 #include <vector>
00015
00016
00021 class CUnits
00022 {
00023 public:
00024 CUnits();
00025
00026 void computeDerivedUnits();
00027
00028 void setLength(const double & length);
00029 void setVelocity(const double & velocity);
00030 void setMass(const double & mass);
00031 void setTime(const double & time);
00032 void setHubbleParameter(const double & h);
00033
00034 double velocity() const;
00035 double time() const;
00036 double mass() const;
00037 double length() const;
00038 double hubbleParameter() const;
00039
00040 double density;
00041 double energy;
00042 double specificEnergy;
00044 double lengthInKpc;
00045 double massInSolarMass;
00046 double timeInGyr;
00048 double kpcInCm;
00049 double solarMassInG;
00050 double yrInS;
00051 double gyrInS;
00053 double gamma;
00055 private:
00056 double _length;
00057 double _velocity;
00058 double _time;
00059 double _mass;
00061 double _hubbleParameter;
00062 };
00063
00064
00065
00076 class CConstrDestrInfo
00077 {
00078 public:
00079 static void constrInfo(const std::string & className);
00080 static void destrInfo(const std::string & className);
00081 static void printInfo();
00082
00083 private:
00084 static std::map<std::string, std::vector<int> > _table;
00085
00086 static const int _vectorSize;
00087 };
00088
00089 #endif // __CUTILITIES_HPP__