Transferred copyright to the OpenFOAM Foundation
[OpenFOAM-2.0.x.git] / src / thermophysicalModels / reactionThermo / chemistryReaders / foamChemistryReader / foamChemistryReader.H
blob84f18d22210307c97a46afe5949a2f1d49792082
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::foamChemistryReader
27 Description
28     Chemistry reader for OpenFOAM format
30 SourceFiles
31     foamChemistryReader.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef foamChemistryReader_H
36 #define foamChemistryReader_H
38 #include "chemistryReader.H"
39 #include "fileName.H"
40 #include "typeInfo.H"
41 #include "HashPtrTable.H"
42 #include "labelList.H"
43 #include "speciesTable.H"
44 #include "atomicWeights.H"
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 namespace Foam
51 /*---------------------------------------------------------------------------*\
52                        Class foamChemistry Declaration
53 \*---------------------------------------------------------------------------*/
55 template<class ThermoType>
56 class foamChemistryReader
58     public chemistryReader<ThermoType>
60         //- Chemistry/reactions dictionary
61         dictionary chemDict_;
63         //- Thermo properties dictionary
64         dictionary thermoDict_;
66         //- Table of the thermodynamic data given in the foamChemistry file
67         HashPtrTable<ThermoType> speciesThermo_;
69         //- Table of species
70         speciesTable speciesTable_;
72         //- List of the reactions
73         ReactionList<ThermoType> reactions_;
76     // Private Member Functions
78         //- Disallow default bitwise copy construct
79         foamChemistryReader(const foamChemistryReader&);
81         //- Disallow default bitwise assignment
82         void operator=(const foamChemistryReader&);
85 public:
87     //- Runtime type information
88     TypeName("foamChemistryReader");
91     // Constructors
93         //- Construct from foamChemistry and thermodynamics file names
94         foamChemistryReader
95         (
96             const fileName& reactionsFileName,
97             const fileName& thermoFileName
98         );
100         //- Construct by getting the foamChemistry and thermodynamics file names
101         //  from dictionary
102         foamChemistryReader(const dictionary& thermoDict);
105     //- Destructor
106     virtual ~foamChemistryReader()
107     {}
110     // Member functions
112         //- Table of species
113         const speciesTable& species() const
114         {
115             return speciesTable_;
116         }
118         //- Table of the thermodynamic data given in the foamChemistry file
119         const HashPtrTable<ThermoType>& speciesThermo() const
120         {
121             return speciesThermo_;
122         }
124         //- List of the reactions
125         const ReactionList<ThermoType>& reactions() const
126         {
127             return reactions_;
128         }
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 } // End namespace Foam
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 #ifdef NoRepository
139 #   include "foamChemistryReader.C"
140 #endif
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 #endif
146 // ************************************************************************* //