Forward compatibility: flex
[foam-extend-3.2.git] / src / thermophysicalModels / reactionThermo / chemistryReaders / foamChemistryReader / foamChemistryReader.H
blob1562c579a0fee49599cd1a3b3163f15da7a270b2
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation, either version 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::foamChemistryReader
27 Description
28     Chemistry reader for FOAM 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 "SLPtrList.H"
43 #include "labelList.H"
44 #include "speciesTable.H"
45 #include "atomicWeights.H"
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 namespace Foam
52 /*---------------------------------------------------------------------------*\
53                        Class foamChemistry Declaration
54 \*---------------------------------------------------------------------------*/
56 template<class ThermoType>
57 class foamChemistryReader
59     public chemistryReader<ThermoType>
61         //- Table of the thermodynamic data given in the foamChemistry file
62         HashPtrTable<ThermoType> speciesThermo_;
64         //- Table of species
65         speciesTable speciesTable_;
67         //- List of the reactions
68         SLPtrList<Reaction<ThermoType> > reactions_;
71     // Private Member Functions
73         //- Disallow default bitwise copy construct
74         foamChemistryReader(const foamChemistryReader&);
76         //- Disallow default bitwise assignment
77         void operator=(const foamChemistryReader&);
80 public:
82     //- Runtime type information
83     TypeName("foamChemistryReader");
86     // Constructors
88         //- Construct from foamChemistry and thermodynamics file names
89         foamChemistryReader
90         (
91             const fileName& reactionsFileName,
92             const fileName& thermoFileName
93         );
95         //- Construct by getting the foamChemistry and thermodynamics file names
96         //  from dictionary
97         foamChemistryReader(const dictionary& thermoDict);
100     //- Destructor
101     virtual ~foamChemistryReader()
102     {}
105     // Member functions
107         //- Table of species
108         const speciesTable& species() const
109         {
110             return speciesTable_;
111         }
113         //- Table of the thermodynamic data given in the foamChemistry file
114         const HashPtrTable<ThermoType>& sThermo() const
115         {
116             return speciesThermo_;
117         }
119         //- List of the reactions
120         const SLPtrList<Reaction<ThermoType> >& reactions() const
121         {
122             return reactions_;
123         }
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 } // End namespace Foam
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 #ifdef NoRepository
134 #   include "foamChemistryReader.C"
135 #endif
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 #endif
141 // ************************************************************************* //