Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

DiffusionCoefficient.h

Go to the documentation of this file.
00001 
00005 /* Copyright (C) 2002-2004, 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 _DiffusionCoefficient_h
00025 #define _DiffusionCoefficient_h
00026 
00027 #include "Quantity/Variable.h"
00028 #include "Quantity/Constant.h"
00029 #include "Quantity/QuantityCluster.h"
00030 
00031 #include "PhysicalQuantities/Length.h"
00032 #include "PhysicalQuantities/Time.h"
00033 
00034 namespace Quantities {
00035 
00036 /* DiffusionCoefficient dimension */
00037 typedef BSUtilities::Rational<2> DiffusionCoefficient_LE;
00038 typedef BSUtilities::Rational<0> DiffusionCoefficient_M; 
00039 typedef BSUtilities::Rational<-1> DiffusionCoefficient_TI;
00040 typedef BSUtilities::Rational<0> DiffusionCoefficient_E;
00041 typedef BSUtilities::Rational<0> DiffusionCoefficient_TE;
00042 typedef BSUtilities::Rational<0> DiffusionCoefficient_A;
00043 typedef BSUtilities::Rational<0> DiffusionCoefficient_LU;
00044 class DiffusionCoefficientGroup
00045   {
00046     public:
00047       typedef TYPELIST_7(DiffusionCoefficient_LE, 
00048                          DiffusionCoefficient_M, 
00049                          DiffusionCoefficient_TI, 
00050                          DiffusionCoefficient_E,
00051                          DiffusionCoefficient_TE, 
00052                          DiffusionCoefficient_A, 
00053                                          DiffusionCoefficient_LU) DimTL;
00054   };
00055 
00056 
00058   namespace DiffusionCoefficientUnits {
00059 
00060 /* declaration of DiffusionCoefficient unit base class */
00061 typedef Units::Unit<DiffusionCoefficientGroup> DiffusionCoefficientUnit;
00062 
00063 /* SquareMetrePerSecond and prefixed variants */
00064 
00065 typedef TYPELIST_3(LengthUnits::Metre, LengthUnits::CentiMetre,
00066                                     LengthUnits::MilliMetre) LengthList;
00067 
00068 typedef Units::CompoundElement<DiffusionCoefficientGroup, LengthList, 
00069                                BSUtilities::Rational<2> > LengthElement;
00070 
00071 typedef TYPELIST_3(TimeUnits::Second, TimeUnits::MilliSecond,
00072                                        TimeUnits::MicroSecond) TimeList;
00073 
00074 typedef Units::CompoundElement<DiffusionCoefficientGroup, TimeList, 
00075                                 BSUtilities::Rational<-1> > TimeElement;
00076 
00077 typedef TYPELIST_2(LengthElement, TimeElement)
00078                                       DiffusionCoefficientCompoundList;
00079 typedef Units::Compound<DiffusionCoefficientGroup, 
00080   DiffusionCoefficientCompoundList> DiffusionCoefficientCompoundUnits;
00081 
00082 typedef Units::Composed<DiffusionCoefficientCompoundUnits, 
00083   TYPELIST_2(LengthUnits::Metre, TimeUnits::Second)> 
00084                                                    SquareMetrePerSecond;
00085 
00086 typedef Units::Composed<DiffusionCoefficientCompoundUnits,
00087   TYPELIST_2(LengthUnits::CentiMetre, TimeUnits::Second)> 
00088                                               SquareCentiMetrePerSecond;
00089 
00091 typedef TYPELIST_2(SquareMetrePerSecond, SquareCentiMetrePerSecond) 
00092                                               DiffusionCoefficientUnits;
00093 
00094   }
00095 
00096 
00097 /* declaration of DiffusionCoefficient dimension */
00098 
00099 typedef Dimensions::Dimension<DiffusionCoefficientGroup> 
00100                                           DiffusionCoefficientDimension;
00101 
00102 /* DiffusionCoefficient quantity */
00103 
00104 typedef Quantity<DiffusionCoefficientGroup,
00105   DiffusionCoefficientUnits::DiffusionCoefficientUnits,
00106     DiffusionCoefficientUnits::SquareMetrePerSecond> 
00107                                          DiffusionCoefficientQuantities;
00108 
00109 typedef Variable<DiffusionCoefficientQuantities> DiffusionCoefficient;
00110 typedef Constant<DiffusionCoefficientQuantities> 
00111                                            DiffusionCoefficientConstant;
00112 
00113 typedef VariableVector<DiffusionCoefficientQuantities> 
00114                                              DiffusionCoefficientVector;
00115 
00116 }
00117 
00118 #endif /* _DiffusionCoefficient_h */

Generated on Sun Jan 15 13:58:03 2006 for PhysicalQuantities by doxygen 1.3.6