FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

chemistryReader.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2010 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software: you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::chemistryReader
00026 
00027 Description
00028     Abstract class for reading chemistry
00029 
00030 SourceFiles
00031     chemistryReader.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef chemistryReader_H
00036 #define chemistryReader_H
00037 
00038 #include <OpenFOAM/typeInfo.H>
00039 #include <OpenFOAM/runTimeSelectionTables.H>
00040 #include <specie/Reaction.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 /*---------------------------------------------------------------------------*\
00048                       Class chemistryReader Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 template<class ThermoType>
00052 class chemistryReader
00053 {
00054     // Private Member Functions
00055 
00056         //- Disallow default bitwise copy construct
00057         chemistryReader(const chemistryReader&);
00058 
00059         //- Disallow default bitwise assignment
00060         void operator=(const chemistryReader&);
00061 
00062 
00063 public:
00064 
00065     //- Runtime type information
00066     TypeName("chemistryReader");
00067 
00068     //- The type of thermo package the reader was instantiated for
00069     typedef ThermoType thermoType;
00070 
00071 
00072     // Constructors
00073 
00074         //- Construct null
00075         chemistryReader()
00076         {}
00077 
00078 
00079     // Declare run-time constructor selection table
00080 
00081         declareRunTimeSelectionTable
00082         (
00083             autoPtr,
00084             chemistryReader,
00085             dictionary,
00086             (
00087                 const dictionary& thermoDict
00088             ),
00089             (thermoDict)
00090         );
00091 
00092 
00093     // Selectors
00094 
00095         //- Select constructed from dictionary
00096         static autoPtr<chemistryReader> New(const dictionary& thermoDict);
00097 
00098 
00099     //- Destructor
00100     virtual ~chemistryReader()
00101     {}
00102 
00103 
00104     // Member Functions
00105 
00106         virtual const speciesTable& species() const = 0;
00107 
00108         virtual const HashPtrTable<ThermoType>& speciesThermo() const = 0;
00109 
00110         virtual const SLPtrList<Reaction<ThermoType> >& reactions() const = 0;
00111 };
00112 
00113 
00114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00115 
00116 } // End namespace Foam
00117 
00118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00119 
00120 #define makeChemistryReader(Thermo)                                           \
00121                                                                               \
00122 defineTemplateTypeNameAndDebug                                                \
00123 (                                                                             \
00124     chemistryReader<Thermo>,                                                  \
00125     0                                                                         \
00126 );                                                                            \
00127                                                                               \
00128 defineTemplateRunTimeSelectionTable(chemistryReader<Thermo>, dictionary);
00129 
00130 
00131 #define makeChemistryReaderType(SS, Thermo)                                   \
00132                                                                               \
00133     defineNamedTemplateTypeNameAndDebug(SS<Thermo>, 0);                       \
00134                                                                               \
00135     chemistryReader<Thermo>::adddictionaryConstructorToTable<SS<Thermo> >     \
00136         add##SS##Thermo##ConstructorToTable_;
00137 
00138 
00139 #define addChemistryReaderType(SS, Thermo)                                    \
00140                                                                               \
00141     defineNamedTemplateTypeNameAndDebug(SS, 0);                               \
00142                                                                               \
00143     chemistryReader<Thermo>::adddictionaryConstructorToTable<SS>              \
00144         add##SS##Thermo##ConstructorToTable_;
00145 
00146 
00147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00148 
00149 #ifdef NoRepository
00150 #   include "chemistryReader.C"
00151 #endif
00152 
00153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00154 
00155 #endif
00156 
00157 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines