1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
28 Abstract class for reading chemistry
33 \*---------------------------------------------------------------------------*/
35 #ifndef chemistryReader_H
36 #define chemistryReader_H
39 #include "runTimeSelectionTables.H"
41 #include "ReactionList.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class chemistryReader Declaration
50 \*---------------------------------------------------------------------------*/
52 template<class ThermoType>
55 // Private Member Functions
57 //- Disallow default bitwise copy construct
58 chemistryReader(const chemistryReader&);
60 //- Disallow default bitwise assignment
61 void operator=(const chemistryReader&);
66 //- Runtime type information
67 TypeName("chemistryReader");
69 //- The type of thermo package the reader was instantiated for
70 typedef ThermoType thermoType;
80 // Declare run-time constructor selection table
82 declareRunTimeSelectionTable
88 const dictionary& thermoDict,
97 //- Select constructed from dictionary
98 static autoPtr<chemistryReader> New
100 const dictionary& thermoDict,
101 speciesTable& species
106 virtual ~chemistryReader()
112 //- Return access to the list of species
113 virtual const speciesTable& species() const = 0;
115 //- Return access to the thermo packages
116 virtual const HashPtrTable<ThermoType>& speciesThermo() const = 0;
118 //- Return access to the list of reactions
119 virtual const ReactionList<ThermoType>& reactions() const = 0;
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 } // End namespace Foam
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 # include "chemistryReader.C"
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 #define makeChemistryReader(Thermo) \
138 defineTemplateTypeNameAndDebug(chemistryReader<Thermo>, 0); \
139 defineTemplateRunTimeSelectionTable(chemistryReader<Thermo>, dictionary)
142 #define makeChemistryReaderType(Reader, Thermo) \
143 defineNamedTemplateTypeNameAndDebug(Reader<Thermo>, 0); \
144 chemistryReader<Thermo>::adddictionaryConstructorToTable<Reader<Thermo> > \
145 add##Reader##Thermo##ConstructorToTable_
148 // for non-templated chemistry readers
149 #define addChemistryReaderType(Reader, Thermo) \
150 defineTypeNameAndDebug(Reader, 0); \
151 chemistryReader<Thermo>::adddictionaryConstructorToTable<Reader> \
152 add##Reader##Thermo##ConstructorToTable_
155 // for templated chemistry readers
156 #define addTemplateChemistryReaderType(Reader, Thermo) \
157 defineNamedTemplateTypeNameAndDebug(Reader, 0); \
158 chemistryReader<Thermo>::adddictionaryConstructorToTable<Reader> \
159 add##Reader##Thermo##ConstructorToTable_
162 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 // ************************************************************************* //