BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / thermophysicalModels / reactionThermo / chemistryReaders / chemistryReader / chemistryReader.H
blob13313b9772c9d5788f7b895e0ff2a60ed5288789
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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/>.
24 Class
25     Foam::chemistryReader
27 Description
28     Abstract class for reading chemistry
30 SourceFiles
31     chemistryReader.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef chemistryReader_H
36 #define chemistryReader_H
38 #include "typeInfo.H"
39 #include "runTimeSelectionTables.H"
40 #include "Reaction.H"
41 #include "ReactionList.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 /*---------------------------------------------------------------------------*\
49                       Class chemistryReader Declaration
50 \*---------------------------------------------------------------------------*/
52 template<class ThermoType>
53 class chemistryReader
55     // Private Member Functions
57         //- Disallow default bitwise copy construct
58         chemistryReader(const chemistryReader&);
60         //- Disallow default bitwise assignment
61         void operator=(const chemistryReader&);
64 public:
66     //- Runtime type information
67     TypeName("chemistryReader");
69     //- The type of thermo package the reader was instantiated for
70     typedef ThermoType thermoType;
73     // Constructors
75         //- Construct null
76         chemistryReader()
77         {}
80     // Declare run-time constructor selection table
82         declareRunTimeSelectionTable
83         (
84             autoPtr,
85             chemistryReader,
86             dictionary,
87             (
88                 const dictionary& thermoDict,
89                 speciesTable& species
90             ),
91             (thermoDict, species)
92         );
95     // Selectors
97         //- Select constructed from dictionary
98         static autoPtr<chemistryReader> New
99         (
100             const dictionary& thermoDict,
101             speciesTable& species
102         );
105     //- Destructor
106     virtual ~chemistryReader()
107     {}
110     // Member Functions
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 #ifdef NoRepository
130 #   include "chemistryReader.C"
131 #endif
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 #endif
166 // ************************************************************************* //