Main Page | Class Hierarchy | Class List | File List

Energy.h

Go to the documentation of this file.
00001 
00005 /* Copyright (C) 2002 - 2006, Bernd Speiser */
00006 /* This file is part of Quantities.
00007 
00008 PhysicalQuantities is free software; you can redistribute it and/or
00009 modify it under the terms of the GNU General Public License
00010 as published by the Free Software Foundation; either version 2
00011 of the License, or (at your option) any later version.
00012 
00013 PhysicalQuantities is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License for more details.
00017   
00018 You should have received a copy of the GNU General Public License
00019 along with this program; if not, write to the Free Software
00020 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00021 02111-1307, USA.
00022 */
00023 
00024 #ifndef _Energy_h
00025 #define _Energy_h
00026 
00027 #include "Quantity/Variable.h"
00028 #include "Quantity/Constant.h"
00029 #include "Quantity/QuantityCluster.h"
00030 
00031 namespace quantity {
00032   namespace energy {
00033 
00034 /* Energy dimension */
00035 typedef BSUtilities::Rational<2> LE;
00036 typedef BSUtilities::Rational<1> M;
00037 typedef BSUtilities::Rational<-2> TI;
00038 typedef BSUtilities::Rational<0> E;
00039 typedef BSUtilities::Rational<0> TE;
00040 typedef BSUtilities::Rational<0> A;
00041 typedef BSUtilities::Rational<0> LU;
00042 
00043 typedef dimension::Dimension<LE, M, TI, E, TE, A, LU> Dimension;
00044 
00046 class Unit;
00047 
00048 /* declaration of Energy units */
00049 class JouleUnits;
00050 class ErgUnit;
00051 class HartreeUnit;
00052 class RydbergUnit;
00053 class ElectronVoltUnit;
00054 class ThermochemicalCaloryUnit;
00055 class InternationalCaloryUnit;
00056 class FifteenDegreeCaloryUnit;
00057 class LitreAtmosphereUnit;
00058 class BritishThermalUnitUnit;
00059 
00060 /* the Joule and prefixed Joules */
00061 
00062 typedef unit::Prefixable<Unit, JouleUnits> Joules;
00063 
00064 typedef unit::Prefixed<Joules> Joule;
00065 typedef unit::Prefixed<Joules, unit::Kilo> KiloJoule;
00066 
00067 /* the erg */
00068 
00069 typedef unit::NonPrefixable<Unit, ErgUnit> Erg;
00070 
00071 /* the Hartree */
00072 
00073 typedef unit::NonPrefixable<Unit, HartreeUnit> Hartree;
00074 
00075 /* the Rydberg */
00076 
00077 typedef unit::NonPrefixable<Unit, RydbergUnit> Rydberg;
00078 
00079 /* the electron volt */
00080 
00081 typedef 
00082        unit::NonPrefixable<Unit, ElectronVoltUnit> ElectronVolt;
00083 
00084 /* the thermochemical calory */
00085 
00086 typedef unit::NonPrefixable<Unit, ThermochemicalCaloryUnit> 
00087                                                    ThermochemicalCalory;
00088 
00089 /* the international calory */
00090 
00091 typedef unit::NonPrefixable<Unit, InternationalCaloryUnit> 
00092                                                    InternationalCalory;
00093 
00094 /* the 15 degree calory */
00095 
00096 typedef unit::NonPrefixable<Unit, FifteenDegreeCaloryUnit> 
00097                                                    FifteenDegreeCalory;
00098 
00099 /* the litre atmosphere */
00100 
00101 typedef unit::NonPrefixable<Unit, LitreAtmosphereUnit> LitreAtmosphere;
00102 
00103 /* the british thermal unit */
00104 
00105 typedef unit::NonPrefixable<Unit, BritishThermalUnitUnit> 
00106                                                      BritishThermalUnit;
00107 
00108 typedef Loki::TL::Append<Joules::Units,
00109   LOKI_TYPELIST_9(Erg, Hartree, Rydberg, ElectronVolt, ThermochemicalCalory,
00110              InternationalCalory, FifteenDegreeCalory, LitreAtmosphere,
00111                                      BritishThermalUnit)>::Result Units;
00112 
00113 /* declare some abbreviated time units */
00114 
00115 typedef Joule J;
00116 
00117 /* Energy Quantity */
00118 
00119 typedef Quantity<Dimension, Unit, Units, Joule> Quantity;
00120 
00121   }
00122 
00123 typedef Variable<energy::Quantity> Energy;
00124 typedef Constant<energy::Quantity> EnergyConstant;
00125 
00126 typedef QuantityVector<Variable, energy::Quantity> EnergyVector;
00127 
00128 }
00129 
00130 #endif /* _Energy_h */

Generated on Mon Feb 12 18:44:06 2007 for PhysicalQuantities by doxygen 1.3.6