00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _Energy_h
00027 #define _Energy_h
00028
00029
00030 #include "Quantities/Quantity/Variable.h"
00031 #include "Quantities/Quantity/Constant.h"
00032 #include "Quantities/Quantity/QuantityAggregates.h"
00033
00034 namespace quantity {
00035 namespace energy {
00036
00038 class Class;
00039
00041 class Unit;
00042
00043
00044 class JouleUnits;
00045 class ErgUnit;
00046 class HartreeUnit;
00047 class RydbergUnit;
00048 class ElectronVoltUnit;
00049 class ThermochemicalCaloryUnit;
00050 class InternationalCaloryUnit;
00051 class FifteenDegreeCaloryUnit;
00052 class LitreAtmosphereUnit;
00053 class BritishThermalUnitUnit;
00054
00056 typedef unit::Prefixable<Unit, JouleUnits> Joules;
00057
00059 typedef unit::Prefixed<Joules> Joule;
00060
00062 typedef unit::Prefixed<Joules, unit::Kilo> KiloJoule;
00063
00065 typedef unit::NonPrefixable<Unit, ErgUnit> Erg;
00066
00068 typedef unit::NonPrefixable<Unit, HartreeUnit> Hartree;
00069
00071 typedef unit::NonPrefixable<Unit, RydbergUnit> Rydberg;
00072
00074 typedef unit::Prefixable<Unit, ElectronVoltUnit> ElectronVolts;
00075
00077 typedef unit::NonPrefixable<Unit, ThermochemicalCaloryUnit>
00078 ThermochemicalCalory;
00079
00081 typedef unit::NonPrefixable<Unit, InternationalCaloryUnit>
00082 InternationalCalory;
00083
00085 typedef unit::NonPrefixable<Unit, FifteenDegreeCaloryUnit>
00086 FifteenDegreeCalory;
00087
00089 typedef unit::NonPrefixable<Unit, LitreAtmosphereUnit> LitreAtmosphere;
00090
00092 typedef unit::NonPrefixable<Unit, BritishThermalUnitUnit>
00093 BritishThermalUnit;
00094
00096 typedef Loki::Typelist<Joules, Loki::Typelist<Erg,
00097 Loki::Typelist<Hartree, Loki::Typelist<Rydberg, Loki::Typelist<ElectronVolts,
00098 Loki::Typelist<ThermochemicalCalory, Loki::Typelist<InternationalCalory,
00099 Loki::Typelist<FifteenDegreeCalory, Loki::Typelist<LitreAtmosphere,
00100 Loki::Typelist<BritishThermalUnit, Loki::NullType> > > > > > > > > >
00101 Units;
00102
00103
00104 typedef Joule J;
00105
00106
00107
00108 typedef Quantity<Class> Quantity;
00109
00110 class DerivedEnergy;
00111
00112 }
00113
00115 template<>
00116 struct QuantityTraits<energy::Class>
00117 {
00118 typedef
00119 dimension::Dimension<BSUtilities::Rational<2>,
00120 BSUtilities::Rational<1>, BSUtilities::Rational<-2>,
00121 BSUtilities::Rational<0>, BSUtilities::Rational<0>,
00122 BSUtilities::Rational<0>, BSUtilities::Rational<0> > Dimension;
00123 typedef energy::Unit UnitType;
00124 typedef energy::Units UnitList;
00125 typedef energy::Joule DefaultUnit;
00126
00127 typedef energy::DerivedEnergy DefaultDerivedQuantityType;
00128
00129 static const std::string NameString ();
00130 static const std::string SymbolString ();
00131
00132 };
00133
00134
00135 template<>
00136 struct DerivedQuantityTraits<energy::Class, energy::DerivedEnergy>
00137 {
00138 static const bool OverwriteName = false;
00139 static const bool OverwriteSymbol = false;
00140
00141 static const std::string NameString ();
00142 static const std::string SymbolString ();
00143
00144 };
00145
00147 typedef Variable<energy::Quantity> Energy;
00148
00150 typedef Constant<energy::Quantity> EnergyConstant;
00151
00153 typedef VariableVector<QuantityVector<energy::Class> > EnergyVector;
00154
00155 }
00156
00157 #endif